getsentry / sentry-cli

A command line utility to work with Sentry.
https://docs.sentry.io/cli/
BSD 3-Clause "New" or "Revised" License
893 stars 221 forks source link

Nothing to upload, all files are on the server #1658

Closed p12y closed 1 year ago

p12y commented 1 year ago

Any ideas why I could be running into this? I can't get my source files to upload to Sentry. I have checked in the project artifact/release bundles and they are all empty. I have tried with --no-dedupe and still no dice. I thought perhaps I had too many files, but even with just 1 or 2 files, the result is the same.

Environment

sentry-cli v2.19.2 MacOS

Steps to Reproduce

sentry-cli sourcemaps --release api@1.0 upload ./dist

Expected/Actual Result

Expected: Source maps would upload Actual: Source maps do not upload

Logs

sentry-cli sourcemaps --release api@1.0 upload ./dist           
⠁ Searching for files...
⠉ Searching for files...
⠉ Searching for files...
> Found 4436 files
> Analyzing 4436 sources
> Analyzing completed in 0.061s
> Rewriting sources
> ~/server/legacy/portal-node-module-network/src/module/service/v2Connections/requireDepe
> Rewriting completed in 0.18s
> Adding source map references
> Bundling files for upload... ~/server/db/migrations/20221017114503-iot-apn-table-update
> Bundling files for upload... ~/server/legacy/portal-node-module-network/src/module/serv
> Bundling files for upload... ~/server/legacy/portal-node-schemas/src/definitions/connec
> Bundling completed in 0.416s
> Bundled 4436 files for upload
> Bundle ID: 83cafe02-d3c4-5ce3-9eb0-c4c3aa14ef40
> Optimizing completed in 0.015s
> Uploading completed in 0s
> Nothing to upload, all files are on the server

Here's a minimal example using only a couple of files with debug log level:

