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

Fizz: Prevent UnhandledPromiseRejectionWarning if renderToReadableStream throws #24043

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Mar 8, 2022

Summary

I noticed a UnhandledPromiseRejectionWarning when running tests (e.g. https://app.circleci.com/pipelines/github/facebook/react/24649/workflows/5b1b67a2-eb4b-4e7e-9dd8-d531328eff6e/jobs/448950/parallel-runs/16).
It seems to me that stream.allReady is not accessible when the shell errors (i.e. renderToReadableStream throws) which means stream.allReady will be left rejected and unhandled.

How did you test this change?

Follow-up?

  • fail tests if rejected promises are not handled?

@sizebot
Copy link

sizebot commented Mar 8, 2022

Comparing: 14c2be8...528e2f4

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 131.46 kB 131.46 kB = 42.05 kB 42.06 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 136.12 kB 136.12 kB = 43.41 kB 43.41 kB
facebook-www/ReactDOM-prod.classic.js = 435.09 kB 435.09 kB = 79.61 kB 79.61 kB
facebook-www/ReactDOM-prod.modern.js = 421.59 kB 421.59 kB = 77.60 kB 77.60 kB
facebook-www/ReactDOMForked-prod.classic.js = 435.09 kB 435.09 kB = 79.62 kB 79.62 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 528e2f4

@eps1lon eps1lon marked this pull request as ready for review March 8, 2022 09:38
@eps1lon eps1lon requested a review from sebmarkbage March 8, 2022 09:38
@sebmarkbage sebmarkbage merged commit a59f53a into facebook:main Mar 8, 2022
@eps1lon eps1lon deleted the fix/fizz/prevent-unhandled-promise-rejection-if-shell-errors branch March 8, 2022 18:57
@gaearon gaearon mentioned this pull request Mar 29, 2022
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants