General Interface is an open source project hosted by the Dojo Foundation

GI Contributor Blog Blog from Feb 16, 2011

  2011/02/16
Running GI App from file url on Google Chrome
Last Changed by Darren Hwang, Apr 01, 2011 11:42
Labels: crossdomain, cross-origin, google-chrome, file-url

You get a strange error on Google chrome when launching GI application from file URL (when you open the launch.html directly from filesystem)
that says something like

"Invalid character at column 1 character 1 of logger.xml"

If you open the Developer Tool and look at the Console output you will see that it is throwing all these Error for each XML file resource request by GI

"Cross origin requests are only supported for HTTP."

Turns out that similar to Firefox/Mozilla strict origin policy Google Chrome doesn't allow you to load resource from different paths

So for test purpose you can launch Chrome with this flag to get around this restriction

google-chrome --allow-file-access-from-files

or

chrome.exe --allow-file-access-from-files

Posted at 16 Feb @ 5:02 PM by Darren Hwang | 3 Comments