Closed mcalthrop closed 8 years ago
Yes, the same for me, if i delete the ignoreSynchronization and the sleep methods, it fails, but works fine with chrome.
I have experienced a similar but not exact issues. After tried for half day, I finally get my situation working using the PhantomJS official website's executable.
I downloaded the phantomjs.exe directly from http://phantomjs.org/download.html and then copy the exe on the same directory as my gruntfile (which is on my PATH), such that the exe get executed, but not the nodejs version of phantomJs that installed by npm. Since phantomjs is on PATH, I don't need the 'phantomjs.binary.path' setting (remove it).
When I run grunt, the firewall dialogue pop up asking me to allow phantomjs.exe access on network (I didn't take the screenshot, but here is a similar one, just use your imagination to replace that little IE icon with PhantomJs 's ghost icon yourself, you get what I mean)
After clicking allow, it is all working fine.
So I am not sure if it is related to firewall setting or is in fact the npm installed phantomJS package is not fully working. However, I am able to run karma with phantomJS using the karma-phantomjs-launcher which is installed by npm.
Hi folks, I just want to give an update here. Protractor does NOT test against PhantomJS in our CI environment, and while we'll try to address issues and look at pull requests that improve PhantomJS problems, it is not a high issue for the core team to work on personally.
In issue detro/ghostdriver#328 the phantom devs said some of this instability would be addressed with PhantomJS 2.0.
I am getting same error when running my protractor cucumber js framework using phantomjs. Error while running module script protractorBaseModule_: Error communicating with the remote browser. It may have died. Does anyone know whether this issue has been fixed?
I have been working on protractor and when I used firefox browser to run my test specs on all my tests have passed. But when I used phantomjs to all my test specs that have been passed on firefox have failed and returns an error code 1. Does any one who have faced such an issue and fix it?
I experience reproducable this crash on a CI server after upgrading from PhantomJS 1.9.18 to 1.9.19.
build 30-Nov-2015 16:18:20 /data/jira/bamboo-home/xml-data/build-dir/XX-DASH-CLIENTCI/client/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108
build 30-Nov-2015 16:18:20 var template = new Error(this.message);
build 30-Nov-2015 16:18:20 ^
build 30-Nov-2015 16:18:20 UnknownError: Session [8a8ef2a0-9775-11e5-ad8a-89605c3acb91] was terminated due to FORWARDING_TO_NODE_FAILED
build 30-Nov-2015 16:18:20 at new bot.Error (/data/jira/bamboo-home/xml-data/build-dir/XX-DASH-CLIENTCI/client/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108:18)
build 30-Nov-2015 16:18:20 at Object.bot.response.checkResponse (/data/jira/bamboo-home/xml-data/build-dir/XX-DASH-CLIENTCI/client/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:109:9)
build 30-Nov-2015 16:18:20 at /data/jira/bamboo-home/xml-data/build-dir/XX-DASH-CLIENTCI/client/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:379:20
...
build 30-Nov-2015 16:18:20 [launcher] Process exited with error code 1
Interestingly it does not crash if I execute the very same command in a terminal session on the very same server nor on my own PC.
Downgrading did improve the likelihood for success, but not fix it.
Same issue with Phantomjs 1.9.19 but it works with 1.9.18
I was having the same issue with PhantomJS 1.9.x, but it appears* to be fixed by upgrading to the latest version of PhantomJS (2.1.3 currently). If this was the fix, it appears the issue lies with PhantomJS. Further, since it appears to be fixable by upgrading, could this issue potentially be closed?
*no failures in 10 runs of a suite that failed on ~40% of runs with 1.9.x. If this doesn't seem significant enough to justify the label "fixed", I can do more runs.
As @cjeffers said, after upgrading to PhantomJS 2.1.3, this issue doesn't happened anymore.
Yes, this is fixed by upgrade to PhantomJS 2 https://github.com/detro/ghostdriver/issues/328#issuecomment-44309690
I'll go ahead and close the loop here because upgrading to PhantomJS 2 resolves this 👏 👏 🎊 🎺
I'd also like to restate what Julie mentioned earlier:
Protractor does NOT test against PhantomJS in our CI environment, and while we'll try to address issues and look at pull requests that improve PhantomJS problems, it is not a high issue for the core team to work on personally.
If anyone encounters additional issues with Phantom, please try to raise an issue on the Phantom queue and resolve it there. Thanks, y'all are awesome! 😺
I have been successfully running a fairly comprehensive suite of Protractor e2e tests using Chrome on OSX (Mavericks: 10.9.2).
We have a technical requirement to run these tests headlessly, so I swapped in PhantomJS instead of Chrome, and after 20 seconds (consistently), I get the following error:
Now for some more detailed information.
Here is the full error output from the
grunt
task I am running:Package versions:
Contents of
protractor.conf.js
:I have tried installing version
~1.9.7-1
of thephantomjs
package independently of the one thatprotractor
depends upon, and updating thephantomjs.binary.path
property inprotractor.conf.js
, but I get the same result.After spending far too long debugging the JS to try to isolate where the error is occurring, I know that it is falling over in
runner.js
.Specifically in
Runner.prototype.runJasmine_()
, the anonymous function passed towebdriver.promise.controlFlow().execute()
here is never executed.Can anyone help?
Let me know if you need more information.
Matt