DylanD Posted July 27, 2018 Share Posted July 27, 2018 Hello again everyone, I am trying to get my Facebook instant game to production, but when I try to load the game, it never loads, and gives me this error: [Error] Failed to load resource: the server responded with a status of 404 () (babylon.js, line 0) [Error] TypeError: Prototype value can only be an object or null setPrototypeOf (babylon.gui.js:25:257) (anonymous function) (babylon.gui.js:25:257) (anonymous function) (babylon.gui.js:33) (anonymous function) (babylon.gui.js:561) (anonymous function) (babylon.gui.js:563) (anonymous function) (babylon.gui.js:564) universalModuleDefinition (babylon.gui.js:19) Global Code (babylon.gui.js:21) @Temechon This same project works as a web app and loads properly. Its only when I build and upload to Facebook that it can no longer load babylon (or anything for that matter). I don't know why it can't find the files. They are located here: ./node_modules/babylonjs/babylon.js so I don't know why Facebook won't load them. this is how my index.html looks: <!DOCTYPE html> <head> <link rel="stylesheet" type="text/css" href="css/style.css" /> <script src="node_modules/babylonjs/babylon.js"></script> <script src="node_modules/babylonjs-gui/babylon.gui.js"></script> <script src="node_modules/babylonjs-materials/babylonjs.materials.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <script src="node_modules/systemjs/dist/system.src.js"></script> <script src="js/systemjs.config.js"></script> <script> System.import('app').then(function() { console.log('Imported'); }).catch(function(err){ console.error(err); }); </script> <script src="https://connect.facebook.net/en_US/fbinstant.6.2.js"></script> </head> <body> <canvas id="renderCanvas"></canvas> </body> </html> it seems that those errors go away if I put the connect.facebook src script after everything but then it gives me this error: [Error] Failed to load resource: the server responded with a status of 404 () (game.js, line 0) Any ideas how to fix this? Quote Link to comment Share on other sites More sharing options...
DylanD Posted July 31, 2018 Author Share Posted July 31, 2018 So its seems Facebook file scope is kind of weird, as I can't load and asset that has ./ in front of it... Quote Link to comment Share on other sites More sharing options...
DylanD Posted July 31, 2018 Author Share Posted July 31, 2018 Yup that seems to be the problem... So weird... Quote Link to comment Share on other sites More sharing options...
DylanD Posted July 31, 2018 Author Share Posted July 31, 2018 I believe it is also case sensitive.... Yea it is. So it is case sensitive and you cannot start a file direction(?) with ./ or / for loading resources, if you want to import a class or library you can use ./ So if you have loading problems check these: - does your html src's use ./, if so get rid of them -does any thing that points to a file have the exact name (upper case) and not start with ./ if not then make sure you have the exact naming, and no ./ Not exactly sure why this happens, this was just my experience. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 31, 2018 Share Posted July 31, 2018 Good to know DylanD 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 31, 2018 Share Posted July 31, 2018 hmmm, I need to prolly talk to you about something @DylanD. Im gonna send you a message. DylanD 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.