-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnhandledPromiseRejectionWarning: browser disconnected. This problem may appear when a browser hangs or is closed, or due to network issues. #1814
Comments
Hello @gyopiazza! How do you start TestCafe? It seems like you're using TestCafe API, do you? Could you provide a code that runs TestCafe please? This error means that a browser stopped responding in the testing process. There is a lot of reasons why it can happen, so sharing your tests and the test page would be really helpful, can you afford this? BTW, if we can't figure the actual reason why browsers hangs, at least we can restart the browser (#1815), or if it's concurrency mode, just we can just keep using another instances that stayed alive. I think it will be not so hard to implement it \cc @AlexanderMoskovkin |
Hey @AndreyBelym! Thanks for the fast response, and you guessed right, I'm using the TestCafe API. The tests are just simple click/type/waitFor actions which I don't think it's related to the problem because it happens randomly. Please let me know if an example of the tests I run could give you more hints and I'll share it too. This is how I instantiate TestCafe:
I expected the "quarantine" mode to take care of these situations but I guess it only kicks-in when the actual tests fail, and not for other errors. At first I thought it could be a "computer resources bottleneck" so I tried with a very low concurrency of 2 and even 1 (no concurrency) but the error still randomly appears. However, it didn't happen in the old version of TestCafe (>15.1.317053) but we could really benefit of the concurrency and other new features. Your idea of restarting the browser or use another available instance sounds exactly what we need here. Basically when the browser is not responding TestCafe could kill the process and spawn a new one, without crashing the whole tests suite. |
@AndreyBelym, @gyopiazza I agree with you, the #1815 proposal looks good. I think we can do this in the next releases. |
closed in favor of #1815 |
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow. |
Are you requesting a feature or reporting a bug?
Bug
What is the current behavior?
TestCafe randomly stops execution while running tests with this error:
Sometimes I also get this error:
What is the expected behavior?
The tests should run (and pass or fail).
How would you reproduce the current behavior (if this is a bug)?
Try running many tests at once with some concurrency. I tried running them in many different combinations of concurrency and amount of tests but the errors still randomly appear.
Specify your
As a sidenote, the error doesn't seem related with the moment problem as mentioned in other tickets, I also tried following the solution from #1769 but it didn't help. What else could I try? Thanks!
The text was updated successfully, but these errors were encountered: