Unable to load main app
prajwal.be.21

Hello,

I get a JavaScript alert that reads "Unable to load main app script 'myAppName'.js" when I try and run it with chrome. I have completed the initial setup for chrome by adding "--allow-file-access-from-files" in the target text box in chrome properties. This does not happen only with my HTML5 game but also a game I downloaded from another member. It is happening with the JavaScript file that I include in wade.init(); in the index.html file. What is going wrong here? Please help sort out this issue!!! 

All 4 Comments
hermes

I had this problem with Chrome a few times. As it turned out, I had to close all my Chrome windows (all of them!), then run Chrome using the shortcut with --allow-file-access-from-files. Can you do that and see if it works?

 

Nowadays, I normally run my games via a localhost (using WAMP). It takes a few minutes to set up, but then it's much easier (you don't have to remember about --allow-file-access-from-files, you just navigate to http://localhost). A friend of mine uses Project Wrap instead, but I have never tried it.

prajwal.be.21

Hello Hermes,

 

Thanks for the reply... It's working fine now... Even I'll run my games via local host from now on... Thanks a lot!!!

starOfEden

I had the same problem eventually put it under tomcat...

Gio

Yeah I know it's a bit tricky. The thing with chrome is exactly what hermes said - if you want it to work, you have to run chrome with that command-line-switch, after closing any running instance of Chrome. Otherwise it won't work.

 

Running from the local host is by far the best thing you can do - it's just a bit more fiddly to set up. However if you are on Windows, you can also use our prompt.js to do that: simply go to the folder where your game is (cd c:\myGame, or whatever), then type server - as easy as that. You can also type server [portnumber], which will create the server on a port of your choice.

 

We should definitely update the tutorial with these suggestions, thanks for pointing it out.

Post a reply
Add Attachment
Submit Reply
Login to Reply