Closed floriansemm closed 4 years ago
Same situation for us (behat + selenium2 driver + phantomjs webdriver) and we have the same problem!!! The strange thing is that the problem, for now, occurs only on our continuous integration environment (Jenkins) and not on our dev machines... Do you have any suggestions?
This is a good point: the debug-log was generated during a jenkins-build
I have the same problem here on my MacOS env and I have no solution :(
@startupz which phantomJS version do you use?
I used 1.9.2 so I came back to 1.9.1 and it works for now :/
same problem here on using behat-selenium2-phantomjs.. I was using 1.9.2 It works after downgrading to 1.9.1(but its deprecated).
this seems like the same issue but I cant follow the solution :( http://stackoverflow.com/questions/15345767/repeating-asynchronous-sessions-cleanup-phase-starting-now
Confirmed regression; my Codeception Acceptance tests works when run on v1.9.1; but hangs on v1.9.2; tested both on Linux and Windows.
Confirmed from my side as well: downgrading to v1.9.1 immediately solves frequent "_cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW" hangs.
Running linux x86_64 versions, from maven on the command-line.
Hi all,
I have the same problem even after downgrading to version 1.9.1. Still got "Asynchronous Sessions clean-up phase starting NOW" messages occasionally. (Although it has a bit lower chance to happen than version 1.9.2)
Running on Ubuntu 12.04.3 LTS 64-bit, with GhostDriver.
Same problem here with version 1.9.1 and ghostdriver 1.0.3 on a jenkins CI machine. It basically makes phantomjs useless for it results in a very unstable build.
Running on Ubuntu 12.04.3 LTS 64-bit, with GhostDriver.
I am having problem here on using behat-selenium2-phantomjs version 1.9.2
It works after downgrading to 1.9.1(but its deprecated).
How could we track the issue and most importantly how to fix it.....Thanks
I have this problem as well. Using maven to run phantomjs 1.9.2. in reference to varshith, the suggestion on stackexchange here: http://stackoverflow.com/questions/15345767/repeating-asynchronous-sessions-cleanup-phase-starting-now
does help a little. Basically mock out any asynchronous calls in your javascript code to return immediately. That cuts down on the time phantomJS waits, but does not eliminate the problem.
any clues?
Same issue here. Running on PhantomJS 1.9.7.
Not that it matters, but to be complete: Ubuntu 12.04 LTS, Jenkins v1.558, Maven v.3.0.3.
Switched the build back to Firefox, in a Xvfb setup.
Any progress on this matter? Because it is a really annoying problem. PhantomJS is the faster browser, but because of this problem, it is really unstable. Working tests are failing in the build, due to the browser, which is the reason why I went back to the slower though trustworthy browser (FF).
I was starting phantomjs with 'nohup' when I had this issue. I've now started it using 'screen' and haven't seen this issue again - but it has been only a few days. Someone care to try this too?
Hi Ricoli,
Nohup is only making sure that the process is running in the background. I tried it and the processes were still there. But since it is running in the background, you do get your terminal back. The running processes may make your machine instable since they can hop up. Nohup is not really solving your problem.
@ltutar indeed I thought it wouldn't make a difference - but alas I haven't seen this issue again, and didn't do anything differently apart from not using nohup lol But yes, all logic leads to it being unrelated I know :)
I am also stuck with the "SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW" issue since this morning. Until I have a real solution, I will also be using the nohup :) And maybe reboot the machine once in a week to clean these java processes.
Hi, Our problem is solved by changing the following in our java code: WebDriver driver = new PhantomJSDriver(caps); with this.driver = new PhantomJSDriver(caps); Now, we get a shutdown. [INFO - 2014-05-01T13:21:09.095Z] ShutdownReqHand - _handle - About to shutdown
Does that mean that at a given time, you had multiple instances open at the same time?
No. I do not think so. See the answer of Udu at http://stackoverflow.com/questions/19157924/not-able-to-run-selenium-script-using-phantomjs-driver for the explanation.
I have the same problem on 1.9.7 using se-interpreter (https://github.com/Zarkonnen/se-interpreter)
Same here with PhantomJS 1.9.0 on Ubuntu 14.04 LTS. It loads all pages correctly in first browser.get() call. If I do second browser.get() call, then it hangs with all pages I try. That means I'm limited with only one get() call per browser.
Having the same issue with 1.9.7 while running heavy async scripts within a webpage through selenium. It seems like the freeze comes from some XmlHTTPRequests that get stuck, adding a .timeout to all XmlHTTPRequests seems to solve the issue in my case
I still have this issue and it is open for 1,5 year. should we expect any kind of solution?
ENV: jenkins triggered gradle cucumber with local phantomjsdriver 1.2.1 + selenium 2.44.0 + phantom 1.9.8 on osx 10.10.1 the same issue appears sometimes in the moment it's still stuck for now 7 hours
Same bug with version 1.9.7, used in jenkins/selenium builds. Any progress regarding this issue?
Same issue on RHEL 5.6 64 bit, PhantomJS version 1.9.2. It seems that PhantomJS cleans up the sessions every 5 minutes and that's what is causing the message to be thrown, although its an asynchronous call. How about we disable that in the source code and then compile and then run, will that work and will have any impact, has anybody here tried that? Is this stupid, as in trying to mess with phantomJS source code?Waiting...
Same problem in 1.9.7 , ubuntu 12.04 . about 80% of time phantomjs works fine , but sometime stocks and nothing happens
command :
phantomjs --debug=true phantom-server.js "http://didaniha.loc"
Debug :
2015-02-26T19:02:22 [DEBUG] CookieJar - Saved "_ga=GA1.2.912779759.1424964743; expires=Sat, 25-Feb-2017 15:32:22 GMT; domain=.didaniha.loc; path=/"
2015-02-26T19:02:22 [DEBUG] CookieJar - Saved "_gat=1; expires=Thu, 26-Feb-2015 15:42:22 GMT; domain=.didaniha.loc; path=/"
2015-02-26T19:02:23 [DEBUG] WebPage - updateLoadingProgress: 82
phantom-server.js :
var page = require('webpage').create();
var system = require('system');
page.viewportSize = {
width: 1024,
height: 768
};
console.log(system.args[1]);
page.open(system.args[1], function(status) {
console.log(page.content);
phantom.exit();
});
Same problem on two machines, one Jenkins Ubuntu server, one local dev machine. Interestingly, problem not reproducible on local vagrant Ubuntu dev box..
[ERROR - 2015-03-19T09:10:42.314Z] Session [3602f290-ce17-11e4-b5a9-374855c211cc] - page.onError - msg: TypeError: 'null' is not an object (evaluating 'document.getElementById("username").focus')
[ERROR - 2015-03-19T09:10:42.314Z] Session [3602f290-ce17-11e4-b5a9-374855c211cc] - page.onError - stack:
sf (http://localhost:8081/saml2/login/:16)
onload (http://localhost:8081/saml2/login/:46)
[INFO - 2015-03-19T09:11:20.497Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
[INFO - 2015-03-19T09:16:20.497Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
Tried also this change to page timeout capabilities but it doesn't help.
Jenkins server (timeouts happen): Debian GNU/Linux 7 (wheezy) -- 3.2.0-0.bpo.1-amd64 -- phantomjs 1.9.8
Local dev (timeouts happen): Ubuntu 14.04.2 -- 3.13.0-46-generic -- phantomjs 1.9.8
Local dev box vagrant vm (timeouts do not happen!): Ubuntu 12.04.4 -- 3.2.0-64-virtual - phantomjs 1.9.8
This problem started on our jenkins server gradually and it has gotten worse and now our tests are totally usable, we only get like 1/10 builds without timeout and pretty much phantomjs is unusable for us :(
+1
It sounds like my problem is similar. Our CI build occasionally gets stuck on browser.get
calls and the PhantomJS output is similar: last thing I see is
2015-03-21T21:26:39 [DEBUG] WebPage - updateLoadingProgress: 86
I am running PhantomJS 1.9.7 or 1.9.8 (same results with both) on RedHat Enterprise Linux 5.9.
Also, I can't reproduce this problem outside the Jenkins CI build. Running tests from the command line or locally both work just fine.
If there is no fix for PhantomJS itself yet, does anyone know what the trigger condition is, for implementing a workaround in the application to avoid it?
the same problem in win7 , phantomjs-2.0.0-windows .
Same problem with windows 8,phantomjs-2.0.0-windows .
We were also using phantomjs in our product because of the multiple issues we switch to http://www.awesomium.com/ ...it is pretty cool and doing great for us.
Same with phantomjs 2.0.0 on Max OS X
observed the same issue with
{"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.7 Safari/534.34","webSecurityEnabled":true}
Any solution to this problem???
the same problem with phantomjs 2.0.1-development on centos 6.5
I am also having the same problem with phantomjs 1.2.1 and selenium 2.46.0 on ubuntu 14.04LTS. Anyone know how to fix this ?
Hey Finally I found the solution for this . in Java you can use driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS); .
This fixed the problem for me. Hope same for all of you . :+1:
That just changes the failure mode - instead of hanging, it times out. Which is better in a CI environment, because you can just re-run the tests and hope it works the next time. But still not desired result.
On Thu, Jun 25, 2015 at 3:17 AM, Jayesh Choudhary notifications@github.com wrote:
Hey Finally I foun the solution for this . in Java you can use driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS); .
This fixed the problem for me. Hope same for all of you . [image: :+1:]
— Reply to this email directly or view it on GitHub https://github.com/ariya/phantomjs/issues/11526#issuecomment-115135376.
I am also having this problem. At some random point during the test run, one of the tests will get stuck, output.xml file does not get updated anymore, and the run has to be killed. I would really like to see a fix for this, otherwise we are going to have to abandon PhantomJS entirely. I am using a Virtualbox VM running Ubuntu 12.04 and using version 1.9.8 of PhantomJS.
Has anybody worked out a hack?
Switched already to Selenium Firefox driver, almost as fast using a MySQL ramdisk and Xvfb. And it's super reliable.
@jaywink The fix for ghostdriver 380 didn't work for you? I was thinking of trying it but maybe it doesn't fix this particular problem?
@erinphemi no I tried that too, see this comment.
Hmm, so from reading #12180, PhantomJS itself works fine on its own, the problem happens when trying to use it with Selenium?
Is there any chance this will be fixed? I don't know how to fix it myself.
I have the same issue - sometimes my build times out and sometimes it runs fine.
+1 but see 2 years and still not fixed ? :) even after so many people complaining ?
Unfortunately, without a self-contained, minimal, reproducible test case there's basically nothing we (PhantomJS devs) can do about this bug report. We don't even know if this is a bug in PhantomJS! It could be a bug in Selenium or whatever webdriver glue you are using. If it is a bug in PhantomJS it is almost certainly a bug in Webkit that depends strongly on the contents of the pages y'all are testing -- and we don't know anything about those.
Also, I would bet a small amount of money that this is not one bug, but rather at least N/2 bugs (where N is the number of people who have commented that they "have the same problem") with the same symptoms.
any fix for this issue yet?
Our Behat-Tests use PhantomJS as browser via selenium2/webdriver. The execution stops occasionally during page loading.
We have no idea how to solve this problem, as it occurs not always at the same step/scenario.
Any ideas what the problem is or how to solve it?
Config:
--webdriver=18643
http://localhost:18643/wd/hub
PhantomJS Debug-Output
regards florian