-
-
Notifications
You must be signed in to change notification settings - Fork 426
Intermittent allow_unknown_url failures #996
Comments
Do you have any other Webkit configuration blocks? Do you have any tests that modify the allow/block rules? |
I am not modifying the rules in any of the specs, here is my complete spec_helper.rb
|
It probably won't fix this issue, but for test stability you definitely want
|
Is this still happening, and do you have a minimal way to replicate? |
@twalpole This is still happening for me in 1.14.0 Not sure how to replicate consistently though, other than it's definitely an intermittent that we've seen a lot in the past. I'll try bumping to 1.15.0 and keep an eye on it Edit: I am able to to replicate with Capybara-Webkit 1.15.0. In my experience the error generally comes up more often when capybara-webkit is having a 'bad time' |
@AlanFoster Sorry, but without a repeatable way to replicate this (code, or at the very least a debug log) there is nothing we can really do. |
@twalpole Replicating is possible, but it's unfortunately not 100% consistent. I'll run with |
@AlanFoster turn on debug mode - https://github.com/thoughtbot/capybara-webkit#configuration - it should output a bunch of stuff to the console |
Looking through the code there's a possible way this could happen if you are using some kind of test retry on failure implementation. If you do have test retry going on, a debug log would be great to confirm it's what is actually happening. |
@twalpole This happens often enough that it's an issue, but not consistently enough for me to replicate. For instance, I've never been able to replicate with On CI test runs I'll see something similar to:
And then overall RSpec shows Scenario 1 failed with the following:
I'm not sure if the real problem is Capybara Webkit crashing, and the unknown URL log output is just a side effect of that or not. i.e. I'm not sure if the |
@AlanFoster Ok -- so the code path that I see which would allow for this is that when a crash of the capybara-webkit server happens, it prints out the "Capybara::Webkit::CrashError ..." message and starts up a new server instance. If |
@AlanFoster Can you try the |
@AlanFoster Does the thumbs up mean the |
If so can we merge this fix? |
@gardha Does it make a difference for you? |
I have not tried, but I can try shortly |
Thanks @twalpole I'm running with this branch now. I'll post an update after it's been running for a few days :) I've been finding lots of unexpected edge cases, similar to the database cleaner you posted above, and it's taken me a while to fix those intermittents before moving on to this particular issue :) If I understand correctly this won't fix the underlying issue though, it will just attempt to clean up correctly in a crashing scenario? |
@AlanFoster Correct -- it won't fix the underlying issue of crashes occurring, it should just prevent a crash during reset! resulting in the black/whitelists not getting set for the next test. |
@twalpole Confirming that I have seen this again with the custom branch:
Although in this scenario I can see the above webkit logs, I can also see that poltergeist actually crashed previously too - would this have any knock on impact on capybara webkit? For context we run both capybara webkit and poltergeist together, as some feature tests consistently crash with capybara webkit that actually consistently pass on poltergeist, and vice versa |
@AlanFoster When this occurs is the previous test crashing in the |
Hello,
I have the following setup (latest versions for all gems):
capybara (2.13.0)
capybara-webkit (1.14.0)
database_cleaner (1.5.3)
Qt 5.5
MacOS Sierra
spec_helper.rb
I am intermittently getting errors similar to the following when I run my tests
Please advise, been trying to sort this out for weeks!
The text was updated successfully, but these errors were encountered: