Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

HTML5 game made with phaser not playing - 403 error on loading javascript

A topic by FMProductions created Aug 10, 2018 Views: 1,731 Replies: 5
Viewing posts 1 to 10
(+3)

Hi! 

When I try to load my resources from a javascript file in my HTML5 game project (made with Phaser), I get a 403 error message. 

here is the link to the game: https://fmproductions.itch.io/asciiventure

I'm sorry to bother someone with this problem again. I have checked other threads and there was often the suggestion to check if the upper-and lowercase characters are correct, since itch.io resolves paths case sensitive and that only relative paths are used. As far as I can tell, I considered both suggestions but still get the error. I will check if I can find a solution in the meantime, but I'd be grateful for any helpful suggestions. 


here is the error stack: 

GET https://v6p9d9t4.ssl.hwcdn.net/html/assets/texts/imgs/background.txt 403 ()
xhrLoad @ phaser-2-ce.min.js:3
loadFile @ phaser-2-ce.min.js:3
processLoadQueue @ phaser-2-ce.min.js:3
start @ phaser-2-ce.min.js:3
preUpdate @ phaser-2-ce.min.js:3
updateLogic @ phaser-2-ce.min.js:3
update @ phaser-2-ce.min.js:3
updateRAF @ phaser-2-ce.min.js:3
window.requestAnimationFrame.forceSetTimeOut._onLoop @ phaser-2-ce.min.js:3
requestAnimationFrame (async)
start @ phaser-2-ce.min.js:3
(anonymous) @ phaser-2-ce.min.js:3
execute @ phaser-2-ce.min.js:3
dispatch @ phaser-2-ce.min.js:3
_ready @ phaser-2-ce.min.js:3
_checkReady @ phaser-2-ce.min.js:3
_removePending @ phaser-2-ce.min.js:3
n.onload @ phaser-2-ce.min.js:3
load (async)
addImageAsync @ phaser-2-ce.min.js:3
addMissingImage @ phaser-2-ce.min.js:3
_addImages @ phaser-2-ce.min.js:3
e.Cache @ phaser-2-ce.min.js:3
boot @ phaser-2-ce.min.js:3
e.Device._readyCheck @ phaser-2-ce.min.js:3
setTimeout (async)
e.Device.whenReady @ phaser-2-ce.min.js:3
e.Game @ phaser-2-ce.min.js:3
FloppyGame @ floppy-jam.js:1849
window.onload @ floppy-jam.js:2604
load (async)
(anonymous) @ floppy-jam.js:2603
phaser-2-ce.min.js:3 Phaser.Loader - text[backgroundTxtAsset]: error loading asset from URL ../assets/texts/imgs/background.txt (403)


Thanks!

(+1)

I have fixed the issue, it seems like it was a problem with the path resolution, although it should have worked in my opinion. The problem was that itch.io was not able to resolve 

../

 paths even if you are already one hierarchy level down your top level. I have made a dev log about it here: 

https://fmproductions.itch.io/asciiventure/devlog/44192/403-errors-resolved-itch...

Admin(+1)

../ does work, but path resolution happens where the HTML file is, not where the js file is. This is because the HTML file is the page executing the Javascript. You can see this by looking at the URL for the request that returned a 403: https://v6p9d9t4.ssl.hwcdn.net/html/assets/texts/imgs/background.txt The URL does not include your project's id after the /html/ path, so its' going up one more directory than you expect. Hope that helps.

(+1)

That's awesome, thanks for the info! I guess I have to edit my dev log then. 

Thanks for the quick answer!

I don't know if you are trolling or not (sounds like it), but leafo already provided me the answer, so the issue was resolved already. 

(+1)

this thread saved my game jam project u,w,u


i'm still losing tho AÑSKJDFH


first jame experience go vrrrrr uwu