PhantomJS hangs for a long time, saying, "Asynchronous session cleanup phase, starting NOW"

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 he does not see any results on the screen.

This is what I use:

  • PhantomJS Version: 1.9.7
  • works on port: 4444
+48
asynchronous php selenium phantomjs
Mar 13 '14 at 2:43
source share
4 answers

Only the semi-dependent answer that I could find was as follows:

β€œThe phase of clearing asynchronous sessions that starts NOW ... was caused by some calls to external channels, they were too slow. This phase must have been waiting for these calls, which were timing, but PhantomJS sat there waiting for a very, very long time.

Removing these calls during testing (with a bit of JavaScript if the host is localhost and then using a dummy object) solved the problem. "

Found here: Repeat "Asynchronous Session Cleanup Phase Starting NOW"

So the problem is most likely caused by the allocation of external feeds / API calls.

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

+1
Apr 28 '15 at 0:12
source share
β€” -

The workaround that worked for me is to set the takeScreenshot parameter to false.

 DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability("takesScreenshot", false); 
0
Jan 23 '16 at 20:27
source share

I have the same problem a year ago. I found one dirty hack. I use another server with nginx, where I proxied all requests to the desired test assembly. I redirected my tests to a proxy server and now I do not have this error. Tests have been working every day since April 2016, and no errors.

0
Sep 10 '17 at 8:22
source share

In Java, I used the code below and it was resolved

 DesiredCapabilities caps = new DesiredCapabilities(); Change - WebDriver driver = new PhantomJSDriver(caps); with - this.driver = new PhantomJSDriver(caps); 
0
Aug 20 '19 at 8:36
source share



All Articles