Sentry-react-native: error: bad sentry url: not on URL root (Processing react-native sourcemaps for Sentry upload)

Created on 16 Oct 2017  ·  5Comments  ·  Source: getsentry/sentry-react-native

OS:

  • [ ] Windows
  • [ ] MacOS
  • [X] Linux (CircleCI build container)

_Platform:_

  • [ ] iOS
  • [X] Android

Output of node -v && npm -v && npm ls --prod --depth=0

v6.9.1
5.4.2
[email protected] /Users/**/MyProject
├── [email protected]
├── [email protected]
├── [email protected]

Config:

Sentry.config('https://[email protected]/...', {
  // No additional config
}).install()

I have following issue:
When Processing react-native sourcemaps for Sentry upload. for the Android project, getting the following error:

error: bad sentry url: not on URL root (https://***@sentry.io/***)

Which I found the error in this file:
https://github.com/getsentry/sentry-cli/blob/master/src/config.rs#L139

The URL that is being printed in the stack trace is the DSN (url) in our sentry.properties file created when react-native link react-native-sentry.

Steps to reproduce:

  • ./gradlew test within android folder from a circleci config

Actual result:

bundle: start
bundle: finish
bundle: Writing bundle output to: /home/circleci/android/android/app/build/intermediates/assets/release/index.android.bundle
bundle: Writing sourcemap output to: /home/circleci/android/android/app/build/intermediates/assets/release/index.android.bundle.map
bundle: Done writing bundle output
bundle: Done writing sourcemap output
bundle: Copying 30 asset files
bundle: Done copying assets
Processing react-native sourcemaps for Sentry upload.
> Analyzing 2 sources
> Rewriting sources
> Adding source map references
error: bad sentry url: not on URL root (https://***@sentry.io/***)

Expected result:

  • Successful build

Most helpful comment

If you using react-native-config and you defined SENTRY_URL=https://***.ingest.sentry.io/*** will not work.
You can change SENTRY_URL to SENTRY_XXX, it worked

All 5 comments

Looks like its trying to upload sourcemaps during a test, which I may try to disable - but the error looks like one I may run into doing a production build as well.

Side-question : Is there a way to disable uploading sourcemaps?

Hey, check you sentry.properties file, your defaults.url just should be https://sentry.io.
You can disable it in your gradle build by uncommenting the the sentry-react native gradle script.

Ok, thank you! I must have mistaken it for the DSN when linking.

I am having this same error even though my sentry.properties contain the defaults.url as https://sentry.io/

Here is the other values in sentry.propertis (android and ios are the same)

`defaults.url=https://sentry.io/

defaults.org=org

defaults.project=prj_name

auth.token=*
`

sentry-cli login also throws the same error and .sentryclirc file contains an auth token which is same as the token in my sentry.properties file and in my sentry dashboard under Settings
Account > API > Auth Tokens

I tried unlinking and linking sentry from react native but it gives me the same error even after that

the url shows up the error is the same url I am using under my App.js file
Sentry.config(https://**@sentry.io/**).install()
Here is the error trace

`sentry-cli login --log-level=debug
INFO 2019-03-28 11:28:08.416812 +05:30 Loaded config from /.sentryclirc

DEBUG 2019-03-28 11:28:08.417759 +05:30 sentry-cli version: 1.40.0, platform: "darwin", architecture: "x86_64"

INFO 2019-03-28 11:28:08.417786 +05:30 sentry-cli was invoked with the following command line: "sentry-cli" "login" "--log-level=debug"

DEBUG 2019-03-28 11:28:08.418029 +05:30 error: running update nagger

INFO 2019-03-28 11:28:08.418935 +05:30 Skipping update nagger update check

error: bad sentry url: not on URL root (https://@sentry.io/)

DEBUG 2019-03-28 11:28:08.420589 +05:30 client close; no transport to shut down (from sentry)`

My android app immediately crashes as well when sentry related code is there.

If you using react-native-config and you defined SENTRY_URL=https://***.ingest.sentry.io/*** will not work.
You can change SENTRY_URL to SENTRY_XXX, it worked

Was this page helpful?
0 / 5 - 0 ratings