sentry-cli sourcemaps upload --no-dedupe --log-level debug --release api@1.0.2-test ./dist
  INFO    2023-06-27 15:19:15.477250 +10:00 Loaded config from /Users/user/.sentryclirc
  DEBUG   2023-06-27 15:19:15.477373 +10:00 sentry-cli version: 2.19.2, platform: "darwin", architecture: "arm64"
  INFO    2023-06-27 15:19:15.477384 +10:00 sentry-cli was invoked with the following command line: "sentry-cli" "sourcemaps" "upload" "--no-dedupe" "--log-level" "debug" "--project" "REDACTED-api" "--release" "api@1.0.2-test" "./dist"
  DEBUG   2023-06-27 15:19:15.478371 +10:00 request GET https://sentry.io/api/0/organizations/REDACTED/chunk-upload/
  DEBUG   2023-06-27 15:19:15.478577 +10:00 using token authentication
  DEBUG   2023-06-27 15:19:15.478821 +10:00 retry number 0, max retries: 0
  DEBUG   2023-06-27 15:19:16.150562 +10:00 > GET /api/0/organizations/REDACTED/chunk-upload/ HTTP/1.1
  DEBUG   2023-06-27 15:19:16.150622 +10:00 > Host: sentry.io
  DEBUG   2023-06-27 15:19:16.150630 +10:00 > Accept: */*
  DEBUG   2023-06-27 15:19:16.150636 +10:00 > Connection: TE
  DEBUG   2023-06-27 15:19:16.150643 +10:00 > TE: gzip
  DEBUG   2023-06-27 15:19:16.150649 +10:00 > User-Agent: sentry-cli/2.19.2
  DEBUG   2023-06-27 15:19:16.151217 +10:00 > Authorization: Bearer b3f2031c***
  DEBUG   2023-06-27 15:19:16.419220 +10:00 < HTTP/1.1 200 OK
  DEBUG   2023-06-27 15:19:16.419290 +10:00 < Server: nginx
  DEBUG   2023-06-27 15:19:16.419305 +10:00 < Date: Tue, 27 Jun 2023 05:19:16 GMT
  DEBUG   2023-06-27 15:19:16.419349 +10:00 < Content-Type: application/json
  DEBUG   2023-06-27 15:19:16.419363 +10:00 < Content-Length: 348
  DEBUG   2023-06-27 15:19:16.419376 +10:00 < Connection: keep-alive
  DEBUG   2023-06-27 15:19:16.419387 +10:00 < allow: GET, POST, HEAD, OPTIONS
  DEBUG   2023-06-27 15:19:16.419398 +10:00 < access-control-allow-methods: GET, POST, HEAD, OPTIONS
  DEBUG   2023-06-27 15:19:16.419425 +10:00 < access-control-allow-headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding, sentry-trace, baggage, X-CSRFToken
  DEBUG   2023-06-27 15:19:16.419439 +10:00 < access-control-expose-headers: X-Sentry-Error, Retry-After
  DEBUG   2023-06-27 15:19:16.419450 +10:00 < access-control-allow-origin: *
  DEBUG   2023-06-27 15:19:16.419461 +10:00 < x-sentry-rate-limit-remaining: 199
  DEBUG   2023-06-27 15:19:16.419471 +10:00 < x-sentry-rate-limit-limit: 200
  DEBUG   2023-06-27 15:19:16.419481 +10:00 < x-sentry-rate-limit-reset: 1687843157
  DEBUG   2023-06-27 15:19:16.419492 +10:00 < x-sentry-rate-limit-concurrentremaining: 199
  DEBUG   2023-06-27 15:19:16.419502 +10:00 < x-sentry-rate-limit-concurrentlimit: 200
  DEBUG   2023-06-27 15:19:16.420401 +10:00 < vary: Accept-Language, Cookie
  DEBUG   2023-06-27 15:19:16.420423 +10:00 < content-language: en
  DEBUG   2023-06-27 15:19:16.420434 +10:00 < x-frame-options: deny
  DEBUG   2023-06-27 15:19:16.420476 +10:00 < x-content-type-options: nosniff
  DEBUG   2023-06-27 15:19:16.420488 +10:00 < x-xss-protection: 1; mode=block
  DEBUG   2023-06-27 15:19:16.420553 +10:00 < content-security-policy: connect-src *; style-src * 'unsafe-inline'; frame-ancestors 'self'; script-src 'self' 'unsafe-inline' 'report-sample' 'unsafe-eval' s1.sentry-cdn.com js.sentry-cdn.com browser.sentry-cdn.com statuspage-production.s3.amazonaws.com static.zdassets.com aui-cdn.atlassian.com connect-cdn.atl-paas.net js.stripe.com ssl.google-analytics.com 'strict-dynamic' cdn.pendo.io data.pendo.io pendo-io-static.storage.googleapis.com pendo-static-5634074999128064.storage.googleapis.com; default-src *; base-uri 'none'; font-src * data:; img-src * blob: data:; object-src 'self'; report-uri https://o1.ingest.sentry.io/REDACTED
  DEBUG   2023-06-27 15:19:16.420725 +10:00 < x-envoy-attempt-count: 1
  DEBUG   2023-06-27 15:19:16.420739 +10:00 < x-envoy-upstream-service-time: 47
  DEBUG   2023-06-27 15:19:16.420750 +10:00 < x-served-by: getsentry-web-default-common-production-74df684c8c-nqhlc
  DEBUG   2023-06-27 15:19:16.420762 +10:00 < x-served-by: frontend-default-75d5b9988f-8z5z5
  DEBUG   2023-06-27 15:19:16.420772 +10:00 < strict-transport-security: max-age=31536000; includeSubDomains; preload
  DEBUG   2023-06-27 15:19:16.420784 +10:00 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
  DEBUG   2023-06-27 15:19:16.421190 +10:00 response status: 200
  DEBUG   2023-06-27 15:19:16.421219 +10:00 body: {"url":"https://sentry.io/api/0/organizations/REDACTED/chunk-upload/","chunkSize":8388608,"chunksPerRequest":64,"maxFileSize":2147483648,"maxRequestSize":33554432,"concurrency":8,"hashAlgorithm":"sha1","compression":["gzip"],"accept":["debug_files","release_files","pdbs","sources","bcsymbolmaps","il2cpp","portablepdbs","artifact_bundles"]}
  DEBUG   2023-06-27 15:19:16.424843 +10:00 built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 4 required extensions, 0 regexes  (from globset)
  DEBUG   2023-06-27 15:19:16.425908 +10:00 ignoring dist/package.json: Ignore(IgnoreMatch(Types(Glob(UnmatchedIgnore))))  (from ignore)
  DEBUG   2023-06-27 15:19:16.426037 +10:00 whitelisting dist/share/env.js: Whitelist(IgnoreMatch(Types(Glob(Matched { def: FileTypeDef { name: "js", globs: ["*.js"] } }))))  (from ignore)
  INFO    2023-06-27 15:19:16.426090 +10:00 found: dist/share/env.js (1203 bytes)
  DEBUG   2023-06-27 15:19:16.426186 +10:00 whitelisting dist/share/env.js.map: Whitelist(IgnoreMatch(Types(Glob(Matched { def: FileTypeDef { name: "map", globs: ["*.map"] } }))))  (from ignore)
  INFO    2023-06-27 15:19:16.426686 +10:00 found: dist/share/env.js.map (1297 bytes)
> Found 2 files
> Analyzing 2 sources
> Analyzing completed in 0s
> Rewriting sources
> Rewriting completed in 0.001s
> Adding source map references
> Bundling completed in 0.004s
> Bundled 2 files for upload
> Bundle ID: 1fe1e4b1-39a9-5a5a-b63a-4eb019634e01
> Optimizing completed in 0s
  DEBUG   2023-06-27 15:19:16.434222 +10:00 request POST https://sentry.io/api/0/organizations/REDACTED/artifactbundle/assemble/
  DEBUG   2023-06-27 15:19:16.434251 +10:00 using token authentication
  DEBUG   2023-06-27 15:19:16.434269 +10:00 json body: {"checksum":"9442d4a3346e27826ed3170db3252c333671f9f3","chunks":["9442d4a3346e27826ed3170db3252c333671f9f3"],"projects":["REDACTED-api"],"version":"api@1.0.2-test"}
  DEBUG   2023-06-27 15:19:16.434281 +10:00 retry number 0, max retries: 5
  DEBUG   2023-06-27 15:19:16.434505 +10:00 > POST /api/0/organizations/REDACTED/artifactbundle/assemble/ HTTP/1.1
  DEBUG   2023-06-27 15:19:16.434515 +10:00 > Host: sentry.io
  DEBUG   2023-06-27 15:19:16.434521 +10:00 > Accept: */*
  DEBUG   2023-06-27 15:19:16.434527 +10:00 > Connection: TE
  DEBUG   2023-06-27 15:19:16.434533 +10:00 > TE: gzip
  DEBUG   2023-06-27 15:19:16.434539 +10:00 > User-Agent: sentry-cli/2.19.2
  DEBUG   2023-06-27 15:19:16.434750 +10:00 > Authorization: Bearer b3f2031c***
  DEBUG   2023-06-27 15:19:16.434765 +10:00 > Content-Type: application/json
  DEBUG   2023-06-27 15:19:16.434773 +10:00 > Content-Length: 171
  DEBUG   2023-06-27 15:19:16.736040 +10:00 < HTTP/1.1 200 OK
  DEBUG   2023-06-27 15:19:16.736225 +10:00 < Server: nginx
  DEBUG   2023-06-27 15:19:16.736243 +10:00 < Date: Tue, 27 Jun 2023 05:19:16 GMT
  DEBUG   2023-06-27 15:19:16.736260 +10:00 < Content-Type: application/json
  DEBUG   2023-06-27 15:19:16.736277 +10:00 < Content-Length: 38
  DEBUG   2023-06-27 15:19:16.736292 +10:00 < Connection: keep-alive
  DEBUG   2023-06-27 15:19:16.736306 +10:00 < allow: POST, OPTIONS
  DEBUG   2023-06-27 15:19:16.736320 +10:00 < access-control-allow-methods: POST, OPTIONS
  DEBUG   2023-06-27 15:19:16.736341 +10:00 < access-control-allow-headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding, sentry-trace, baggage, X-CSRFToken
  DEBUG   2023-06-27 15:19:16.736394 +10:00 < access-control-expose-headers: X-Sentry-Error, Retry-After
  DEBUG   2023-06-27 15:19:16.736415 +10:00 < access-control-allow-origin: *
  DEBUG   2023-06-27 15:19:16.736431 +10:00 < x-sentry-rate-limit-remaining: 39
  DEBUG   2023-06-27 15:19:16.736447 +10:00 < x-sentry-rate-limit-limit: 40
  DEBUG   2023-06-27 15:19:16.736462 +10:00 < x-sentry-rate-limit-reset: 1687843157
  DEBUG   2023-06-27 15:19:16.736477 +10:00 < x-sentry-rate-limit-concurrentremaining: 24
  DEBUG   2023-06-27 15:19:16.736491 +10:00 < x-sentry-rate-limit-concurrentlimit: 25
  DEBUG   2023-06-27 15:19:16.737445 +10:00 < vary: Accept-Language, Cookie
  DEBUG   2023-06-27 15:19:16.737471 +10:00 < content-language: en
  DEBUG   2023-06-27 15:19:16.737485 +10:00 < x-frame-options: deny
  DEBUG   2023-06-27 15:19:16.737502 +10:00 < x-content-type-options: nosniff
  DEBUG   2023-06-27 15:19:16.737516 +10:00 < x-xss-protection: 1; mode=block
  DEBUG   2023-06-27 15:19:16.737539 +10:00 < content-security-policy: connect-src *; font-src * data:; default-src *; frame-ancestors 'self'; script-src 'self' 'unsafe-inline' 'report-sample' 'unsafe-eval' s1.sentry-cdn.com js.sentry-cdn.com browser.sentry-cdn.com statuspage-production.s3.amazonaws.com static.zdassets.com aui-cdn.atlassian.com connect-cdn.atl-paas.net js.stripe.com ssl.google-analytics.com 'strict-dynamic' cdn.pendo.io data.pendo.io pendo-io-static.storage.googleapis.com pendo-static-5634074999128064.storage.googleapis.com; object-src 'self'; base-uri 'none'; style-src * 'unsafe-inline'; img-src * blob: data:; report-uri https://o1.ingest.sentry.io/REDACTED
  DEBUG   2023-06-27 15:19:16.738388 +10:00 < x-envoy-attempt-count: 1
  DEBUG   2023-06-27 15:19:16.738417 +10:00 < x-envoy-upstream-service-time: 49
  DEBUG   2023-06-27 15:19:16.738435 +10:00 < x-served-by: getsentry-web-default-common-production-74df684c8c-lfnnk
  DEBUG   2023-06-27 15:19:16.738452 +10:00 < x-served-by: frontend-default-75d5b9988f-q2zrz
  DEBUG   2023-06-27 15:19:16.738468 +10:00 < strict-transport-security: max-age=31536000; includeSubDomains; preload
  DEBUG   2023-06-27 15:19:16.738484 +10:00 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
  DEBUG   2023-06-27 15:19:16.738992 +10:00 response status: 200
  DEBUG   2023-06-27 15:19:16.739017 +10:00 body: {"state":"created","missingChunks":[]}
  INFO    2023-06-27 15:19:16.740428 +10:00 using 'gzip' compression for chunk upload
> Uploading completed in 0s
> Nothing to upload, all files are on the server

Source Map Upload Report
  Minified Scripts
    ~/share/env.js (sourcemap at env.js.map, debug id 3663fc23-2c55-5b49-9a9a-811f20156e43)
  Source Maps
    ~/share/env.js.map (debug id 3663fc23-2c55-5b49-9a9a-811f20156e43)
iambriccardo commented 1 year ago

Hi @p12y, this is a known issue. We had to rollout a backend change for making the system work properly but the deployment was shifted, it should be going out in ~1 hour. Sorry for the inconvenience!

iambriccardo commented 1 year ago

We now enabled the backend functionality, should be all working now! Let me know

p12y commented 1 year ago

@iambriccardo Yep, working fine now. Thanks for letting me know!