Unable to load main app script test.js
megadude2112_616

Hello,

 

When I attempt to load the test.js script (Hello World tutorial) from a local folder containing the WADE files, I receive the following message: 'Unable to load main app script test.js'. However, when I move all the files to the wwwroot folder in IIS 8, the script works as advertised. I receive the message across IE 11, Chrome, and Firefox.

 

Is there a security setting I need to change to permit loading from a local file?

 

Thanks!

All 10 Comments
foxcode
Hi answering from McDonalds

Need to add this to chrome shortcut

--allow-local-file-access

I might be wrong about this will chech when I get home
foxcode

Okay I was way off. Here it is  --allow-file-access-from-files
This needs to go in the target on your google chrome shortcut, and there must be a space, here is mine for an example

 

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --allow-file-access-from-files

 

Anymore problems feel free to ask here, hope it helps :)

megadude2112_616

Thanks, foxcode, but had already tried that. The issue occurs across all browsers. I'm thinking it may have something to do with WIndows 8 security. Some setting somewhere I need to change.

Gio

Hi

 

I'm on Windows 8.1 and never encountered that problem. Firefox at least should work out of the box, and Chrome should work with the setting that foxcode suggested. Can you tell us what it says in the browser's console please? (F12)

 

Thanks

megadude2112_616

IE 11:

 

Warning: DOM7011: The code on this page disabled back and forward caching. For more information, see http://go.microsoft.com/fwlink/?LinkID=291337

 

Info: HTML 1300: Navigation occurred.

File: index.html

Warning: The WebAudio API is not supported by this browser. Audio functionality will be limited.

 

However, running from wwwroot, everything works just fine.

Gio

Hmmm I cannot replicate it, but I do want to get to the bottom of it. Would you mind sending us your test app as a zip? You can send it as a private message if you prefer

megadude2112_616

It's the one from the tutorial:

 

App = function()

{

  this.init = function()

  {

    var helloText = new TextSprite("Hello World!");

    var helloObject = new SceneObject(helloText);

    wade.addSceneObject(helloObject);

  }

}

 

And, the index.html is exactly the same as the Hello World tutorial. It calls wade.init('test.js'). The above app file is named test.js.

 

Thanks!

samiwistler

Have the same problem... I am using chrome with the target change, on Windows 8.1 .

I get an empty page and on console gets this : 

XMLHttpRequest cannot load test.js Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource.

Gio

Hi samiwistler

 

Unfortunately none of us could ever reproduce that problem, though we did try several times. With WADE 2.0 (which is coming out in the next few days) things will work in a completely different way and this will likely not be a problem anymore.

 

For the time being, I would definitely recommend using something like prompt.js on Windows: go to your project's directory, type server 1234 (or whatever port number you want to use), then type localhost:1234. This will create a node.js server linked to your project's folder, and will then open a browser window to show the index.html in that folder.

samiwistler

OK,Fixed (Not realy, bypassed is more correct) by launching WADE under xampp localhost... works fine.

Thanks for the effort

Post a reply
Add Attachment
Submit Reply
Login to Reply