Vercel intergration error

Using the vercel intergration, I run into an error when linking the vercel project to my sentry project.

https://sentry.io/settings/{PROJECT}/integrations/vercel/{INTEGRATION_ID}/

Error from network tab:
{
detail: “Internal Error”
errorId: “3bb7273be1874ba9a39e1463a14833cd”
}

I’m experiencing the same issue.

Experiencing a similar issue, except on Vercel’s end of things.

Experiencing the same issue too, anyone from Vercel here to help?

@dayvista you can get pass this screen by letting Sentry access all of your vercel projects. But even with that the sentry integration can’t save the project information, see:

@PaulVD Thanks for sharing the error, was able to see that it’s this one. We are currently investigating a solution to this problem.

@dayvista I think your error is different. That one seems to be caused when there are multiple installations. Can you try removing them all and reinstalling the Sentry integration?

@vvo I’m actually not sure which category of error you encountered. If you could get the error ID from the network tab like Paul did and post it, that would help me figure out what’s going on with you.

@vvo I was actually able to connect my project/save the project information, unlike in your GIF. I just wasn’t able to configure the integration from Vercel’s dashboard.

@scefali The error I was experiencing occurred on the first (and every subsequent) install of the integration. I was just clicking “Add Integration” in Vercel once, then connecting one Vercel project with one project on Sentry. No worries though, because:

  1. I was able to get Vercel/Next.js + Sentry working manually with the help of this guide/repo: next.js/examples/with-sentry at canary · vercel/next.js · GitHub
  2. I reached out to Sentry support personally. They assured me that they were aware of the issue and are looking into it, and will notify me once it’s taken care of.

@scefali here’s the error id: 5c8083b5cd8947aab339d106554f3715

Ok, just fixed it for me.

For anyone coming here, here’s why this happens most probably, you either:

  • tried to select only one project when on Vercel to be added to Sentry (select all projects, and on sentry select a single project)
  • had previously set environment variables and secrets for sentry (like NEXT_PUBLIC_SENTRY_DSN)
  • did not click on the (+) on the sentry screen to add a project

Here’s what you need to do:

  • remove all env variables related to sentry (only keep NEXT_PUBLIC_SENTRY_SERVER_ROOT_DIR if you’re using the with-sentry example)
  • remove all secrets related to sentry (Vercel CLI Reference - Vercel)
  • remove the vercel integration(s) on sentry side
  • remove the sentry integration on vercel side
  • start over: re-add the sentry integration on vercel side
  • make sure to select all projects on vercel UI
  • make sure to select a single or multiple projects on sentry UI
  • make sure to click on (+) when adding a project on sentry UI

When this is done, you’ll get the right setup:

Remember though that on Vercel side, API routes exceptions needs to be catched manually (see Add Sentry to Vercel Next.js API Routes - DEV Community).

2 Likes

@vvo Yea, thanks for posting the workaround. Looks like you had the same problem as Paul. We are working on a fix so that you don’t need the workaround anymore.

Yea I confirm it was the exact same problem as @vvo mentioned.

Ok, this should be fixed now: fix(Vercel): Handle env already exists errors by ceorourke · Pull Request #23928 · getsentry/sentry · GitHub

The key word being should here :sweat_smile:

1 Like

sentry error
Hi there, I have an issue with vercel configuration on sentry even though I removed the env vars before restarting. Anyone from @sentry can help solve this? Sentry is able to access all of my Vercel projects.

Error from network tab:
{
“detail”: “Internal Error”,
“errorId”: “6f8627b8e9ad432cbc3163f551a4b65c”
}

Here’s the error:

The total size of all Environment Variables (4.09KB) exceeds 4KB

You need to delete some env variables to clear up space for the ones Sentry adds