Skip to content

In the vite plugin, token has all permissions set, but the upload error 401,but the release is created #15425

@hamono

Description

@hamono

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/browser

SDK Version

2.22.7

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

This is the config code

sentryVitePlugin({
    url: "https://sentry-test.abc.cn/",
    org: "org",
    project: "talent-profile-web",
    release: {
      name: pak.version,
      uploadLegacySourcemaps: "dist",
    },
    authToken:
      "ac2474a04d54455399f1c73361070bd56c0d2166d66a47e7bfc3xxxxxx",
}),

And the picture is the token config, All permission is allowed:

Image

Steps to Reproduce

Now it not work, when run the build script, show follow error:

> Found 2 files
> Analyzing 2 sources
> Analyzing completed in 0.018s
> Adding source map references
> Bundling files for upload... 
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  0/2 
> Found 2 files
> Analyzing 2 sources
> Analyzing completed in 0.012s
> Rewriting sources
> Bundling completed in 0.216s
> Bundled 2 files for upload
> Bundle ID: ca126c74-980f-5f9a-af69-7de10fc13073
> Optimizing completed in 0.01s
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.
[sentry-vite-plugin] Info: Successfully uploaded source maps to Sentry
> Bundling completed in 0.215s
> Bundled 2 files for upload
> Bundle ID: f085979d-313c-5a77-aabe-7c6f76e99707
> Optimizing completed in 0.01s
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.

But the release is created without any sourceMap files:

Image

Image

Expected Result

It can upload success .

Actual Result

It not work

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions