Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to PhantomJS 2.1.1 #488

Closed
macbre opened this issue Feb 1, 2015 · 28 comments
Closed

Upgrade to PhantomJS 2.1.1 #488

macbre opened this issue Feb 1, 2015 · 28 comments

Comments

@macbre
Copy link
Owner

macbre commented Feb 1, 2015

ariya/phantomjs#12902

@macbre macbre self-assigned this Feb 1, 2015
@macbre macbre added this to the Roadmap milestone Feb 1, 2015
@macbre macbre changed the title Upgrade to PhantomJS 2.0 Upgrade to PhantomJS 2.1 Feb 8, 2015
@macbre
Copy link
Owner Author

macbre commented Feb 8, 2015

Waiting for fixes for Linux binaries - ariya/phantomjs#12970

@skibz
Copy link

skibz commented Mar 19, 2015

any estimate on this?
those damn ssl bugs with phantom are doing my head in.
>:(

@macbre
Copy link
Owner Author

macbre commented Mar 19, 2015

Waiting for phantomjs issue being resolved

@macbre
Copy link
Owner Author

macbre commented May 27, 2015

[email protected] uses these binaries

@skibz
Copy link

skibz commented May 28, 2015

what do these new binaries afford us?

@Martinspire
Copy link

Well, for starters 1.9.1 seems to currently fail to install on windows due to ws version failing currently. Which is due to socket.io having issues. 2.x doesn't have the issue

@macbre macbre changed the title Upgrade to PhantomJS 2.1 Upgrade to PhantomJS 2.x Jun 5, 2015
@macbre
Copy link
Owner Author

macbre commented Jun 5, 2015

package.json:

+    "phantomjs": "Medium/phantomjs#version-2.0",
$ npm update phantomjs 
/
> [email protected] install /home/macbre/src/github/phantomas/node_modules/phantomjs
> node install.js

There is no prebuilt binary for your platform: linux x64 3.13.0-54-generic
You should install phantomjs from source, put the binary on your PATH, and try again

@macbre
Copy link
Owner Author

macbre commented Jun 6, 2015

Forked phantomjs npm module to use the latest PhantomJS 2.0 binaries (unofficial ones) and Ubuntu 12.04 binaries for Travis CI.

@macbre macbre modified the milestones: Roadmap, v1.12 Jun 6, 2015
@Martinspire
Copy link

So we're getting some progress?

@konklone
Copy link

konklone commented Jul 1, 2015

I believe PhantomJS 2 has better support for SNI -- the lack of support in PhantomJS 1 makes phantomas fail on HTTPS sites which require SNI.

@macbre
Copy link
Owner Author

macbre commented Jul 1, 2015

@Martinspire, no progress. Still waiting for 32-bit and Debian-compatible binaries.

I think we'll end up forking phantomjs npm module and compiling "our" own PhantomJS 2.0 binaries with statically-linked libraries.

@macbre
Copy link
Owner Author

macbre commented Jul 3, 2015

Good news, everyone :)

I've managed to compile PhantomJS 2 binary using Docker (running Ubuntu 14.04 image) with statically-linked libraries (#540 / macbre/phantomjs2-npm#1). It runs smoothly on Debian 8.1 amd64.

@konklone
Copy link

konklone commented Jul 3, 2015

That's fantastic! I added myself as a subscriber to #531, and will happily test phantomas out on a batch of .gov sites I watch, once it's out.

@gmetais
Copy link
Contributor

gmetais commented Jul 3, 2015

👍

@macbre
Copy link
Owner Author

macbre commented Jul 11, 2015

@konklone, @gmetais - #531 is now merged into devel branch. You can use PhantomJS 2.0.0 by settings an environment variable:

PHANTOMAS_ENGINE=webkit2 phantomas "http://example.com"

or passing --engine=webkit2 option.

webkit (i.e. PhantomJS 1.9.x) will still be a default because of huge problems with Linux binaries for PhantomJS 2.0.0.

@gmetais
Copy link
Contributor

gmetais commented Jul 18, 2015

Thanks for your great work!

It fails on OSX, here is the debug log:

