Sentry-react-native: Link without modify podfile and ignore sentry wizard.

Created on 26 Dec 2017  ·  6Comments  ·  Source: getsentry/sentry-react-native

OS:

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

_Platform:_

  • [x] iOS
  • [x] Android

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

v6.9.5
3.10.10
[email protected] /Users/phutang/workspace/eh-mobile-pro
├── @expo/[email protected] invalid
├── @remobile/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── UNMET PEER DEPENDENCY [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]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] invalid
├── [email protected] invalid
├── [email protected]
├── [email protected] invalid
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Config:

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

Hi,

I'm trying to upgrade sentry from deprecated version. But I'm facing 3 problesm at this time.

  • Sentry Wizard keep asking me everytime when I run yarn and modify my my native code. Is there any way to avoid it?
  • you add pod 'SentryReactNative', :path => '../node_modules/react-native-sentry', to podfile. The problem is it's clone another version (react/yoga, etc) and can't load bundle because of duplicate package json from react. is there any way to setup with you add this pod (like link ios project like other 3rd libraries instead of link by pod?)

    • I have 2 config, one for staging, one for production. Is it possible to config setting point to staging sentry project and production sentry project (the old version I just simply name the config in ENV, I already have for 2 difference projects for staging and production).

Most helpful comment

Same Problem

All 6 comments

Same Problem

Hey, just to clear things up.

  1. The wizard always asks you stuff even if you just do yarn and not react-native link react-native-sentry? If that's the case then it's a bug.

  2. Not really sure if I fully understand the problem. react-native-sentry does not clone a version of yoga or react so I don't understand why it should be duplicate see:
    https://facebook.github.io/react-native/docs/integration-with-existing-apps.html#configuring-cocoapods-dependencies

  3. So we do not fully support this yet and we recommend setting a tag env with

Sentry.setTagsContext({
  "environment": "production",
});

With this, you can filter incoming events easily and do not have to submit a new build if you want to release it in iTunes Connect.

Hi @HazAT

  1. Please check attached file. How about if it's disabled by some flag or command?
  2. I know the integration guide, but our project j 100% react-native and I linked library by manual (add in xcode), the problem if moving to pod (add project as a pod module) is a lot of things to do like moving react from node_module to pod and other project, I just want to link it like manual way (or react-native 0.4x way) I do manual but it modify and modify by the wizard eveytime I run yarn
  3. Agree with you, I will update code.

dec-28-2017 09-52-45

Update: about pod issue (no2 issue), I found a way to work around. Downgrade to 0.49 then add library then upgrade again to 0.51. It's not add podfile anymore.

@thphu There is a link step running in your install script ... do you see the first grey line starting with:
RNFB_ANDROID_PERMISSION=true .... ?
The command called in there is .... index.js link

So your build process is definitely special, check your package.json for the install/link command.
If you can't change it you can try to add
SENTRY_WIZARD_QUIET=true so the wizard will not ask anything.

thanks @HazAT I add SENTRY_WIZARD_QUIET=true and seem eveything is ok now. I think it's not an issue anymore

Was this page helpful?
0 / 5 - 0 ratings