Unexpected magic: 1936876918

Hello,
I have encountered a problem while deploying my application.
I have the impression that my models (.glb) do not manage to load.
Everything works locally but when the application is deployed I get this error message in the console: "error.js:18 Uncaught (in promise) RuntimeError: Unable to load from ./models/zombie.glb: RuntimeError: Unexpected magic: 1936876918
at RuntimeError.BaseError [as constructor] (error.js:18:42)
at new RuntimeError (error.js:68:28)
at errorHandler (sceneLoader.js:368:46)
at errorCallback (sceneLoader.js:229:17)
at eval (glTFFileLoader.js:494:56) "

I found a person who had the same problem as me
I tried to put my models in the folder called “public/” but the application always looks for the models file in the root even if I change the route
await SceneLoader.ImportMeshAsync("", “…/public/models/”, “my.glb”, this.scene);
My application is public and the code that runs is available here: GitHub - ProjetStatera/StateraFPS at deploy

the link of the deployed application :
https://staterasoon.herokuapp.com/
or
https://stateratest.osc-fr1.scalingo.io/

Thanks in advance for those who will take the time to answer me

Can you make sure your server has glb mine type support?

I can’t say for sure but I’ve seen several babylon projects hosted on heroku so I looked for an add on that could read gltf files but there isn’t one so I guess the server can read gltf natively. I also hosted it on Azure and Scalingo to be sure but I’m having the same problem.

I can confirm this is a server configuration issue
This is what the server replied when asked for the glb:

Ok thank you.
I understood what the problem was.
I downloaded my branch in .zip and I noticed that the glb was 1kb and that they were pointers on the repository so it was normal that it did not work in production.
The problem came from GitHub because I use git lfs and by default the lfs files are not directly downloaded.
If someone encounters the same error, just go to the options of your repository and activate
“Include Git LFS objects in archives”.

Here is the deployed application: https://staterafps.herokuapp.com/

4 Likes

Yes!! congrats!

1 Like

@Adem your game rocks !!!

Thanks ! (I’m his duo)
we spent a lot of time on it :smiling_face:

1 Like

Thanks