APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

EJSS opening in safari instead of chrome, not running local file:/// address post and replies

Return to the EJSS opening in safari instead of chrome, not running local file:/// address thread
Login to post to this thread

EJSS opening in safari instead of chrome, not opening file:/// address - February 4 at 4:19:PM
David Joiner
5 Posts

I'm trying to run the java script version of EJS in MacOS X 10.15.3, and am getting the same issue with version 5.3 or 6. I press play, and despite chrome being my default browser safari opens. When it does, none of the javascript runs, even though I have javascript enabled in the browser.

I suspect a security issue with safari and the the file:/// protocol being used.

Anyone have the same issue? suggestions?

Thanks!


Replies to EJSS opening in safari instead of chrome, not opening file:/// address

Re: EJSS opening in safari instead of chrome, not opening file:/// address - February 04 8:26:PM
Wolfgang
125 Posts

EJSS Javascript simulation pages are xhtml, not html pages. Are you certain that Chrome is the default browser for xhtml pages?

Also, try exporting the EJSS simulation as a zip file.  Then unzip that archive and see if the simulation page runs.

Finally, check the browser's JavaScript console to see if there are any error messages.



Re: EJSS opening in safari instead of chrome, not opening file:/// address - February 04 9:35:PM
lookang Avatar
lookang
209 Posts

https://youtu.be/24gB0ge_LxA A YouTube that explains how to set the browser preview 

How to enable Chrome/Safari/Firefox browser as the preferred Easy JavaScript Simulation editor Preview.
select Ejs Options ( right bottom last second icon)
Running tab (First)
Preview command: open -a "Safari" // MacOSX Example
open -a "Google Chrome" // MacOSX Example
open -a "FirefoxDeveloperEdition" // MacOSX Example
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" // Windows Example
"C:\Program Files\Internet Explorer\iexplore.exe" // Windows Example
"C:\Program Files (x86)\Aurora\firefox.exe" // Windows Example
google-chrome // Linux Example
firefox // Linux Example


OSP@SG blog
OSP@SG Digital Library


Re: EJSS opening in safari instead of chrome, not opening file:/// address - February 05 7:40:AM
Wolfgang
125 Posts

If the EJSS Preview option is set to SYSTEM, the simulation should use the default browser for the xhtml file type.

If you want to use Safari, you should also enable Developer Tools in Safari advanced Preferences.  Then set the EJSS Display option to:  open -a "Safari"

You may get a warning message about the file Protocol the first time EJSS tries to open a simulation page in Safari.  Close this warning dialog and run the simulation a section time and it should work.

Finally, always check the browser Console for error messages.  Every browser has a console, but it may be hard to access unless you enable developer tools for that browser.

Attached File: SafariSecurity.png



The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics