48

Here is a screenshot:

PhantomJS waiting for some calls

task :  Codeception PHP Testing Framework v1.6.2
Powered by PHPUnit 3.7.19 by Sebastian Bergmann.

Suite selenium_acceptance started

Trying to see the welcome page of newweather (welcomeCept.php)

issue : it sits as it is and waiting for phantomJS to respond and below is what phantomJS screen is showing :

[INFO  - 2014-03-13T01:42:51.575Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: ca14e740-aa50-11e3-bb6b-75468ba86108

[INFO  - 2014-03-13T01:47:42.806Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW

[INFO  - 2014-03-13T01:52:42.806Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW

[INFO  - 2014-03-13T01:57:42.806Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW

And it sits on the screen no results.

This is what I use:

  • PhantomJS version: 1.9.7
  • runs on port: 4444
Loko
  • 5,956
  • 11
  • 43
  • 75
shab
  • 939
  • 1
  • 13
  • 29
  • Please give us more info: 1. your OS and version, 2. phantom 32 or 64 bit, 3. your phantom script. Or your problem is solved? – stepozer Jan 27 '15 at 05:53
  • Has anyone found a working solution to this problem. I am running phantomJS 1.9.2 on RHEL 5.6 64 bit OS, with 16GB RAM. Can someone please shout out the real cause behind this issue? – Iowa Feb 12 '15 at 14:46
  • Shab: @stepozer asked for a clarification of your operating system. Regardless of whether this is still a problem for you personally, would you edit your question? It is evidently a problem for other people, and it would be good to help them. – halfer Feb 24 '15 at 00:48
  • I did read everyone has this who's using PhantomJS 1.9.2 and above. That's all I can say. – Loko Mar 11 '15 at 11:09
  • Might want to take a look at the answer here: http://stackoverflow.com/questions/15345767/repeating-asynchronous-sessions-cleanup-phase-starting-now Also on github since 2013: https://github.com/ariya/phantomjs/issues/11526 – Decypher Mar 11 '15 at 14:13
  • The error is caused by some calls in your code to external sources. Try stubbing out external calls when testing. – karlingen Apr 24 '15 at 09:10

4 Answers4

1

Only semi-related answer i was able to find was the following:

"The Asynchronous Sessions cleanup phase starting NOW ... was caused by some calls to external feeds, these were intermittently slow. This phase must have been waiting for these calls, which were timing out, but PhantomJS sat there waiting for a very, very long time.

Removing these calls when testing (with a wee bit of JavaScript, if host is localhost then use a dummy object) solved the problem."

Found here: Repeating "Asynchronous Sessions cleanup phase starting NOW"

So the issue is most likely caused by external feed/API calls timing out.

Github issue: https://github.com/ariya/phantomjs/issues/11526

Community
  • 1
  • 1
Sharn White
  • 615
  • 3
  • 15
0

The workaround that worked for me is to set the takesScreenshot capability to false.

DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("takesScreenshot", false);
Vjeetje
  • 4,914
  • 3
  • 31
  • 52
  • This is still not the solution. I tried setting pretty much every variable related to the file system as well as performing pretty much every solution here including using close() and then quit(). The answer may be to separate asynchronous tests with a container which I am trying now. – Andrew Scott Evans Oct 19 '16 at 16:20
0

I got same problem an year ago. I found one dirty hack. I use other server with nginx where i proxied all queries to needed test build. I redirected my tests to proxy server and now I haven't this error. Tests works every day since April 2016 and no errors.

0

In Java, I used below code and it got solved

DesiredCapabilities caps = new DesiredCapabilities();
Change - WebDriver driver = new PhantomJSDriver(caps);
with - this.driver = new PhantomJSDriver(caps);
PrakashG
  • 1,625
  • 5
  • 18
  • 27