DEBUG=* node bin/phantomas.js http://www.google.fr --engine=webkit2
  optimist:config parse: ["node","/Users/gaelmetais/Documents/GitHub/phantomas/bin/phantomas.js","http://www.google.fr","--engine=webkit2"] +0ms
  optimist:config options: {"_":["node","/Users/gaelmetais/Documents/GitHub/phantomas/bin/phantomas.js","http://www.google.fr"],"version":false,"V":false,"help":false,"h":false,"verbose":false,"v":false,"disable-js":false,"no-externals":false,"scroll":false,"spy-eval":false,"stop-at-onload":false,"analyze-css":false,"colors":false,"film-strip":false,"page-source":false,"progress":false,"silent":false,"engine":"webkit2","ssl-protocol":"any","timeout":15,"reporter":"plain","R":"plain","format":"plain","$0":"node ./bin/phantomas.js"} +1ms
  phantomas:cli Preparing 1 run(s)... +1ms
  phantomas nodejs v0.10.33 +1ms
  phantomas phantomas v1.11.0 installed in /Users/gaelmetais/Documents/GitHub/phantomas +0ms
  phantomas URL: <http://www.google.fr> +0ms
  phantomas Options: {"version":false,"V":false,"help":false,"h":false,"verbose":false,"v":false,"disable-js":false,"no-externals":false,"scroll":false,"spy-eval":false,"stop-at-onload":false,"analyze-css":false,"colors":false,"film-strip":false,"page-source":false,"progress":false,"silent":false,"engine":"webkit2","ssl-protocol":"any","timeout":15,"reporter":"plain","R":"plain","format":"plain"} +0ms
  phantomas Temporary directory: /var/folders/5h/_fm174694_x75lcs7y9tt9xc0000gn/T//phantomas/d5e9d76c-9769-454b-8896-64195879e96f/ +4ms
  phantomas:engines Engine "webkit": PhantomJS v1.9.8 installed in /Users/gaelmetais/Documents/GitHub/phantomas/node_modules/phantomjs/lib/phantom/bin/phantomjs +3ms
  phantomas:engines Engine "webkit2": PhantomJS v2.0.0 installed in /Users/gaelmetais/Documents/GitHub/phantomas/node_modules/phantomjs2/lib/phantom/bin/phantomjs +6ms
  phantomas:engines Engine "gecko": SlimerJS v0.9.5 installed in /Users/gaelmetais/Documents/GitHub/phantomas/node_modules/slimerjs/lib/slimer/slimerjs +5ms
  phantomas:engines Running /Users/gaelmetais/Documents/GitHub/phantomas/scripts/phantomas.js (using PhantomJS) +1ms
  phantomas:engines Passing phantomas options: {"version":false,"V":false,"help":false,"h":false,"verbose":false,"v":false,"disable-js":false,"no-externals":false,"scroll":false,"spy-eval":false,"stop-at-onload":false,"analyze-css":false,"colors":false,"film-strip":false,"page-source":false,"progress":false,"silent":false,"engine":"webkit2","timeout":15,"reporter":"plain","R":"plain","format":"plain","url":"http://www.google.fr","user-agent":"phantomas/1.11.0 (PhantomJS/2.0.0; darwin x64)"} +0ms
  phantomas:engines Passing engine options: ["--debug=false","--ssl-protocol=any"] +0ms
  phantomas Spawned with pid #52344 +4ms
phantomas: (255) Engine crashed unexpectedly
  phantomas:results Process returned code #255 +6ms
  phantomas:results Error when parsing JSON (SyntaxError: Unexpected end of input) +0ms
  phantomas:runs results [1]: [[{},null]] +1ms
  phantomas:runs Run #1 did not complete - err #255 +0ms
  phantomas:runs err: "255" +1ms
  phantomas:runs Exiting with code #255 +0ms

It's working correctly in an Ubuntu VM, I'm going to make some comparison tests between 1.9 and 2.0 :)

@gmetais
Copy link
Contributor

gmetais commented Jul 18, 2015

This is working great on Linux.

Fixes these bugs:

  • SSL problems on some websites (error 254)
  • JS errors on ECMAScript 5 such as with 'Function.prototype.bind'

@macbre
Copy link
Owner Author

macbre commented Jul 18, 2015

Great!

As for the OSX problems - can you run phantomas with --debug argument and provide the output?

@gmetais
Copy link
Contributor

gmetais commented Jul 18, 2015

There's not more output with the --debug argument:

node bin/phantomas.js http://www.google.fr --engine=webkit2 --debug
  phantomas: (255) Engine crashed unexpectedly

@macbre
Copy link
Owner Author

macbre commented Jul 19, 2015

@gmetais, it seems that PhantomJS segfaults on OSX. Can you reproduce this issue on different URLs?

@gmetais
Copy link
Contributor

gmetais commented Jul 19, 2015

On any URL. In fact, it fails so quickly (less than 250ms, I guess) that it probably doesn't have the time to start calling the URL.

@gmetais
Copy link
Contributor

gmetais commented Sep 4, 2015

Hey @macbre!

For your information, the public http://yellowlab.tools instance has been using PhantomJS 2 for one week, testing hundreds of websites, and no-one has complained yet! (It's using your devel branch.)

Just wanted to share this good news!

@macbre
Copy link
Owner Author

macbre commented Sep 4, 2015

Glad to hear that :)

@macbre macbre modified the milestones: Roadmap, v1.12 Sep 5, 2015
@macbre
Copy link
Owner Author

macbre commented Sep 5, 2015

Since #531 PhantomJS 2.0 is one of supported engines.

Because of problems with statically linked binaries for Linux, I'm not going to make PhantomJS 2 a default engine, yet.

@macbre macbre changed the title Upgrade to PhantomJS 2.x Upgrade to PhantomJS 2.1 Jan 27, 2016
@macbre
Copy link
Owner Author

macbre commented Jan 27, 2016

ariya/phantomjs#12970 - PhantomJS 2.1 released!

@macbre macbre modified the milestones: v1.14, Roadmap Jan 30, 2016
@macbre macbre changed the title Upgrade to PhantomJS 2.1 Upgrade to PhantomJS 2.1.1 Jan 30, 2016
@macbre
Copy link
Owner Author

macbre commented Jan 30, 2016

It did take a while, but we can now use official binaries for PhantomJS 2.x,

@skibz
Copy link

skibz commented Jan 30, 2016

😌

@kkmoslehpour
Copy link

kkmoslehpour commented Jun 12, 2020

Was there a resolution for this I'm getting the following issue (phantomjs 2.1.1, and phantomas v1.20.1):

phantomas http://google.com

/usr/lib/node_modules/phantomas/lib/engines.js:57
			throw 'Engine "' + this.options.engine + '" not found!';
			^
Engine "webkit2" not found!
(Use `node --trace-uncaught ...` to show where the exception was thrown)

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

No branches or pull requests

6 participants