question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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!

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
lobsterkatiecommented, Nov 16, 2022

This should be released as part of 7.20 later this week.

1reaction
MAfzalKhan1997commented, Nov 11, 2022

any update on this ? I’m facing this issue image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploy your Next.js application on Vercel using Sentry and ...
In this blog post, we are going to go from bootstrapping a Next.js application to deploying it on Vercel. We will use Github...
Read more >
Going to Production - Next.js
Run Lighthouse to check for performance, best practices, accessibility, and SEO. For best results, use a ... There's also a Sentry integration for...
Read more >
Problems mounting a Vercel/Nextjs project as a subdirectory ...
rewrite vs. redirect. Let's first understand this difference. A rewrite is something that happens on the server only.
Read more >
Deploy and Monitor your Next.js Applications with ... - YouTube
Richard Propst (Solutions Engineer @ Sentry ) and Lee Robinson (Developer Relations @ Vercel ) walk through how to build, deploy, and monitor ......
Read more >
Next js install - Hutton
Using Next.js, you can create robust react based application … ... Next.js by Vercel - The React Framework The React Framework for Production...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found