I have the same situation with HERE
And to solve this problem I have to launch html file using Chrome at "--allow-file-access-from-files" mode.
I tried next steps many times, but it doesn't work.
start cmd under windows 7
direct to chrome.exe folder
do this chrome --allow-file-access-from-files file:///C:/test%20-%203.html
That flag is dangerous!! Leaves your file system open for access. Documents originating from anywhere, local or web, should not, by default, have any access to local file:/// resources.
Much better solution is to run a little http server locally.
--- For Windows ---
The easiest is to install http-server globally using node's package manager:
npm install -g http-server
Then simply run http-server in any of your project directories:
Eg. d:\my_project> http-server
Starting up http-server, serving ./
Available on:
http:169.254.116.232:8080
http:192.168.88.1:8080
http:192.168.0.7:8080
http:127.0.0.1:8080
Hit CTRL-C to stop the server
Or as prusswan suggested, you can also install Python under windows, and follow the instructions below.
--- For Linux ---
Since Python is usually available in most linux distributions, just run python -m SimpleHTTPServer in your project directory, and you can load your page on http://localhost:8000
In Python 3 the SimpleHTTPServer module has been merged into http.server, so the new command is python3 -m http.server.
Easy, and no security risk of accidentally leaving your browser open vulnerable.
Search for the path of your Chrome executable and then, on your cmd, try :
> "C:\PathTo\Chrome.exe" --allow-file-access-from-files
Source
EDIT :
As I see on your question, don't forget that Windows is a little bit similar to Unix, so when you type "chrome ...", cmd will search for Chrome in the PATH, but in general the Chrome folder isn't on the PATH. Also, you don't specify an extension for your executable... So if you move to Chrome's folder, this command will probably work too :
> .\chrome.exe --allow-file-access-from-files
You may want to try Web Server for Chrome, which serves web pages from a local folder using HTTP. It's simple to use and would avoid the flag, which, as someone mentioned above, might make your file system vulnerable.
As of this writing, in OS X, it will usually look like this
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --allow-file-access-from-files
If you are a freak like me, and put your apps in ~/Applications, then it will be
"/Users/yougohere/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --allow-file-access-from-files
If neither of those are working, then type chrome://version in your Chrome address bar, and it will tell you what "command line" invocation you should be using. Just add --allow-file-access-from-files to that.
Don't do this! You're opening your machine to attacks. Instead run a local server. It's as easy as opening a shell/terminal/commandline and typing
cd path/to/files
python -m SimpleHTTPServer
Then pointing your browser to
http://localhost:8000
If you find it's too slow consider this solution
If you are using a mac you can use the following terminal command:
open -a Google\ Chrome --args --allow-file-access-from-files
Quit (force quit) all instances of chrome. Otherwise the below command will not work.
open -a "Google Chrome" --args --allow-file-access-from-files
Executing this command in terminal will open Chrome regardless of where it is installed.
REM Kill all existing instance of chrome
taskkill /F /IM chrome.exe /T
REM directory path where chrome.exe is located
set chromeLocation="C:\Program Files (x86)\Google\Chrome\Application"
cd %chromeLocation%
cd c:
start chrome.exe --allow-file-access-from-files
save above lines as .bat file
Depending on the file which will be put into filesystem, as long as that file is not a malware, then that would be safe.
But don't worry to write/read file(s) to File System directory, cause you can tighten that directory security (include it's inheritance) by give a proper access right and security restriction. eg: read/write/modify.
By default, File System, Local Storage, and Storage directory are located on "\Users[Current User]\AppData\Local\Google\Chrome\User Data\Default" directory.
However you can customize it by using "--user-data-dir" flag.
And this is a sample:
"C:\Program Files (x86)\Google\Application\chrome.exe" --user-data-dir="C:\Chrome_Data\OO7" --allow-file-access-from-files
Hope this helps anyone.
Well there is quick to run a html which needs permission or blocked by CORS
Just simply open the folder using VSCODE and install an extension called "live server"
And then just click on the bottom which says go live, thats it.
Screenshot
On windows:
chrome --allow-file-access-from-files file:///C:/test%20-%203.html
On linux:
google-chrome --allow-file-access-from-files file:///C:/test%20-%203.html
I tried using the allow file access, but thought there was a better way. Found code that will pipe local file share files through http.
https://gist.github.com/andrii-riabchun/07f854939ce776f6e54ba6b64f43cc92
I added some edit suggestions. I used the revision code along with my edit suggestions. Also added a simple script to create index.html from ls ran on the webserver.
I use
google-chrome-beta --user-data-dir="/tmp/tmp-chrome-user-data-dir" --allow-file-access-from-files --disable-web-security file:///home/myuser/projects/myproject/myhtml.html
to disable has been blocked by CORS policy when I try to request('file://xxx')
I'm trying to run my apps, but it is suddenly getting this error. I don't know why. I haven't changed anything.
Error 3 Error : DEP0500 : The folder "C:\Users\Shane\Documents\Visual Studio 2012\Projects\App2\App2\bin\Debug\AppX" could not be deleted.
Access to the path 'resources.pri' is denied,
I'm running VS2012 as Administrator and I've removed everything from the debug directory. I can't find anything on how to get rid of this error.
Looks like this is a bug with Parallels. If you kill prl_cc.exe the files should be unlocked.
Are you sure all instances of your app, including those in the simulator are terminated?
If you are using Windows on Mac with Parallels, it seems to be a known issue and there is a workaround here:
http://forum.parallels.com/showthread.php?267785-Parallels-Control-Center-is-incorrectly-locking-my-pri-files
I have a javascript code that checks whether a point is inside a polygon. I am trying to debug it with node-inspector, following these steps:
In the first window:
PS Z:\dev> node-inspector.cmd
info - socket.io started
visit http://0.0.0.0:8080/debug?port=5858 to start debugging
In the second window:
PS Z:\dev\poc\SDR> node --debug-brk .\IsPointInside.js
debugger listening on port 5858
Now I navigate to http://localhost:8080/debug?port=5858 in my Chrome browser.
What happens is that Chrome gets stuck waiting for localhost presenting me the empty screen.
I must add that I have successfully debugged the r.js javascript optimizer using the same steps before, but now I cannot debug it as well.
according to this there seems to be an order in which the components should be started.
Its application -> debugger -> web browser.
Could be your issue.
You can also send a "debug on demand" command. Use this command:
kill -USR1 $PROCESSID
I started playing around with JSTestDriver tonight and got it to work without too many issues. I attempt use the --browser switch to have it autocapture chrome or firefox on my local system here; however, it always threw an error saying "permission denied". I attempted to run the command using sudo and still the same thing.
java -jar $JSTESTDRIVER_HOME/JsTestDriver-1.3.2.jar --port 4224 --browser /Applications/Firefox.app
I can open Firefox using the above path from Terminal so know that the path is valid.
I feel like I'm missing something simple and small. Has anyone seen this issue and know what I'm missing?
UPDATE 1:
Tried to move Firefox out of the /Applications/ directory and still same issue even running under the super user account (using sudo).
Found my issue.
While /Applications/Firefox.app is what's shown the GUI, the actual executable script for the program is in the /Applications/Firefox.app/Contents/MacOS/firefox file.
Changing the path to the deeper folder resolved the issue.
When I call window.open() from JavaScript, I get the error dialog with the message "Line: xxx Error: No such interface supported"
Google leads me to websites referring as far back as IE4 saying that I need to run regsrvr32 on several DLLs.
Is there a better solution?
EDIT: exact code requested
<html><head>
<script type="text/javascript">
function windowOpen() {
window.open("http://localhost/mysite/mypage.asp", "myWindowName", "");
}
</script></head>
<body>
<button onclick="windowOpen();return false;">Hi There</button>
</body></html>
EDIT2:
The provided answers all go back to IE4/Win95 days. I mean, seriously?? Regardless, I disabled Smooth scrolling in IE8 (!!!) and also attempted to register the controls listed in the kb article mentioned by Shoban, but got an error attempting to register shdocvw.dll (The module "shdocvw.dll" was loaded but the entry-point DllRegisterServer was not found. Make sure that "shdocvw.dll" is a valid DLL or OCX file and then try again.)
First of all, try just the following and see if the problem goes away:
OPTION 1
Step 1: Fix IE
Copy and paste the following in the command prompt running as an admin, then press :
"%systemroot%\system32\regsvr32.exe" "C:\Program Files\Internet Explorer\ieproxy.dll"
If you are running 64 bit windows, try this:
"%systemroot%\system32\regsvr32.exe" "C:\Program Files> (x86)\Internet Explorer\ieproxy.dll"
OPTION 2
If the above doesn't work, try the following two steps.
Step 1: Re-register all DLLs
Open a command prompt as an admin. Type the following command:
FOR /R C:\ %G IN (*.dll) DO "%systemroot%\system32\regsvr32.exe" /s "%G"
You will probably get some error windows popping up at this point, just ignore them all and close them when the command prompt stops churning.
Step 2: Fix IE
Copy and paste the following in the command prompt running as an admin, then press :
"%systemroot%\system32\regsvr32.exe" "C:\Program Files\Internet Explorer\ieproxy.dll"
If you are running 64 bit windows, try this:
"%systemroot%\system32\regsvr32.exe" "C:\Program Files> (x86)\Internet Explorer\ieproxy.dll"
Sources:
http://social.technet.microsoft.com/Forums/en-US/w7itproui/thread/99e4ab4f-165d-4691-90dd-ab41a05d26a2
http://forums.techguy.org/all-other-software/568737-solved-internet-explorer-wont-start.html
Check if there are any toolbar installed. I had the same problem and this caused because I run fiddler http debugging proxy
On Win10 x64 with IE11 this solved my problem:
regsvr32 "C:\Windows\SysWOW64\ieproxy.dll"