-
Notifications
You must be signed in to change notification settings - Fork 415
Capybara::Poltergeist::DeadClient when JS errors are thrown #232
Comments
Do you get the error on the Ubuntu machine? If so please could you create a crash dump from there? |
@jonleighton: Yes, a similar error occurred on the Ubuntu machine. Here's the crash report. |
Can you try current master? |
Same problem here on ArchLinux and
The weird thing is that if I pause the test just before "hitting" the submit input waiting like a couple of seconds and then going ahead it works... |
@enricostano Still having this issue on ArchLinux? Having it on Ubuntu. |
sorry @olivierlacan , I gave up on this. Not using Poltergeist anymore. 😞 |
Ditto. I don't blame Poltergeist to be fair. I blame PhantomJS. |
This is frustrating. I'm having the same problem and I'm using PhantomJS 1.9.8 How do they not have this fixed? What are you guys using instead now? |
We're still getting this randomly on tests running on Semaphore. Not happening on local OSX dev machines. |
This is weird... still happening randomly when it is used on Rails 3, On rails 4 its ok. |
Can anyone provide a minimal example that reproduces the issue? Without that it's pretty hard to fix |
Closing this due to age, lack of details usable for debugging and the appearance of it most likely being an issue with older phantomjs -- If anyone has a reproducible test case using latest versions of poltergeist/phantomjs please open a new issue |
@twalpole I am seeing this issue still, hard to track down. phantomjs 2.1.1 If you need more information I am happy to collaborate and send whatever you need to track this down. |
@caseyprovost - What we really need is a reproducible minimal test case |
@twalpole I'm facing the same issue. I'm trying to run my tests on Jenkins. Scenario: Adding item to cart and checkout # features/web_checkout.feature:4 |
@Azrasyed As stated before -- what we need is a reproducible test case using phantomjs 2.1.1+ -- without that there really is no way for us to figure out whats going on. |
@jonleighton @twalpole I'm facing the same issue. I'm trying to run my tests on Jenkins.
Error looks like this:
|
I came across this issue as well. Here is the dump file of the error. |
@jonleighton @twalpole The issue resolved by increasing poltergeist
|
@cmthakur My timeout is |
We've done the following and it seems to have helped tremendously with random errors and memory use when running tests: # spec/spec_helper.rb
config.after :each do |example|
page.driver.restart if defined?(page.driver.restart)
end This resets PhantomJS completely after each test and has no noticeable performance impact. |
@jonleighton @twalpole can you try this in spec_helper.rb, it works for me.
In capybara.rb
|
It seems like the key thing is that I get crashes otherwise in #830. |
Oh my god @constantm you helped me a lot with the trick to restart the driver after each test..been battling unreliable phantomjs crashes for weeks! cheers! |
Still happening in CircleCI. Difficult to provide steps to reproduce as it happens intermittently and the specs that fail aren't always the same ones. Update: Noticed similar issue back in 2012...related to people who'd upgraded to a newer version of Bootstrap. I also started seeing this issue when I upgraded to Bootstrap 4 alpha-6 |
Restarting the driver, as per @constantm fixed the problem for me (which was caused by forking in my code) but there was a performance hit: ~0.19s on my machine. |
In my case only some test cases were problematic, and so it wasn't necessary to include the changes in the
|
Shot in the dark from teampoltergeist/poltergeist#232 Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>
Hello,
Some days ago one of our tests using poltergeist started to fail with Capybara::Poltergeist::DeadClient errors.
Here's the code causing the error:
And here's the shell output:
My current setup looks like this:
I am running my tests on OS X 10.8 and Ubuntu 8.04.4 LTS. The js_errors option is set to false:
After debugging the problem a bit more, I found out that a JS error is thrown when loading the site:
After fixing the JS error, the test started working again. So the crash is probably caused by the uncaught error.
I also created a a crashdump of phantomJS.
It currently looks like phantomJS dies after encountering a JS error when js_error is set to false.
The text was updated successfully, but these errors were encountered: