-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[nextjs] api route not returning response or json once deployed to Vercel in latest 7.29.0 #6670
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
Comments
Here is a the api route in question:
|
Hi, thanks for surfacing this. I see the update could indeed cause problems in the wrong circumstances - luckily for you, the fix is relatively straightforward! First, the Problem: To be able to flush events before the lambda on Vercel or AWS terminates, the SDK needs to wrap We should probably introduce a mechanism that preserves the execution order - even though it is generally not advised to call both We'll investigate if we can find a solution for this behaviour out of the box but please try out the proposed fix and let me know if it worked! |
@lforst that is good to know! Ill refactor now and let you know. |
@wadehammes We'll probably release a fix for this on Monday. Thanks again for reporting this! In the meanwhile, the workaround I described should still work. (PR if you're interested #6674) |
awesome. that fix worked and is a lot more straightforward. thank you |
We just released a fix with version |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/nextjs
SDK Version
7.29.0
Framework Version
NextJS 13.0.6
Link to Sentry event
No response
Steps to Reproduce
In the latest version, I am not getting json response from a 200 api route. There are no console logs though, the only way I found an error was via the component not loading as it awaits data from the api route before rendering.
I have deduced through updating one new package update at a time that Sentry SDK is the issue, and I suspect it has something to do with this:
feat(nextjs): Send events consistently on platforms that don't support streaming (#6578)
This is only happening once deployed to Vercel. Local work as intended. Downgrading to 7.28.1 api routes work as intended on both local and Vercel.
Expected Result
API routes return response as intended like in 7.28.1 when deployed to Vercel
Actual Result
Component doesn't load. I can't reproduce since this only happens on Vercel. There are no Sentry logs attached to this work yet either.
The text was updated successfully, but these errors were encountered: