-
-
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
Cannot use session replays with tunneling in NextJS #7302
Comments
Assigning to @getsentry/support for routing, due by Tuesday, February 28th at 5:00 pm (sfo). ⏲️ |
Routing to @getsentry/team-web-sdk-frontend for triage, due by Thursday, March 2nd at 10:20 am (sfo). ⏲️ |
Hi, this probably doesn't work because replay uses a binary format for it's payloads and nextjs automatically bodyparses. I recommend just using the |
Hi, are you saying that we don’t need to have the tunneling implementation in our code at all? Eg the /pages/api/sentry.ts file above, I should just delete that and it will work? I’m just a little confused because the tunneling documentation gives all of these sample implementations for various languages for the proxying, so I thought that I needed to do that here too (and found it odd that it is up to the user to port Ruby code to the equivalent NextJS code lol). I guess it’s built into the NextJS library? If that’s the case it would be helpful for that to be in the documentation. Thanks! |
Yeah, it makes the API route obsolete and it should just work. We built this for the Next.js SDK because the framework allows us to do it and we thought it was cool and useful. |
got it, that's great! Yeah a note in the documentation would be nice, but it does seem to be working on my end. Closing this. |
Environment
SaaS (https://sentry.io/)
Version
7.37.2
Link
doesn't show up on sentry at all
DSN
https://[email protected]/5714558
Steps to Reproduce
{"detail":"invalid event envelope","causes":["missing newline after header or payload"]}
when session replays are enabled and our site loads.useCompression: false
when setting up Replays.the
next.config.js
relevant details:the
sentry.client.config.js
:the code in
pages/api/sentry.ts
:Expected Result
It doesn't error
Actual Result
network logs show Sentry is replying with
{"detail":"invalid event envelope","causes":["missing newline after header or payload"]}
The text was updated successfully, but these errors were encountered: