-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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: chrome missing CRI client after browser relaunch #29663
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 flaky tests on run #55855 ↗︎Details:
|
Test | Artifacts | |
---|---|---|
... > errors > throws when waiting for 2nd response to route |
Test Replay
|
e2e/origin/navigation.cy.ts • 1 flaky test • 5x-driver-chrome:beta
Test | Artifacts | |
---|---|---|
... > times out in cy.origin with foobar spec bridge defined |
Test Replay
|
commands/net_stubbing.cy.ts • 2 flaky tests • 5x-driver-webkit
Test | Artifacts | |||||||
---|---|---|---|---|---|---|---|---|
... > with `resourceType` > can match a proxied image request by resourceType |
|
Test | Artifacts | |
---|---|---|
... > errors > throws waiting for the 3rd response |
Review all test suite changes for PR #29663 ↗︎ |
b390d76
to
a313ef8
Compare
a313ef8
to
cbc2b02
Compare
…the correct arguments [run ci]
cbc2b02
to
a26f387
Compare
ryanthemanuel
approved these changes
Jun 13, 2024
…ser_missing_cri_client
dc4945f
to
794dd03
Compare
…ser_missing_cri_client
mschile
approved these changes
Jun 21, 2024
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Additional details
This PR addresses the missing CRI client issue when chrome unexpectedly closes. When this would happen, we wait for the browser to reconnect up to 3 attempts. In this case though, since the browser closed, we closed the CRI client as well and we are able to successfully relaunch the browser, expecting the CRI client to be there, but its not so we get this error.
To fix this, we need to make sure we detect when the browser unexpectedly closes and let the launcher know that the instance is no longer active. This way, we can set
shouldLaunchNewTab
tofalse
which will prompt the recreation of the CRI client as the browser instance is new.That being said, I am unable to create a system test where the browser closes in the manner I need it to. I was only able to recreate the issue on this branch against this test suite. In the actual repo, I have added a brief assertion to the launcher unit test and added a new integration test for the run mode in the server, which integrates most the aspects of the server while stubbing out the config loader child process and a few other directory specific things since we are mocking the file system.
Steps to test
run the integration tests in the server for the monorepo, or try the specified branch (which is the reprod branch but with the fix) against the test repo to see the crash in action. You should see the log which indicates we recovered and rehydrate the CRI client correctly.
![](https://private-user-images.githubusercontent.com/3980464/339501611-e964d0e4-5a15-4fdd-a1c4-e8726f15cf7b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2NjYwOTMsIm5iZiI6MTcyMzY2NTc5MywicGF0aCI6Ii8zOTgwNDY0LzMzOTUwMTYxMS1lOTY0ZDBlNC01YTE1LTRmZGQtYTFjNC1lODcyNmYxNWNmN2IucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MTRUMjAwMzEzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTEyZjAxZTY0MDMzZjVmOWU2YzIxNjZmYmE4NDAyYzlkODA0OWJiNGI1MWUzZTE2ZTQ0YzVjNjVmZTlmYmU1YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.8TxPnrZ-LjXWC1IRKKvrbBKUQ_VyKvHV13SvO_lM1cs)
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?