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(page): Page.createIsolatedWorld error catching has been added #7848
Conversation
when navigating, frames are destroyed and sending events leads to an error that crashes the whole process
src/common/FrameManager.ts
Outdated
@@ -398,7 +398,7 @@ export class FrameManager extends EventEmitter { | |||
frameId: frame._id, | |||
worldName: name, | |||
grantUniveralAccess: true, | |||
}) | |||
}).catch(console.error) |
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.
Earlier this was
}).catch(console.error) | |
}).catch(debugError) |
imported with import {debugError} from './helper';
. Should it be the debugError instead?
(For some reason it got removed in 4d9dc8c)
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 now
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.
LGTM
I tried the fix in my use case and it seemed to work as expected
Someone from Puppeteer team should give their blessing as well. I don't know all the implications of the change, and why it broke now. I believe the catch clause hasn't been there for a few puppeteer releases so some other change has made this issue surface again (e.g. with puppeteer 11.0.0 it wasn't there but v11 worked ok for me)
when navigating, frames are destroyed and sending events leads to an error that crashes the whole process
56d88d3
to
32d4312
Compare
Hey, thanks for the PR. Could you please sign a CLA and rebase (with code style fixes |
Didn't mean to close :D |
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.
marking as requiring changes (see my previous comment)
I will update PR tomorrow |
When will this change make it into Puppeteer? |
What kind of change does this PR introduce?
Bug fix
Did you add tests for your changes?
No
If relevant, did you update the documentation?
Not relevant
Summary
When navigating, frames are destroyed and sending events leads to an error that crashes the whole process. This error was mentioned here. Error example:
Does this PR introduce a breaking change?
As I can see there is no breaking change