Skip to content

Review bundler plugin logs for missing token warning #793

@Lms24

Description

@Lms24

Here we go again:

we should revisit the bundler plugins logs when no token is defined in dev. IMHO a one-line warning is fine, but right now you get this:

vite build

[sentry-vite-plugin] Info: Using environment variables configured in ".env.sentry-build-plugin".
vite v5.4.19 building for production...
[sentry-vite-plugin] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
✓ 678 modules transformed.
dist/index.html                   0.73 kB │ gzip:   0.43 kB
dist/assets/index-BV1Wg_m1.css   50.28 kB │ gzip:   8.93 kB
dist/assets/index-B1wWJiqM.js   671.46 kB │ gzip: 220.02 kB │ map: 3,114.83 kB

(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
[sentry-vite-plugin] Error: An error occurred. Couldn't finish all operations: Error: Command failed: /Users/francesco/git/draw-it-play-it-ship-it/node_modules/.pnpm/@[email protected]/node_modules/@sentry/cli-darwin/bin/sentry-cli --header sentry-trace:c78fe5c9ff6f489da4d6899059f4ac78-8e30bcf555ec4cff releases new 5a02b9fe9fdb792ba80e74f9f8cddda2d50b2c03
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.

    at genericNodeError (node:internal/errors:985:15)
    at wrappedFn (node:internal/errors:539:14)
    at ChildProcess.exithandler (node:child_process:417:12)
    at ChildProcess.emit (node:events:508:28)
    at maybeClose (node:internal/child_process:1101:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: '/Users/francesco/git/draw-it-play-it-ship-it/node_modules/.pnpm/@[email protected]/node_modules/@sentry/cli-darwin/bin/sentry-cli --header sentry-trace:c78fe5c9ff6f489da4d6899059f4ac78-8e30bcf555ec4cff releases new 5a02b9fe9fdb792ba80e74f9f8cddda2d50b2c03'
}
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] Error: An error occurred. Couldn't finish all operations: Error: Command --header sentry-trace:d75869aad2134ec2ba2b0ccb7469de3c-a7358df943e7447b-1 --header baggage:sentry-environment=production,sentry-release=4.1.1,sentry-public_key=4c2bae7d9fbc413e8f7385f55c515d51,sentry-trace_id=d75869aad2134ec2ba2b0ccb7469de3c,sentry-sample_rate=1,sentry-transaction=Sentry%20Bundler%20Plugin%20execution,sentry-sampled=true sourcemaps upload --release 5a02b9fe9fdb792ba80e74f9f8cddda2d50b2c03 /var/folders/jj/bsx4nqbd0zl38fd5gbs_tq3r0000gn/T/sentry-bundler-plugin-upload-2jTjL3 --ignore node_modules --no-rewrite failed with exit code 1
    at ChildProcess.<anonymous> (/Users/francesco/git/draw-it-play-it-ship-it/node_modules/.pnpm/@[email protected]/node_modules/@sentry/cli/js/helper.js:343:18)
    at ChildProcess.emit (node:events:508:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)
✓ built in 2.40s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions