-
Notifications
You must be signed in to change notification settings - Fork 669
-
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
Restart browser if it became unresponsive #1815
Comments
Hi, we are having the same issue with testcafe 0.17.2 with a couple of tests running in Bamboo CI that sometimes fails because of this error. It would be great if you can work on this ticket. Below is the stacktrace.
|
It also happens with testcafe 0.18.1 |
Annoying issue. Any ETA here? :) 0.18.5 still has it |
I'm having the same problem. I thought it was related to local execution but our client experiences the same on his machine. |
Hi, Thanks for your interest. This issue is in our plans to the one of the next releases. |
My observation is if we run bulk test cases in one Browser then only face this issue. @AlexanderMoskovkin : what is your thought on this. I have allready Opened the issue : DevExpress/testcafe-browser-provider-browserstack#25 |
Hi 👋 @AndreyBelym @AlexanderMoskovkin
I also got this issue when I was debugging test with VSCode debugger for some time. Look like for us there is some kind of timeout reached on 25th-minute point 🤔 I hope that can help you investigate this issue. |
Can we get this feature implemented in ASAP - @AndreyBelym / @AlexanderMoskovkin? This issue is very annoying and blocking our test execution on Safari, Firefox (& maybe Edge/IE). We are still seeing this issue in the latest TestCafe version 0.20.0-alpha.1 ? Please let me know if I can help provide any additional debug logs. I already provided some logs here - https://testcafe-discuss.devexpress.com/t/browser-disconnected-error-this-problem-may-appear-when-a-browser-hangs-or-is-closed-or-due-to-network-issues/383 |
Hi @sijosyn, we plan to implement this feature in next sprint (0.21.0 version). We'll let you know when the dev build will become available. |
I have face same issue with browsers stack site when I am executing my
application over there.
…On Fri, Apr 27, 2018, 7:07 AM Sijo Cheeran ***@***.***> wrote:
Can we get this feature implemented in ASAP - @AndreyBelym
<https://github.com/AndreyBelym> / @AlexanderMoskovkin
<https://github.com/AlexanderMoskovkin>? This issue is very annoying and
blocking our test execution on Safari, Firefox (& maybe Edge/IE). We are
still seeing this issue in the latest TestCafe version 0.20.0-alpha.1 ?
Please let me know if I can help provide any additional debug logs. I
already provided some logs here -
https://testcafe-discuss.devexpress.com/t/browser-disconnected-error-this-problem-may-appear-when-a-browser-hangs-or-is-closed-or-due-to-network-issues/383
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1815 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARx2vFJa_-G0DKXd21qru-SvF-3iQmQtks5tsnZ2gaJpZM4PjBVK>
.
|
Any ETA for it's fix? I am using this testcafe version 0.18.6 now |
Any update on this? I have a couple of suites running on Jenkins and randomly stop because of this... I am really thinking about creating a daemon to keep checking the job and re-start everything in case it hangs like this, but that doesn't seem like a good solution... is this going out already? |
Is there a way to contribute code to this issue? I would like to help in any way possible. Thanks |
Hi @berrutti, any contributions are welcome. I think all things that should be changed lies on https://github.com/DevExpress/testcafe/blob/master/src/browser/connection/index.js, look at the _waitForHeartbeat function. If you make a PR, I can help with tests and can answer any questions that will arise. |
I want to add another example why this function is needed. The example contains testing 3D graphics on mobile devices. Not all mobile devices can load complex 3d graphics. This is a simplified test to make it easy to reproduce:
test.js
A timeout is needed to wait until browser falls on the 3d.
The browser cannot load the 3D model and the testcafe restarts this test after some time, and so on three times. After that, the testcafe completes its work with output:
In the example, several tests and I expected that after a failed test on one page, the tests will continue on the next. But no, this completely interrupts the work. I use Samsung Galaxy A5 (2017) and webdriverio + appium as browser-provider. And I get the same issue on ios devices. |
@itdoginfo |
@AlexKamaev
We have test suite with a kind of stress tests, that we try to run on as many devices as we can. Maybe there is some workaround? |
TestCafe was not designed with stress testing support in mind, so I'm afraid it's not possible to achieve your goal without heavily modifying the TestCafe code. But I think we can make stress testing possible once we allow using TestCafe for browser automation tasks - #2501. |
We're not using TestCafe for stress-testing, but still our e2e tests hang with "browser disconnected" message every now and then, which makes them very unstable. We're almost considering dropping TestCafe because of this single issue, cause it was very annoying throughout last year. We're managing some sophisticated "restarting scripts" right now to mitigate that, but that increases our e2e run time by 2 / 3 times (cause restart restarts ALL tests). |
How hard would it be to add something along the lines of |
Or |
@kirillgroshkov such behavior clearly indicates that TestCafe conflicts with your pages in some way. Even if we skip a test that caused a browser failure, there is no guarantee that the next test will pass. It's better to create a separate bug report and provide an example or access to your pages. In this case, we can effectively debug and fix the reason that causes browser disconnections. @rehael a change like this will cover several subsystems (compiler, browser connections, testing runtime) and due to its complexity, we will need to discuss if we really want to include such patch in our codebase. |
I close this issue since restarting browsers that don't respond was implement in a basic way. Enhancements suggested by @miherlosev () are extracted to a separate issue: #4132. The suggestion about skipping the test that caused the DNR state in the browser is extracted to #4133. If you have any other suggestions about browser restarting, please don't hesitate to create new feature requests. |
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. |
…evExpress#2800) * [WIP]Restart browser if it became unresponsive (closes DevExpress#1815) * tests * change approach * fix server tests * fix for headless browsers * fix functional test * refactor and fix tests * refactoring and tests * refactoring * refactor * refactoring * fix and refactoring * add listenered to connection only when testRun is started * rename and fix typos
Are you requesting a feature or reporting a bug?
Feature
What is the current behavior?
When browser becomes unresponsive (
XXX browser disconnected. This problem may appear when a browser hangs or is closed, or due to network issues.
) we stop all running tests.What is the expected behavior?
Unresponsive browser can be closed, and a new browser instance can be started on the next or even the same test (e.g. if quarantine mode is enabled).
How would you reproduce the current behavior (if this is a bug)?
???
Specify your
The text was updated successfully, but these errors were encountered: