Sentry-cli: Error uploading bundle and sourcemaps (caused by: sentry reported an error: request failure (http status: 500))

Created on 12 Dec 2019  路  3Comments  路  Source: getsentry/sentry-cli

Hey there,

I'm trying to upload my bundle + sourcemaps but I always end up with this error. I wonder if any of you had this problem already or knows how to solve it.

error: API request failed
  caused by: sentry reported an error: request failure (http status: 500)
  Object({"detail": String("Internal Error"), "errorId": String("1e23ef142b554a588de66f68448b8c06")})

This is my setup:

  1. This is what my .sentryclirc looks like
[defaults]
org=ORG
url=https://sentry.ORG.cloud/
project=MY-PROJ

[auth]
token=xxxdfcbf159d425ayyy04a05b7bbb52a8a83dd245d9b4f27zzzda5f93a20df82
  1. I create the release like this:
    sentry-cli releases new $RELEASE_VERSION
  2. Then I upload the files like this: sentry-cli releases files $RELEASE_VERSION upload-sourcemaps ./build/public --rewrite

I read somewhere that the release name can't be too big so I tried with a short hash such as a7e2dc46c297c355 and I still get the same error.
I have both a app.bundle.js and a app.bundle.js.map in the ./build/public that get recognized by the cli according to the logs:

> Analyzing 2 sources
> Rewriting sources
> Adding source map references
> Uploading source maps for release a7e2dc46c297c355

The releases are created correctly, the only thing is that the artifacts are never available.
Screenshot 2019-12-12 at 11 30 42

I will be happy to provide any other info, if needed.

Thanks in advance.

Most helpful comment

Hi, we also have this error. We deployed our Sentry server in the docker from https://github.com/getsentry/onpremise a couple of days ago.

We found that the problem in Sentry server. By default, the Sentry server tries to save the bundle files in its own file storage, which is located in "/data/files" path.
But the Sentry server does not have write permissions to this directory because it does not own this directory.

For fix, if you use "onpremise", you need to execute the following command on the machine where you run a Sentry server.

[root@localhost onpremise]# docker exec onpremise_web_1 chown -R sentry:sentry /data/files

All 3 comments

Hi, we also have this error. We deployed our Sentry server in the docker from https://github.com/getsentry/onpremise a couple of days ago.

We found that the problem in Sentry server. By default, the Sentry server tries to save the bundle files in its own file storage, which is located in "/data/files" path.
But the Sentry server does not have write permissions to this directory because it does not own this directory.

For fix, if you use "onpremise", you need to execute the following command on the machine where you run a Sentry server.

[root@localhost onpremise]# docker exec onpremise_web_1 chown -R sentry:sentry /data/files

Thanks @insantr!

cc @BYK this is probably something that we might want to add to the OnPremise documentation.

This was a bug on our setup which should be fixed a few weeks ago. Thanks for the heads up @kamilogorek!

Was this page helpful?
0 / 5 - 0 ratings