Skip to content
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: handle malformed URIs in prerequests #28522

Merged
merged 3 commits into from
Dec 14, 2023
Merged

Conversation

mschile
Copy link
Contributor

@mschile mschile commented Dec 13, 2023

Additional details

In #28427 we started decoding URIs during the prerequest logic to resolve some correlation timeouts. However, we are not correctly handling malformed URIs which will cause Cypress to crash. This change tries to decode the URI and if it fails, just falls back to using the URI as-is for correlation.

Steps to test

How has the user experience changed?

Cypress no longer crashes when receiving a malformed URI.

PR Tasks

Copy link

cypress bot commented Dec 13, 2023

6 flaky tests on run #52797 ↗︎

0 5371 80 0 Flakiness 6

Details:

moved tryDecodeURI
Project: cypress Commit: 43456a6829
Status: Passed Duration: 14:32 💡
Started: Dec 14, 2023 1:29 PM Ended: Dec 14, 2023 1:43 PM
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-chrome:beta

View Output

Test Artifacts
network stubbing > waiting and aliasing > yields the expected interception when two requests are raced Test Replay
Flakiness  commands/storage.cy.ts • 1 flaky test • 5x-driver-chrome:beta

View Output

Test Artifacts
src/cy/commands/storage > #getAllLocalStorage > gets local storage from all origins Test Replay
Flakiness  commands/files.cy.js • 1 flaky test • 5x-driver-chrome:beta

View Output

Test Artifacts
... > throws a specific error when file exists when it shouldn't Test Replay
Flakiness  cypress/cypress.cy.js • 3 flaky tests • 5x-driver-chrome:beta

View Output

Test Artifacts
... > correctly returns currentRetry Test Replay
... > correctly returns currentRetry Test Replay
... > correctly returns currentRetry Test Replay

Review all test suite changes for PR #28522 ↗︎

@mschile mschile merged commit c9062f1 into develop Dec 14, 2023
81 of 83 checks passed
@mschile mschile deleted the mschile/malformed_uri branch December 14, 2023 16:12
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 26, 2023

Released in 13.6.2.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.6.2, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Dec 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

URIError: URI malformed in Cypress 13.6.1
4 participants