Getting "Unsafe JavaScript attempt to access frame" when running specs from the command line
See original GitHub issueI get error running bundle exec rake spec:javascript
…
Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///Users/fifigyuri/proj/vendor/bundle/ruby/2.2.0/gems/jasmine-rails-0.10.5/lib/assets/javascripts/jasmine-runner.js. Domains, protocols and ports must match.
The specs pass from the browser without any error showing up in the console, but they fail with the above error from command line. It seems like some CORS error.
I use phamtonjs 1.9.8, the lastest jasmine-rails.
Issue Analytics
- State:
- Created 9 years ago
- Comments:20 (7 by maintainers)
Top Results From Across the Web
"Unsafe JavaScript attempt to access frame with URL..." error ...
I tried this from the command line: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security and it seemed to work! but it said it ...
Read more >39561 - "Unsafe JavaScript attempt to access frame with URL ...
I've attached a sample html frameset which displays the problem when run in Chrome, but not in Firefox or IE. I think that...
Read more >What is Cross-site Scripting and How Can You Fix it? - Acunetix
This article will show you how Cross-site Scripting attacks work and how you can use Acunetix WVS to protect your website against them....
Read more >Chrome error "Unsafe JavaScript attempt to access frame with ...
My org has installed a managed package that contains a Home Page component that defines an HTML area. The HTML for the component...
Read more >Node.js v19.3.0 Documentation
allocUnsafe (). The --zero-fill-buffers command-line option; What makes Buffer. ... Enabling; Accessing the main module; Package manager tips ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jasper-lyons Thanks for the tip.
After updating jasmine.yml with your suggested change, I’m no longer seeing “Unsafe JavaScript attempt …”.
I know this is closed but for anyone looking for a cleaner solution:
jasmine.yml
This will cause jasmine-rails to use the system defined phantomjs command
Mac \w homebrew: