Sentry reported an error: Invalid token (http status: 401) - Sentry NextJs

May 2024 ยท 2 minute read

After integration sentry in my project the dev environment works fine but when I try to build the project with yarn build i face this error.

Sentry CLI Plugin: Command failed: /Users/ishman/Desktop/sh/web-speedhome/node_modules/@sentry/cli/sentry-cli releases new RUwbSqUhmn7T-kxjDJebz error: API request failed caused by: sentry reported an error: Invalid token (http status: 401)

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output. Please attach the full debug log to all bug reports.

My configuration file for sentry

import * as Sentry from '@sentry/nextjs' import { SENTRY_DSN } from './env' Sentry.init({ dsn: SENTRY_DSN, tracesSampleRate: 1, integrations: [new Sentry.BrowserTracing({})], }) 

And my sentry.properties file

defaults.url=https://sentry.io/ defaults.org=org defaults.project=project auth.token=token 

cli.executable=../../../.npm/_npx/a8388072043b4cbc/node_modules/@sentry/cli/bin/sentry-cli

5 Related questions 9 How do I fix an internal server error when authenticating with Next-Auth? 11 JSON Parse error: Unrecognized token '!' - error caught by Sentry 0 Can not run server after add sentry to nextjs project Related questions 9 How do I fix an internal server error when authenticating with Next-Auth? 11 JSON Parse error: Unrecognized token '!' - error caught by Sentry 0 Can not run server after add sentry to nextjs project 3 Sentry.io on Next.Js + Serverless: Module not found: Error: Can't resolve 'webpack' 2 There is a problem with the server configuration. NextAuth 3 Stuck with Next Auth authorize part. Error: Action api with HTTP GET is not supported by NextAuth.js 4 Next Auth.js - I can't get token with getToken({req}) 5 Where to set Sentry's setUser in Next.js app? 0 next-auth 4 session returns null, next.js 1 How to solve "API resolved without sending a response fetch" when using sentry Load 7 more related questions Show fewer related questions

Sorted by: Reset to default

ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobmpxZWWFeX6OrJynrKKuerOxz6iprZ2UYq6vecSrqaiqXZ67t63LoptmrJ%2Bgsq95x62rqWWjqa61wdJma2lpXaiyr8DRsmSnnaipt7Q%3D