I exported my project as a HTML5 game and uploaded it to Kongregate. When I launch the preview of the game, I get a 100% upload on the game’s screen, but the game won’t start. I get the three following error messages in my console:
Failed to load resource: the server responded with a status of 404 (): /game_ratings.json?game_id=318050:1
Uncaught TypeError: Cannot read property ‘loadJSONFileFromStorage’ of undefined
at Object.gdjs.IntroCode.eventsList0x7a8cdc (code0.js:73)
at Object.gdjs.IntroCode.eventsList0x5b6e18 (code0.js:276)
at gdjs.RuntimeScene.gdjs.IntroCode.func [as _eventsFunction] (code0.js:331)
at gdjs.RuntimeScene.renderAndStep (runtimescene.js:296)
at gdjs.SceneStack.step (scenestack.js:39)
at runtimegame.js:471
at gameLoop (runtimegame-pixi-renderer.js:427)
Does someone know what these error messages refer to and how to overcome them?
Hi,
Thank you for your assistance once again! So I tried three different browsers: the game seems to work fine in both Firefox and Safari, but has the problem mentioned above when opened in Google Chrome.
I have a save system in my game: when a player arrives on the intro screen of the game, I load the storage ‘save’ in memory, I read each global variable and transfer it to a scene variable, close the storage, then transfer each scene variable’s value to the adequate global variable.
Then, every time the player changes from one scene to another, I call a SaveData function, which writes in the storage ‘save’ the current value for each global variable.
This works fine when played in GDevelop and when exported as a Desktop app for both Mac and Windows, and seems to work as whttps://forum.gdevelop.io/t/console-error-when-uploading-game-on-kongregate/23937ell on Safari and Google Crome.
Any idea on how I could improve it so my game also plays successfully on Google Chrome?
This seems like both a limitation of Kongregate and a bug in the storage extension. The limitation is that Kongregate locks storage and the bug is that storage hasn’t any fallback code for when it is not available.
Very strange that it doesn’t work on Chrome since GDevelop uses Chrome for the preview.
What you could try is hosting on Kongregate the storage example project, to check how it works compared to your own project. This should tell us if there’s something wrong with your events.
@arthuro555 it wouldn’t work on Firefox if it was a limitation of Kongregate, right?
So, I reseted the settings for my Google Chrome, without success. Then, I deactivated the cookies filter that was on… and it worked!
The console still displays two out of the three error messages mentioned previously, only that one disappeared:
However, I wonder wether other players will face the same difficulty while playing on chrome?
By the way, while testing the game on different browsers, I noticed that in Firefox, pressing the arrow keys while in a scene using a text entry object produces the characters “&”, " ’ ", “%” and “(”, which is not the case in other browsers.
The text object was always since the implementation of browser support in GD buggy on firefox. Maybe the soon to be update of the renderer will fix that?
I see! I’m relieved because I thought it might be a mistake in my game’s events causing that but I really couldn’t find anything that made sense in that direction!
Case solved then, thanks a lot to you @arthuro555 and to you @Gruk for your support!