PhantomJS hangs for a long time saying “Asynchronous Sessions clean-up phase starting NOW”

后端 未结 4 778
没有蜡笔的小新
没有蜡笔的小新 2021-02-06 20:41

Here is a screenshot:

\"PhantomJS

task :  Codeception PHP Testing Framewor         


        
相关标签:
4条回答
  • 2021-02-06 21:21

    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);
    
    0 讨论(0)
  • 2021-02-06 21:28

    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

    0 讨论(0)
  • 2021-02-06 21:30

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

    DesiredCapabilities caps = new DesiredCapabilities();
    caps.setCapability("takesScreenshot", false);
    
    0 讨论(0)
  • 2021-02-06 21:42

    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 讨论(0)
提交回复
热议问题