413 Error When Uploading bundle.js.map

I ran upload-sourcemaps with the sentry CLI. This usually works, but for my newest release, I am seeing:

Running with sourcemap validation
...
All Good!
Uploading sourcemaps for release af84b7
bundle.js.map -> https://..../bundle.js.map
error: could not perform API request: http error: generic error (413)
1 Like

413 status code is “Request Entity Too Large” – I’m guessing this means your source map file is too large. There is an upper limit of 20 MB at the moment.

You could try omitting sourcesContent (see your build config) to make your source map smaller in order to fit under the limit … but this will remove some context from stack traces.

Any chance that limit can get raised?

1 Like

This issue is very important to us as well.

+1 on this one! We really need this raised aswell

Good news – the limit has been raised to 40 MB.

1 Like

From what I can tell, our map file is 9.2M, but we’re still seeing this error somehow. It just started recently and we haven’t changed much.

Was there any change recently on getsentry that could have caused this?

As of today, I am also seeing 413 errors on deploy.

@gingerlime @cancan101 – are you still seeing this?

Seems to work now! What was the problem?

We raised the size limits recently due to improvements on the processing side.

We’re seeing those 413s again :frowning:

seeing 413 again. biggest file is 15mb

Is this always through sentry-cli? Can you set SENTRY_LOG_LEVEL=debug as an environment variable when running the command? That’ll give us more useful information to debug with. As of right now, I’ve manually tested all of our load balancers and the correct limits exist in the correct endpoints. The only thing I can think of is somehow you’re hitting the wrong endpoint.

Also a dump of sentry-cli info would be useful.

I’d like to provide more info, but re-running solved the issue - same exact configuration :confused:

Same here. We’re not using the CLI. We’re using the JS API client.

@gingerlime @itajaja – are you seeing 413 responses from Raven.js, in the browser, as errors occur? Or are you seeing 413 HTTP responses in the act of uploading source maps via the releases/artifacts HTTP API?

@itajaja can you enable debug logging for the next time this happens? It’s really hard to debug this stuff without having more information for us to see. There’s nothing to indicate on my side that this should be happening and I’ve manually verified many times with 30MB files without an issue.

I’m getting this as well. Debug doesn’t log much:
da.app.dd4430cfd0d76e4bca37.js.map -> ~/assets/da.app.dd4430cfd0d76e4bca37.js.map
[INFO] sentry_cli::api request POST ://sentry.io/api/0/projects/*******/***/releases/master-da-c02f1d135df51be48adf807488dce92a2296bd0b/files/
[INFO] sentry_cli::api using token authentication
[INFO] sentry_cli::api sending form data
[INFO] sentry_cli::api response: 413

Re-running sometimes solved the problem, but this time it was stuck at 413. File is 12MB.

When I deleted release, recreated it, and reuploaded all files, it worked!

teamcity@build-1:~/build/****$ sentry-cli info
[INFO] sentry_cli::api request GET https://sentry.io/api/0/
[INFO] sentry_cli::api using token authentication
[INFO] sentry_cli::api response: 200
Sentry Server: https://sentry.io/
Organization: -
Project: -

Authentication Info:
Method: Auth Token
User: mst@*.com (id=)
Scopes:
* project:read
* project:write
* project:delete
* project:releases
* team:read
* team:write
* team:delete
* event:read
* event:write
* event:delete
* org:read
* org:write
* org:delete
* member:read
* member:write
* member:delete