-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: preserve orphaned process electron #29515
fix: preserve orphaned process electron #29515
Conversation
da1febb
to
a900563
Compare
11 flaky tests on run #55401 ↗︎
Details:
top-nav.cy.ts • 1 flaky test • app-e2e
e2e/origin/navigation.cy.ts • 1 flaky test • 5x-driver-firefox
|
a900563
to
6bdf6ed
Compare
|
||
if (isOrphanedBrowserProcess) { | ||
debug(`killing process because launch attempt: ${thisLaunchAttempt} does not match current launch attempt: ${launchAttempt}`) | ||
await kill({ instance: _instance, isOrphanedBrowserProcess, nullOut: false }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is nullOut (or rather !nullOut) serving the same purpose as isOrphanedBrowserProcess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. I think the goal of nullOut
is to set the current browser instance to null, which we don't want to do since we want the active instance to be set, but the _instance
inside the closure to be cleaned up.
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Additional details
This PR fixes an issue where orphaned processes were killing the whole electron browser CRI client, when in actually we want to preserve this until the electron process is terminated.
Unique to our electron setup, launching electron produces a window and not a separate browser instance. Since orphaned processes (or in this case, windows/targets) need to be cleaned up, we want to only clean up those items related to the process/window and not the overall launched instance.
see #28397 (comment) for more in depth details, as well as how we reproduced the issue
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?