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: suppress EventEmitter warnings + other Node warnings in prod #15723

Merged
merged 5 commits into from
Apr 1, 2021

Conversation

flotwig
Copy link
Contributor

@flotwig flotwig commented Mar 31, 2021

User facing changelog

  • Fixed an issue where "Possible EventEmitter memory leak detected" warnings could appear when running multiple specs.

Additional details

  • increased plugin child ipc listener limit to infinity so the unneeded warning ceases
  • fixed an actual event listener leak in electron downloads code
  • updated process.emitWarning patching to still log warnings in development, but in production, only log warnings to debug log

How has the user experience changed?

PR Tasks

  • Have tests been added/updated?
  • Has the original issue or this PR been tagged with a release in ZenHub?
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?
  • [na] Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 31, 2021

Thanks for taking the time to open a PR!

Comment on lines +316 to +317
// avoid adding redundant `will-download` handlers if session is reused for next spec
win.on('closed', () => session.removeListener('will-download', onWillDownload))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently the session is reused between webContents, because this eventually emits the same max listeners warning after 12 or so specfiles have launched Electron

@flotwig flotwig changed the title fix: suppress EventEmitter warnings, other warnings fix: suppress EventEmitter warnings + other Node warnings in prod Mar 31, 2021
@cypress
Copy link

cypress bot commented Mar 31, 2021



Test summary

9407 0 119 3Flakiness 1


Run details

Project cypress
Status Passed
Commit 04960c5
Started Apr 1, 2021 7:02 PM
Ended Apr 1, 2021 7:14 PM
Duration 12:11 💡
OS Linux Debian - 10.5
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/retries.ui.spec.js Flakiness
1 runner/cypress retries.ui.spec > opens attempt on each attempt failure for the screenshot, and closes after test passes

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

@flotwig flotwig marked this pull request as ready for review April 1, 2021 18:53
@flotwig flotwig requested a review from a team as a code owner April 1, 2021 18:53
@flotwig flotwig requested review from chrisbreiding, jennifer-shehane and bahmutov and removed request for a team April 1, 2021 18:53
Copy link
Contributor

@chrisbreiding chrisbreiding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! This has been a nuisance for too long now. Good catch on the download behavior leak too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants