Skip to content

Issues running @vercel/og when @sentry/nextjs is installed #5964

Closed
@jcblw

Description

@jcblw

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.15.0

Framework Version

7.15.0

Link to Sentry event

No response

Steps to Reproduce

  1. Installed @vercel/og
  2. Run the local server yarn dev
  3. Error happens with auto instrumentation. It does not like the exported config needed
  4. Turn off auto instrumentation.
  5. See image work locally, deploy to Vercel
  6. 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.

Screen Shot 2022-10-14 at 9 22 54 AM

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

Screen Shot 2022-10-14 at 8 59 38 AM

Thanks, and let me know if I am just misconfiguring this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: nextjsIssues related to the Sentry Nextjs SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions