getsentry/sentry-cli

414 Request-URI Too Large validating sources

yharaskrik opened this issue · 5 comments

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Have an Angular app with hundreds* (the specific number I am not sure but enough that the uri is too long, ours is 181 source files, see output below)
  2. Upload those to sentry and then see GET https://sentry.io/api/0/projects/*******/orient/releases/v2.123.27-rc.1/files/?cursor=&checksum= fail

Expected Result

Shouldn't fail regardless of number of sourcemaps

Actual Result

orient: > Found 181 files
orient: > Analyzing 181 sources
orient: > Rewriting sources
orient: > Adding source map references
orient: > Validating sources
orient:   *****   2023-06-23 17:16:33.068446551 +00:00 request GET https://sentry.io/api/0/projects/*******/orient/releases/v2.123.27-rc.1/files/?cursor=&checksum=<lots of checksums>
orient:   *****   2023-06-23 17:16:33.069493217 +00:00 using token authentication
orient:   *****   2023-06-23 17:16:33.069944181 +00:00 retry number 0, max retries: 0
orient:   *****   2023-06-23 17:16:33.071572675 +00:00 > GET /api/0/projects/*******/orient/releases/v2.123.27-rc.1/files/?cursor=&checksum=<lots of checksums>
orient:   *****   2023-06-23 17:16:33.072295380 +00:00 > Host: sentry.io
orient:   *****   2023-06-23 17:16:33.072697151 +00:00 > Accept: */*
orient:   *****   2023-06-23 17:16:33.073130734 +00:00 > Connection: TE
orient:   *****   2023-06-23 17:16:33.073519952 +00:00 > TE: gzip
orient:   *****   2023-06-23 17:16:33.073897586 +00:00 > User-Agent: sentry-cli/2.19.1
orient:   *****   2023-06-23 17:16:33.074282785 +00:00 > Authorization: Bearer 1563aac8***
orient:   *****   2023-06-23 17:16:33.101292384 +00:00 < HTTP/1.1 414 Request-URI Too Large
orient:   *****   2023-06-23 17:16:33.101330043 +00:00 < Server: nginx
orient:   *****   2023-06-23 17:16:33.101340066 +00:00 < Date: Fri, 23 Jun 2023 17:16:33 GMT
orient:   *****   2023-06-23 17:16:33.101349074 +00:00 < Content-Type: text/html
orient:   *****   2023-06-23 17:16:33.101358863 +00:00 < Content-Length: 170
orient:   *****   2023-06-23 17:16:33.101367849 +00:00 < Connection: close
orient:   *****   2023-06-23 17:16:33.101374999 +00:00 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
orient:   *****   2023-06-23 17:16:33.102625141 +00:00 response status: 414
orient:   *****   2023-06-23 17:16:33.102652009 +00:00 body: <html>
orient: <head><title>414 Request-URI Too Large</title></head>
orient: <body>
orient: <center><h1>414 Request-URI Too Large</h1></center>
orient: <hr><center>nginx</center>
orient: </body>
orient: </html>
orient: > Bundled 181 files for upload
orient: > Uploaded files to Sentry
orient: > File upload complete (processing pending on server)
orient: > Organization: *******
orient: > Project: orient
orient: > Release: v2.123.27-rc.1
orient: > Dist: None
orient: > Upload type: artifact bundle
orient: Source Map Upload Report
orient:   Scripts
...our script names
orient:   Minified Scripts
...our minified script names
orient:   Source Maps
...our sourcemap names
orient:   *****   2023-06-23 17:16:37.114165893 +00:00 skipping update nagger because session is not attended
orient: [Sentry] Associating commits: orient:v2.123.27-rc.1

Everything is working except the validating which I think means the sourcemaps won't actually be used in Sentry?

Product Area

Releases

Link

No response

DSN

https://3346dfbe72094b0eb0159e107ea60754@o180743.ingest.sentry.io/5526069

Version

2.19.1

Assigning to @getsentry/support for routing ⏲️

Routing to @getsentry/product-owners-releases for triage ⏲️

Hey @yharaskrik, we are aware of this issue and will work on fixing it.
In the meantime, if you are using sentry-cli directly, you can pass --no-dedupe flag to skip this functionality.

Hey @yharaskrik, we are aware of this issue and will work on fixing it.
In the meantime, if you are using sentry-cli directly, you can pass --no-dedupe flag to skip this functionality.

Thanks! What command do I pass the no dedupe flag to?

Ah looks like it would be here
npx @sentry/cli@latest releases files "$RELEASE_NAME" upload-sourcemaps "$DIR" -p "$APP" --validate --no-dedupe