'bad json' error by sentry-cli when uploading dSYM

There is my sentry-cli configuration(sentry-cli info):

Sentry Server:    https://***
Organization:     o***
Project:          p***

Authentication Info:
  Method:         Auth Token
  (cannot auth: bad json: EOF while parsing a value at line 1 column 0)

There has some infomation when I use sentry-cli upload-dsym /Users/*/Library/Developer/Xcode/Archives/2016-11-01/*.xcarchive/dSYMs to upload dSYM.

Finding symbols in /Users/***/Library/Developer/Xcode/Archives/2016-11-01/***.xcarchive/dSYMs
  DebugSymbols/********.dSYM/Contents/Resources/DWARF/SentrySwift
  DebugSymbols/********.dSYM/Contents/Resources/DWARF/libswiftCore.dylib
  ...
error: bad json: EOF while parsing a value at line 1 column 0

The sentry-cli’s version is 0.19.2.

Can you run this with verbose mode? Also are you sending this against a custom sentry server that might be too old to have that API?

I’ve got the exact same problem here.

Did you find any solution?

Please run this in debug mode (--log-level=debug) so we can see what’s going on.

It looks like I am redirected to the /auth/login/ which is odd because I am pretty sure that the root of our install is at:

export SENTRY_URL=https://sentry.prod.omitted/operations/

This is the request/response:

[INFO] sentry_cli::api request GET https://sentry.prod.omitted/operations/api/0/projects/mozilla-mobile/firefox-ios/files/dsyms/unknown/?checksums=...omitted...
[INFO] sentry_cli::api using token authentication
[INFO] sentry_cli::api response: 302
[DEBUG] sentry_cli::api headers:
[DEBUG] sentry_cli::api   Content-Language: en
[DEBUG] sentry_cli::api   Content-Type: text/html; charset=utf-8
[DEBUG] sentry_cli::api   Date: Mon, 01 May 2017 14:44:15 GMT
[DEBUG] sentry_cli::api   Location: http://sentry.prod.omitted/auth/login/
[DEBUG] sentry_cli::api   Server: nginx
[DEBUG] sentry_cli::api   Set-Cookie: sentrysid="...omitted..."; expires=Mon, 15-May-2017 14:44:15 GMT; httponly; Max-Age=1209600; Path=/
[DEBUG] sentry_cli::api   Vary: Accept-Language, Cookie
[DEBUG] sentry_cli::api   X-Backend-Server: ip-omitted
[DEBUG] sentry_cli::api   X-Content-Type-Options: nosniff
[DEBUG] sentry_cli::api   X-Frame-Options: deny
[DEBUG] sentry_cli::api   X-XSS-Protection: 1; mode=block
[DEBUG] sentry_cli::api   Content-Length: 0
[DEBUG] sentry_cli::api   Connection: keep-alive
[DEBUG] sentry_cli::api body:
error: bad json: EOF while parsing a value at line 1 column 0

Senty only ever runs on the URL root so /operations/ is unlikely to be the path. Try removing that.

I get a 404 if I remove the /operations/ part. Let me talk to our ops people to find out what is happening here. They may have deployed it under a different root.

(This install definitely runs under a different root)

Is it possible that /operations/ is the organization name? In our nginx config, we simply map it as:

location / {
    proxy_redirect off;
    proxy_set_header   Host              $host;
    proxy_set_header   X-Real-IP         $remote_addr;
    proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
    proxy_set_header   X-Forwarded-Proto $scheme;
    proxy_pass http://localhost:9000;
}

So that looks pretty standard.

The organization name does not belong into the sentry server url. Just
remove it.

Any update on the above issue. Even i am facing the same.