-
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: call screencastOpts as a function for starting a screencast on electron. #23001
Conversation
Thanks for taking the time to open a PR!
|
Co-authored-by: Mark Noonan <mark@cypress.io>
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
@@ -784,6 +784,8 @@ const createRunAndRecordSpecs = (options = {}) => { | |||
}) | |||
|
|||
if (response === responseDidFail) { | |||
debug('`responseDidFail` equals `response`, allowing browser to hang until it is killed: Response %o', { responseDidFail }) |
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.
why not just kill the process?
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.
This seems like the safest (easiest) option. I don't have context for why this was setup this way, but now we will have logs when/ if it happens.
…lectron. (cypress-io#23001) Co-authored-by: Mark Noonan <mark@cypress.io>
(Do we want to close this issue? I think there is more than one hang reported in there but this was the only reproducible example)
User facing changelog
Fixes a hang when sending video to the dashboard from the electron browser.
Additional details
This issue was introduced in version 8.6.0 with this change: #18392
screencastOpts
was converted to a function, but not all instances were called as a function. In the electron browser we passed the function as the options object, which ended up causing a hang when running test.Based on my testing I'm confident in this fix, but I'm looking for suggestions about how to write a test for it.
I've also added an additional debug log to for future debugging to see if we allow the browser to hang when recording.
Steps to test
This has been tested via CI. A user was kind enough to help me get a re-creatable example setup for me to test against. Using that I was able to recreate the hang and discover the offending commit.
The hang was introduced in build 107 (which uses cypress built from this commit: b4b3d67 ) and corrected in build 109 (which uses cypress build from this commit: 3f7fc20). 108 was additional logging.
https://app.circleci.com/pipelines/github/mjhenkes/jcontent?branch=master
How has the user experience changed?
This specific hang will no longer occur in CI.
PR Tasks
cypress-documentation
?type definitions
?