Issue
When I deploy to Vercel, source map upload fails in the build logs with sentry reported an error: One or more projects are invalid (http status: 400).
Applies To
All SaaS Customers and Self-Hosted Users
Next.js SDK
Vercel
Source maps
Resolution
This 400 means Sentry could not find an active project that matches the slug used during source map upload. Enable sentry-cli debug logs, then set SENTRY_ORG and SENTRY_PROJECT (and any org / project values in withSentryConfig) to the current organization and project slugs.
Enable debug logs in Vercel:
In the Vercel project, open Settings > Environment Variables.
Add
SENTRY_LOG_LEVELwith the valuedebug.Make it available for the environments you deploy, including Production and Preview.
Redeploy.
The next build prints the sentry-cli request URLs. Use those URLs to confirm which organization and project the upload is targeting.
If next.config sets silent: !process.env.CI, Vercel builds stay quiet in the bundler plugin. SENTRY_LOG_LEVEL=debug still prints sentry-cli output. You can also set debug: true on withSentryConfig for extra SDK build logs. See Next.js build options.
Fix the org and project slugs:
In Vercel, open Settings > Environment Variables and copy
SENTRY_ORGandSENTRY_PROJECT.In Sentry, compare those values to the organization slug and project slug, not the display names.
Also check
organdprojectonwithSentryConfiginnext.config. Hardcoded values override a corrected env var.Confirm
SENTRY_AUTH_TOKENis present for those same environments. Source map upload runs at build time.
If you renamed the organization or project in Sentry, update SENTRY_ORG and SENTRY_PROJECT in Vercel. Deployment integrations do not update those values for you. See troubleshooting after an organization slug change.
If you use a self-hosted Sentry instance, also set SENTRY_URL (or sentryUrl on withSentryConfig) to that instance.
Redeploy after you change env vars or next.config. When the upload succeeds, remove SENTRY_LOG_LEVEL so later builds stay quieter.
The Vercel integration writes SENTRY_ORG, SENTRY_PROJECT, and SENTRY_AUTH_TOKEN when you link projects. See Vercel project linking.
