Issues running @vercel/og when @sentry/nextjs is installed
See original GitHub issueIs there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
SDK Version
7.15.0
Framework Version
7.15.0
Link to Sentry event
No response
Steps to Reproduce
- Installed @vercel/og
- Run the local server
yarn dev
- Error happens with auto instrumentation. It does not like the exported config needed
- Turn off auto instrumentation.
- See image work locally, deploy to Vercel
- Attempt to view the image on preview ( 500 crash of edge function ).
Expected Result
I should be able to use @sentry/nextjs and @vercel/og in the same project. The only way I could get images generated on Vercel was to remove the integration altogether.
Actual Result
I run into initial issues with auto instrumentation due to the config exports. If I remove the export, it no longer throws a Sentry issue but another error due to missing dependencies on the edge function. Here is that original error.

The error on Vercel after turning off auto instrumentation. /api/sponsor
is the route of the image. I think Sentry assumes this is a client view since it’s using browser tracing and attempting to access document.getElementById
. Also, this file extension is a TSX file

Thanks, and let me know if I am just misconfiguring this!
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:9 (3 by maintainers)
This should be released as part of 7.20 later this week.
any update on this ? I’m facing this issue