-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: prevent overlay for errors caught by React error boundaries #5431
fix: prevent overlay for errors caught by React error boundaries #5431
Conversation
Hello, @alexander-akait @snitin315 can you verify if this solution for issue #5411 is appropriate? |
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.
We watch only runtime error here, but title ask about don't show it for all error which was caught by react-error-boundary
... Maybe it is enough, can you test using this repo - https://github.com/OliverJAsh/react-error-boundary-uncaught-issue/tree/webpack-dev-server like was written in the issue?
Hello, @alexander-akait
Yes, I have tested with the repo attached in the issue and it was working i.e. overlay doesn't show. For reference of the test you can check the .mp4 video under additional info where that repo is used. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5431 +/- ##
==========================================
- Coverage 90.29% 83.42% -6.88%
==========================================
Files 15 13 -2
Lines 1577 1979 +402
Branches 601 723 +122
==========================================
+ Hits 1424 1651 +227
- Misses 140 295 +155
- Partials 13 33 +20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Let's fix |
Hello @alexander-akait, lint errors are resolved now |
Hi @alexander-akait, apologies for the repeated mentions. I noticed that one of the checks is failing—specifically, Test - windows-latest - Node v20.x, Webpack latest (4/4). Based on the error log, it seems the failure is occurring in the test/e2e/api.test.js file for cases when the port is either null or undefined, resulting in the error: "listen EACCES: permission denied 0.0.0.0:60000." Could you please help clarify if these errors might be related to my changes in the client/overlay file? |
Ignore it, this tests are unstable in some situations, if you want to rewrite tests - PR welcome, but it is not related to your changes in this PR, so I will merge |
Did this update cause a regression for plain vanilla JS users? Everything was working fine in "webpack-dev-server": "~5.2.0", and now with 5.2.1, the overlay never shows, see this console error, which looks like the new code added: overlay.js:602 Uncaught TypeError: Cannot read properties of null (reading 'stack') Once again, we don't use react. Just plain, plain as plain vanilla JS. |
@cakidnyc Can you create reproducible test repo? |
Reproduced, looks like your code throws |
Thanks. I agree, but that error is coming from a 3rd party lib. To quote (almost) Forest Gump's Mom: "UI Dev is like a box of chocolates ... you never know what you are going to get". |
im having this problem currently, all typescript and react |
For Bugs and Features; did you add new tests?
Yes
Motivation / Use-Case
fixes #5397
Breaking Changes
Additional Info
webpack_dev_fix-2025-03-11_20.55.45.mp4