Repository navigation
fix: hanging on basic auth requests in chromium browsers - #27781
Merged
Merged
Conversation
ryanthemanuel
requested review from
AtofStryker,
chrisbreiding,
mjhenkes and
mschile
September 11, 2023 02:18
6 flaky tests on run #50923 ↗︎Details:
|
|||||||||||||||||||||||||||||||||
| Test | Artifacts | |
|---|---|---|
| ... > correctly returns currentRetry |
Test Replay
Output
|
|
| ... > correctly returns currentRetry |
Test Replay
Output
|
|
| ... > correctly returns currentRetry |
Test Replay
Output
|
|
project-setup.cy.ts • 1 flaky test • launchpad-e2e
| Test | Artifacts | |
|---|---|---|
| ... > skips the setup page when choosing e2e tests to run |
Test Replay
Output
Screenshots
|
|
scaffold-component-testing.cy.ts • 2 flaky tests • launchpad-e2e
Review all test suite changes for PR #27781 ↗︎
mjhenkes
reviewed
Sep 11, 2023
Comment on lines
+7
to
+13
| declare global { | ||
| interface Window { | ||
| cypressSockets: {[key: string]: CDPBrowserSocket} | ||
| } | ||
| } | ||
|
|
||
| window.cypressSockets ||= {} |
Contributor
There was a problem hiding this comment.
why do you need to add sockets to window for this fix? Is it for testing?
Collaborator
Author
There was a problem hiding this comment.
Added some doc to explain this a little better: 27b44ed (#27781)
mjhenkes
reviewed
Sep 11, 2023
| } | ||
|
|
||
| return sockets[fullNamespace] | ||
| window.cypressSockets[fullNamespace].connect() |
Contributor
There was a problem hiding this comment.
What does connect do that we weren't doing before and why does it fix the hang?
Collaborator
Author
There was a problem hiding this comment.
Added some doc to explain this a little better: 27b44ed (#27781)
chrisbreiding
approved these changes
Sep 11, 2023
mjhenkes
approved these changes
Sep 11, 2023
Contributor
|
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
This file contains hidden or 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
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
Fixes a regression in
13.0.0where tests using Basic Authorization can sometimes hang indefinitely on chromium browsers. This is caused because our assets are loaded twice when we have basic auth set on the base url. It is unclear why this is happening, but this has been happening since at least 12.0.0 it just didn't cause a problem until we started relying on a top level local variable for a cache of CDP sockets. The fix for this is to set the cache on window instead. This is not ideal, and we should investigate why this behavior is happening, but it is worth getting a fix out there for now so that we don't hang in this scenario.Steps to test
The new system test tests this scenario.
How has the user experience changed?
Tests will no longer hang
PR Tasks
cypress-documentation?type definitions?