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: handle promise for reading protocol stream of trace #6270

Merged
merged 1 commit into from Jul 23, 2020

Conversation

christian-bromann
Copy link
Contributor

@christian-bromann christian-bromann commented Jul 23, 2020

If you provide a malformed path property to Tracing.start, e.g.

page.tracing.start({ path: __dirname })

it will cause a UnhandledPromiseRejectionWarning with tracing.stop() never being resolved, e.g. due to:

(node:37510) UnhandledPromiseRejectionWarning: Error: EISDIR: illegal operation on a directory, open '/path/to/dirname'

This is due to the fact that a readProtocolStream rejection is not caught. This patch fixes that.

@mathiasbynens mathiasbynens merged commit 8c1a586 into puppeteer:main Jul 23, 2020
@christian-bromann christian-bromann deleted the cb-tracing-error branch July 23, 2020 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants