Mink icon indicating copy to clipboard operation
Mink copied to clipboard

StreamReadException

Open rafwell opened this issue 6 years ago • 6 comments

Hello. What is the best way to handle an unstable connection? I'm using the google chrome driver to login and submit on a form, however the target server is unstable, timeout often occurs and sometimes, out of nowhere, this exception occurs: StreamReadException. What is the best way to ensure the continuity of my process?

Thankful.

rafwell avatar Sep 21 '18 12:09 rafwell

If the end users would also experience these timeouts, then you'll testing what users is seeing unfortunately.

aik099 avatar Sep 21 '18 12:09 aik099

But is not a timeout 408. The request is "loading..." for some times, and i get this exception randomly. Debugging with Chrome, i see the loading, and then end correctly after some time. I think is a bug on driver.

However, i need deal with, resend request or another way. My user no need know that.

rafwell avatar Sep 21 '18 13:09 rafwell

I don't see any easy way for dealing with this, because after exception you'll loose all context of the test and page is likely to crash anyway. You can do a try catch around every test line, but that is huge overhead.

aik099 avatar Sep 21 '18 13:09 aik099

That's true. I made the following change in the driver to work around the problem, and now works much better. However, I am here to see if there is no more correct way. What I've done seems to me "not right".

Sorry for not do a real fork in gitlab, I can not create an account - no aparent reason.

https://github.com/rafwell/chrome-mink-driver/commit/8b1992dcedf13a1d1df8d98705a6d10f4206e054

rafwell avatar Sep 21 '18 13:09 rafwell

No such issue other drivers, like Selenium2?

aik099 avatar Sep 21 '18 14:09 aik099

I could not run selenium2. It made a lot of mistakes, so I tested the chrome and got it. It may be that selenium does not occur.

rafwell avatar Sep 21 '18 19:09 rafwell

Closing this as this seems to be about the chrome-driver which is not maintained by us

stof avatar Jun 15 '23 06:06 stof