-
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
feat: more informative error messages when Test Replay fails to capture #29312
Conversation
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 like the error message text that will be displayed. I wish they could be a little more actionable, but I don't quite see how they can be.
If we had any expectations of wanting to change the actions we recommend to people in this situations in the future, I would recommend putting an on.cypress.io link to our error-messages page so that we could more easily update the actions. But I'm not sure this is the case with these situations.
7ce569e
to
6771fdb
Compare
6771fdb
to
e5f3cbd
Compare
4 flaky tests on run #55272 ↗︎
Details:
scaffold-component-testing.cy.ts • 1 flaky test • launchpad-e2e
e2e/origin/config_env.cy.ts • 1 flaky test • 5x-driver-chrome:beta
commands/net_stubbing.cy.ts • 2 flaky tests • 5x-driver-webkit
|
|
||
for (const [key, value] of parsedUrl.searchParams) { | ||
if (SENSITIVE_KEYS.includes(key)) { | ||
parsedUrl.searchParams.set(key, 'X'.repeat(value.length)) |
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.
Do we want to match the value length? Not sure if just the length of the string could give something away?
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.
these keys are fairly temporary, so I'm not sure if it's even necessary to be honest.
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.
Looks really good. A couple of smaller things.
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
@@ -1,12 +1,16 @@ | |||
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. --> | |||
## 13.8.1 | |||
## 13.9.0 |
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.
There should be a new section for 13.9.0
since 13.8.1
has already been released.
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.
addressed in 122cd50
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.
Looks good! One small comment on the changelog.
…re (cypress-io#29312) * new error messages * errors for initialization and capturing test replay * messaging the case where no protocol instance but also no fatal error * adds suggested remedies to initialization errors * differentiation between network and http errors, initial work on db missing error * improve db not found error * add new error type to schema * rm commented dead code * clean up network error creation in uploadStream * make artifact confirmation error msg more general * test display of put instance artifacts failure * changelog * ensure we are displaying errors even in quiet mode * fix pending changelog * new snapshots for protocol errors * improve aggregate error * resolved html error snapshots * fix check-ts * fix test * sanitize temp dir in CLOUD_PROTOCOL_CAPTURE_FAILURE error msg * changelog * fix double entry of certain network errors, error message prop for network errors * fix url arg for network error * Update packages/server/lib/cloud/artifacts/upload_artifacts.ts Co-authored-by: Ryan Manuel <ryanm@cypress.io> * rm extra formatting from debug * snapshot whitespace * changelog update * +pending * Update cli/CHANGELOG.md * resolve snapshots? * does moving the stack trace fix whitespace in snapshots in ci? * maybe fixes whitespace on electron now? * fully normalize stack traces * remove full normalization * maybe debug stack normalization * rm stack traces from error messages --------- Co-authored-by: Jennifer Shehane <jennifer@cypress.io> Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Additional details
Many of the errors that can crop up when initializing, capturing, or uploading Test Replay recordings were fairly cryptic. This PR attempts to improve that, with differentiated error messages for:
In addition, Test Replay will cease to display in the Artifact Upload manifest if it fails to initialize or if it encounters a fatal error during recording. We print an error message before the upload section of stdout in this case.
Several of these more verbose error messages include paths and URLs that will more readily identify issues and lead to faster and easier resolution. In certain situations, we can provide actionable advice, like: confirming network configuration, increasing available disk space, and ensuring that temporary directories are accessible.
Steps to test
How has the user experience changed?
The existing upload report will still be displayed, however, the following error messages will also be displayed:
When a request to our API to confirm the status of artifact (video, screenshots, and Test Replay) fails
When Test Replay fails to initialize
When Test Replay encounters a fatal error during recording
When S3 returns an HTTP status code that indicates an error
When the Test Replay recording fails to upload due to a system-level network error
When the Test Replay recording fails to upload after several retries
An aggregate error is displayed with each error that was encountered while uploading. We display a recommendation to verify network configuration when we detect that at least one of these errors is a system-level network error.
PR Tasks
cypress-documentation
?type definitions
?