-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Error to render page on NextJs 12 with fallback = true #4090
Comments
This issue is also impacting Vercel deployments with Next.js API routes wrapped in |
Yeah, the problem line is here: https://github.com/getsentry/sentry-javascript/blob/master/packages/nextjs/src/utils/instrumentServer.ts#L13 |
Can confirm it. Pages with |
Found the same issue. API endpoints or pages using Sentry do not work in Next v12. They return 500 errors. |
I am having the same problem. any updates on the fix? |
Hey, all. First, sorry you're having trouble. Second, Next 12 changes a lot of things, and given how new it is, we haven't yet had a chance to test all the different scenarios to find out exactly what in the SDK continues to work and what might need changing (or to then make those updates). Though we are working towards compatibility with Next 12, for now we're not guaranteeing compatibility with anything higher than Next 11. Third, as to this issue...
It does seem that line may be causing a runtime issue, but I believe that's separate from this buildtime issue. If you look at the OP's stacktrace, it points to this line, from
I think the problem is here: sentry-javascript/packages/nextjs/src/config/webpack.ts Lines 63 to 79 in 8652e86
fallback: true plays into it.
I'm away from my work computer at the moment, but once I get back I will see if removing that fixes the issue. It's there as a way to slightly decrease bundle size, but the savings isn't huge, so I'm happy to disable it for Next 12 if that fixes this issue. |
Try this if you're having |
After trying this, it works like a charm |
Pls keep in mind that the setting of output file tracing to |
+1 |
@lobsterkatie any updates on this? Been following the other thread on next as well. Seems like this is really setting us back vercel/next.js#30561 (comment) |
As referenced as this comment: #4103 (comment) in a related issue it looks like a PR has been merged with a fix #4027 a few hours ago. Looking at the changelog updates, looks like it's slated for release w/6.15. |
@Leocardoso94 can you confirm this issue has been resolved with 6.15? |
I just upgraded to @sentry/[email protected] and [email protected]. This issue still occurs:
😢 |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Hello everyone, We have made a change that fixes some issues with the Next.js server when deployed on Vercel. These are available in the latest release, v6.16.1. Could you try this new version and provide any feedback? Thanks! |
Can confirm that it works ok now, next version |
Glad to see the patch worked! I'm closing the issue, if someone runs into this problem, post an update and I'll reopen it. Thanks! |
In #3978, code was introduced to prevent node tracing integrations (mongo, postgres, etc) from appearing in the browser bundle where they don't belong. However, as part of our larger push to make our code more treeshakable, we recently changed how we export those integrations[1], making the previous workaround unnecessary. As a bonus, this should fix a rendering issue some users were having when using the `fallback` flag. Tested locally and on vercel. Fixes #4090. [1] #4204
In #3978, code was introduced to prevent node tracing integrations (mongo, postgres, etc) from appearing in the browser bundle where they don't belong. However, as part of our larger push to make our code more treeshakable, we recently changed how we export those integrations[1], making the previous workaround unnecessary. As a bonus, this should fix a rendering issue some users were having when using the `fallback` flag. Tested locally and on vercel. Fixes #4090. [1] #4204
Package + Version
@sentry/nextjs
Version:
Description
This error is happening on Vercel when building a page with fallback = true
Example file:
page/test/[foo].tsx
Stacktrace:
The text was updated successfully, but these errors were encountered: