Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

[SOLVED] AccessDenied When Trying to link the SOURCE of an HTML game

A topic by builds.games created 89 days ago Views: 152 Replies: 1
Viewing posts 1 to 2
(2 edits)

EDIT: I'm just stupid. See reply for explanation in case you run into the same issue.

Original Post:

So in order to get Gyroscope support to work on iPhones in an HTML build I have to send the actual HTML source of the game to the player instead of the itch page. If I send this to them in a discord message it works great! But if I just put it as a link on the itch page ("If you're on iPhone press here to play the game!") It seems really weird to me that the source of where you press the link matters, is there anyway I can wrap the link or something like that so it actually works for iPhone users? Again, if I click the link in discord it somehow works but not if I click it on the itch page???
An example of the offending link: https://html-classic.itch.zone/html/13132807/index.html 
Literally try sending that link to yourself on discord instead of clicking it here and somehow it works???

Here's the error. I'm sure I'm messing with things I don't fully understand, but any help would be appreciated!

<Error>

<Code>AccessDenied</Code>

<Message>Access denied.</Message>

<Details>Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object. Permission 'storage.objects.get' denied on resource (or it may not exist).</Details>

</Error>

Ok actually I'm just dumb. The reason it works from discord (and if you just copy and paste the link into your browser) is because the text of the link is different than the link itself.

Here's the link that didn't work: https://html-classic.itch.zone/html/13132807/index.html, if you inspect (F12) it you'll see that it actually references https://html-classic.itch.zone/html/13125831/index.html, an older build of the game which is no longer available, hence the error. Obviously, if you paste that link into your browser or Discord it loses that reference and just becomes the original text which is right.

I have to be careful when updating the link in the description of my game or it might inherit the href from the link that was there but replace the text! Another option is to just click the little link button in the itch text editor and replace the link there too. Either way, something to be careful of! Make sure your hyperlinks are going to the right source! 

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.