Skip to content

Conversation

@cgutierrez
Copy link

May or may not be of interest. I've updated the library to use the latest version of the Phantom API. This originally stemmed from receiving the following error:

Running "svgtoolkit:icons" (svgtoolkit) task
phantom stdout: NETWORK_ERR: XMLHttpRequest Exception 101: A network error occurred in synchronous requests.


phantom stdout:   phantomjs://code/shim.js:1815 in send
  phantomjs://code/shim.js:1815 in _start
  phantomjs://code/shim.js:1842

The fix for this was to set the --web-security=no flag.

@tlatulimp
Copy link

Thank you! After 2 days spent tearing my hair out (phantomjs < v2 not compatible with OSX Sierra) I ended up here and you saved the day!

@pminf
Copy link

pminf commented Aug 28, 2017

Hey, any chance to merge this ticket? Phantomjs v1.x has not been updated since 2014-01-25 so we had to switch to version 2 in most environments.

@alexan
Copy link

alexan commented Dec 6, 2017

why does this not get merged?

@kjr247
Copy link

kjr247 commented Jul 23, 2018

This is not my fix.

@damien-murphy
Copy link

damien-murphy commented Sep 7, 2018

This can be fixed by just passing '--web-security=no' to phantom.create() as the first param in init-phantomjs.js

https://github.com/iconic/grunt-svg-toolkit/blob/master/tasks/lib/init-phantomjs.js#L16

phantom.create('--web-security=no', function (ph) {
      data.logger('New PhantomJS instance created.');

      data.phantomjs = ph;
      done(null, data);
    }, {
      dnodeOpts: {
        weak: false
      }
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants