0

This only started happening after I used casperjs to run a .coffee script which attempted to access about:blank, but now these warnings are popping up even when I run .js scripts - even if there is nothing in the script referring to about:blank!

Here is the script:

casper = require('casper').create(
  logLevel: 'debug'
  verbose: true)
casper.start 'http://www.google.com/'
casper.then ->
  @echo 'Step 1'
casper.run()

Here is the log output:

[info] [phantom] Starting...
[info] [phantom] Running suite: 3 steps
[debug] [phantom] opening url: http://www.google.com/, HTTP GET
[debug] [phantom] Navigation requested: url=http://www.google.com/, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to "http://www.google.com/"
[debug] [phantom] Successfully injected Casper client-side utilities
[debug] [phantom] start page is loaded
[info] [phantom] Step anonymous 3/3 http://www.google.com/ (HTTP 200)
[info] [phantom] Step anonymous 3/3: done in 340ms.
[info] [phantom] Done 3 steps in 363ms
Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///usr/local/Cellar/casperjs/1.1-beta3/libexec/bin/bootstrap.js. Domains, protocols and ports must match.

Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///usr/local/Cellar/casperjs/1.1-beta3/libexec/bin/bootstrap.js. Domains, protocols and ports must match.

Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///usr/local/Cellar/casperjs/1.1-beta3/libexec/bin/bootstrap.js. Domains, protocols and ports must match.
dsp_099
  • 5,801
  • 17
  • 72
  • 128
  • Oh, you're right. It looks like casper installs its own version of phantom, regardless of which one you have installed via homebrew. – dsp_099 Dec 08 '15 at 20:49
  • 1
    You should be able to temporarily change the version with `set PHANTOMJS_EXECUTABLE=/path/to/phantomjsx` or simply `set PHANTOMJS_EXECUTABLE=phantomjsx` if it's in the PATH. – Artjom B. Dec 08 '15 at 21:37
  • @ArtjomB. Thanks Artjom, I happened to have deleted the homebrew install and compiled both from source which I think is the way to go. – dsp_099 Dec 08 '15 at 21:44

0 Answers0