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: use app.whenReady and remove delay race for electron startup #15075
Conversation
This change fixes an issue that caused the startup to be delayed by 500ms. We used `app.on('ready')` without checking `app.isReady()`, however the 'ready' event may already have fired at this point and thus we never resolved the Promise waiting for it. Using `app.whenReady` fixes this and now that Promise resolves before the delay expires. Related links: https://www.electronjs.org/docs/api/app#event-ready https://www.electronjs.org/docs/api/app#appwhenready
Thanks for taking the time to open a PR!
|
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 |
cypress open
cypress open
/cypress run
cypress open
/cypress run
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.
local Cypress still works, and CI tests pass, nice
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
This change fixes an issue that caused the startup to be delayed by 500ms.
We used
app.on('ready')
without checkingapp.isReady()
, however the'ready' event may already have fired at this point and thus we never
resolved the Promise waiting for it.
Using
app.whenReady
fixes this and now that Promise resolves beforethe delay expires.
Related links:
https://www.electronjs.org/docs/api/app#event-ready
https://www.electronjs.org/docs/api/app#appwhenready
User facing changelog
cypress open
andcypress run
.Additional details
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?