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
[Bug]: Unhandled promise rejection in case of binded function called with detached frame #7814
Comments
Encountered the same problem too. |
On node.js 15+ unhandled promise rejections exit the process immediately by default, so this error ends the puppeteer script entirely. |
This is a problem in chrome. In version 901912, everything works without errors, if you take 950341, then an error.
|
Ran into this same issue this weekend. LMK if anyone needs help testing or isolating. -ch |
@Adeloyd Can confirm this works. Do you know the underlying root cause in Chromium that is causing this bug? |
i've come across the same issue and fixed with can you patch it up ? |
* fix: ensure dom binding is not called after detatch Fixes #7814 * refactor: detach listeners instead * refactor: safer approach * fix: test in test/page.spec.ts Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
Steps to reproduce the problem:
Actual result: Unhandled promise rejection. Output attached.
Detached frame`s lifecycle events from the debugger:
Seems that CDPSession does not clean the detached frame from the 'Runtime.addBinding' chrome event listeners.
puppeteer/src/common/DOMWorld.ts
Lines 113 to 115 in ac162c5
Puppeteer version
puppeteer-core 11.0.0
Node.js version
v14.17.1
npm version
6.14.13
What operating system are you seeing the problem on?
Linux, macOS
Relevant log output
The text was updated successfully, but these errors were encountered: