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

Bug: Suspense Exception in react-server-dom-webpack #27896

Closed
Lewin-R opened this issue Jan 8, 2024 · 3 comments
Closed

Bug: Suspense Exception in react-server-dom-webpack #27896

Lewin-R opened this issue Jan 8, 2024 · 3 comments
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@Lewin-R
Copy link

Lewin-R commented Jan 8, 2024

I just began using Sentry in the Next project I'm currently working on and found relatively quickly that a very weird error is being thrown in production at: (react-server)/./dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js at line 12:123419

The error in Sentry states the following:
Suspense Exception: This is not a real error! It's an implementation detail of use to interrupt the current render. You must either rethrow it immediately, or move the use call outside of the try/catch block. Capturing without rethrowing will l...

Hosting this project on Vercel.

React version: 18.2.0
Node version: 20.9.0

The current behavior

An error is being thrown even though it states it is not a real error.

The expected behavior

The error should not be thrown if it is not a real error.

@Lewin-R Lewin-R added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Jan 8, 2024
@rickhanlonii
Copy link
Member

This is probably happening because the you have use being caught in a try/catch, so the error message is accurate (see this PR for more info #25543).

If that's not the case, please share a codesandbox to show how it's happening and I can re-open and take a look.

@rickhanlonii rickhanlonii closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2024
@markomitranic
Copy link

I wonder if you have some advice on figuring out what causes it? Judging by the comment on #25543 and also my personal experience, if this error happens in a vendor module, it won't be visible in dev, only if it happens in user space.

This, for example, means that I end up having this error in production and preview Sentry, but can never replicate it locally.

@octavian-participayed
Copy link

octavian-participayed commented May 27, 2024

I'm also encountering this issue.
Anyone out there who managed to solve this problem?
I'm not even using the use hook anywhere in the app, so it's pretty weird that this error is being thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

4 participants