In our testing of capybara-webkit for Still Alive, we've come across some rare scenarios where the Reset command will generate the error "Unable to load url about:blank". I've done a lot of debugging and tracing of the execution at it seems to come down to an issue where the loadFinished signal triggered by the stop command in Reset is fired after the page is set to about:blank. The PageLoadingCommand then interprets this as a failure in the context of the about:blank load and you get the above error message and ultimately an exception thrown but Capybara.reset_sessions!.
This is very intermittent and we probably wouldn't have noticed it if it weren't for our use of long running webkit processes. I haven't been able to characterise exactly what causes it and even when running the exact same sequence of commands it sometimes occur and sometimes not.
To maybe describe it better, here is some logging output:
# A successful reset
Unable to load URL: http://example.com
pendingLoadFinished: success = 1
finishCommand: success = 1
# A failed reset
pendingLoadFinished: success = 0
Unable to load URL: about:blank # Pretty sure this is a previous URL that failed, not about:blank right?
finishCommand: success = 0
I know this is one of those difficult issues to track down, I was mainly after advice on a possible solution, which I could implement.
I was thinking we could add a method to Commands that returns a boolean indicating whether they should fail on page load or not. PageLoadingCommand#pendingLoadFinished(bool) could then use that flag to decide whether a failed page load should trigger a failure of that command or not.
Does that sound like a reasonable solution to the problem?
I recently changed capybara-webkit to be less paranoid about page load failures. Can you try this again on the latest master?
We no longer load about:blank on page reset, so this should not be an issue.