I'm trying to setup a leaderboard for a html5 browsergame using a firebase cloud firestore database. I followed this tutorial on the GameMaker Youtube channel that uses the Firebase Firestore extension https://www.youtube.com/watch?v=6RBN9rB52lI . Though this tutorial ommited to explain how to provide the database ID to GameMaker, I could do it by simply following the documentation PDF provided with the extension. It worked as expected for the Windows export as in the tutorial. The tutorial doesn't adress the case of html5 export, so I relied once again on the documentation of the extension. As required, I modified the index.html document by copy/pasting my Firebase configuration and included it in the export. However, despite following every step of the documentation, I could not make the html5 export work as the debugger gives me the following error :
Unhandled Exception - Uncaught SyntaxError: "undefined" is not valid JSON in file http://xxxxxxxxxxxxx/index.html at line 1
All I do in my code is set a listener in a create event :
And that is enough to crash the game with the given error.
Documentation file provided with the extension is outdated (e.g. the database URL is not necessary anymore for web application setup), and the GitHub wiki page is incomplete for Web Setup. I am doing something wrong or does the current version of the extension not support html5 export ?
I'm trying to setup a leaderboard for a html5 browsergame using a firebase cloud firestore database. I followed this tutorial on the GameMaker Youtube channel that uses the Firebase Firestore extension https://www.youtube.com/watch?v=6RBN9rB52lI . Though this tutorial ommited to explain how to provide the database ID to GameMaker, I could do it by simply following the documentation PDF provided with the extension. It worked as expected for the Windows export as in the tutorial. The tutorial doesn't adress the case of html5 export, so I relied once again on the documentation of the extension. As required, I modified the index.html document by copy/pasting my Firebase configuration and included it in the export. However, despite following every step of the documentation, I could not make the html5 export work as the debugger gives me the following error :
Unhandled Exception - Uncaught SyntaxError: "undefined" is not valid JSON in file http://xxxxxxxxxxxxx/index.html at line 1
All I do in my code is set a listener in a create event :
And that is enough to crash the game with the given error. Documentation file provided with the extension is outdated (e.g. the database URL is not necessary anymore for web application setup), and the GitHub wiki page is incomplete for Web Setup. I am doing something wrong or does the current version of the extension not support html5 export ?