Sentry-react-native: Upload Debug Symbols - error: bad sentry url: not on URL root

Created on 29 Nov 2017  ·  11Comments  ·  Source: getsentry/sentry-react-native

OS:

  • [ ] Windows
  • [ x] MacOS
  • [ ] Linux

_Platform:_

  • [x ] iOS
  • [ ] Android

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

v6.10.3
3.10.10
[email protected] /Users/username/workspace/knipmyappter/now
├── [email protected] -> /Users/username/workspace/brain invalid
├── [email protected]
├── [email protected]
├── [email protected]
├── UNMET PEER DEPENDENCY [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] (git+https://github.com/chocky335/react-native-fbsdk.git#47b906abfe4ad8328c850b1d9dd3c8787c2c51b9)
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] (git+https://github.com/chocky335/react-native-notifications.git#0bd498563de53f35e5058faa4160bbb282b2ad40)
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] (git+https://github.com/chocky335/react-native-zendesk-chat.git#b5a40766875166a0fe1c39a4af97af3903affc79)
├── [email protected]
├── [email protected] (git+https://github.com/react-community/react-navigation.git#368bc615c10a886d2aad411113c0dda046a290b6)
└── [email protected]

npm ERR! peer dep missing: react@>=15.3.1, required by [email protected]
npm ERR! peer dep missing: react@>=0.14.5, required by [email protected]
npm ERR! invalid: [email protected] /Users/username/workspace/myapp/now/node_modules/brain
npm ERR! extraneous: [email protected] /Users/username/workspace/myapp/now/node_modules/brain/node_modules/elm-analyse
npm ERR! extraneous: [email protected] /Users/username/workspace/myapp/now/node_modules/brain/node_modules/elm-format
npm ERR! extraneous: [email protected] /Users/username/workspace/myapp/now/node_modules/brain/node_modules/husky
npm ERR! extraneous: [email protected] /Users/username/workspace/myapp/now/node_modules/brain/node_modules/lint-staged
npm ERR! extraneous: [email protected] /Users/username/workspace/myapp/now/node_modules/brain/node_modules/node-pre-gyp
npm ERR! extraneous: [email protected] /Users/username/workspace/myapp/now/node_modules/brain/node_modules/elm-test
npm ERR! missing: plist@^1.2.0, required by [email protected]

Config:

Sentry.config('https://[email protected]/...').install()

Upload Debug Symbols to Sentry:

export SENTRY_PROPERTIES=sentry.properties
source ../helpers/load-node.sh

../node_modules/sentry-cli-binary/bin/sentry-cli --log-level=debug upload-dsym

Where helpers/load-node.sh is a script which initializes NODE_BINARY as described in the docs


I have following issue:

Upload Debug Symbols to Sentry failed.

Steps to reproduce:

  • Build in XCode

Actual result:

[INFO] sentry_cli::commands::upload_dsym Scanning /Users/username/Library/Developer/Xcode/DerivedData/myapp-ddwelhwizohwpeavsjraqmpfxrwa/Build/Products/Debug-iphoneos/myapp.app/PlugIns/myappTests.xctest.dSYM
Batch 1
> Found 1 debug symbol files.
> Checking for missing debug symbol files on server
[INFO] sentry_cli::commands::upload_dsym Checking for missing debug symbols: [
    DSymRef {
        arc_name: "DebugSymbols/Contents/Resources/DWARF/myappTests",
        checksum: "2b7ea9ef7554b8e9cd1c527afe6d5e0e824509cb",
        size: 5384656,
        uuids: [
            Uuid("aaaabbbb-cccc-dddd-eeee-ffffgggghhhh")
        ],
        has_hidden_symbols: false
    }
]
error: bad sentry url: not on URL root (https://[email protected]/...)

Expected result:

No errors

Most helpful comment

For anyone wondering, I had the exact same issue. Turned out I had a environment variable SENTRY_URL as my DSN url (whoops), stored in a dotenv file which was piped in on build time.

All 11 comments

Hey, can you send me your sentry.properties file?
It looks like the url is wrong there, it should be https://sentry.io/

Hi! I've already check it, and it says defaults.url=https://sentry.io/

Here's the content (partially censored):

defaults.url=https://sentry.io/
defaults.org=myapp
defaults.project=myapp
auth.token=🔑
cli.executable=node_modules/sentry-cli-binary/bin/sentry-cli

Hi there, I just edited this for you. Please never post your auth token in public places like Github, Stack Overflow or the support forum. Doing so might give others access to sensitive data in your account.

Can you call sentry-cli info in your ios and paste the output please?

...I got:

$ sentry-cli info
zsh: command not found: sentry-cli

...which I suppose qualifies me as an idiot. I don't have it installed globally -_-

EDIT:

the local one says this, in any case:

$ ../node_modules/sentry-cli-binary/bin/sentry-cli info
Sentry Server: https://sentry.io/
Default Organization: -
Default Project: -

Can you post a link to an event or to your org, it's strange that Organization and Project is empty?!
Is you project / org actually myapp, I suppose not?

@pietro909 Did the issue resolve by itself?

hi @HazAT sorry for the delay. I reviewed the whole toolchain and changed our approach to the problem (using schemes and pre-build scripts rather than the scripts in build phases) and the problem _resolved by itself_.

I still don't know what the exact problem was, but for me the issue is gone.
Thank you for your assistance!

For anyone wondering, I had the exact same issue. Turned out I had a environment variable SENTRY_URL as my DSN url (whoops), stored in a dotenv file which was piped in on build time.

Thank you @birkir - with some ~1y delay I realized what was breaking my build: using the react-native-config package I was defining a SENTRY_URL environment variable.

Name-spacing it solve my problem.

Almost same issue here
for me sentry-cli login also gives the same error
here are the details : https://github.com/getsentry/react-native-sentry/issues/273#issuecomment-477459934

Was this page helpful?
0 / 5 - 0 ratings