Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native link overwrites ios/sentry.properties #465

Closed
3 tasks
emilkarl opened this issue Aug 15, 2018 · 3 comments
Closed
3 tasks

react-native link overwrites ios/sentry.properties #465

emilkarl opened this issue Aug 15, 2018 · 3 comments

Comments

@emilkarl
Copy link

OS:

  • Windows
  • [x ] MacOS
  • Linux

Platform:

  • [x ] iOS
  • Android

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

v8.9.4
5.6.0
XXXX
├── [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]
├── [email protected]
├── [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(SENTRY_CONFIG_URL).install();

#package.json
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest",
    "postinstall": "SENTRY_WIZARD_SKIP_CONNECT=1 SENTRY_WIZARD_QUIET=1 react-native link"
  },

When react-native link runs it overwrites an already configured envrionment. I think the wizard should be skipped it its already configured.

yarn install

➜  yarn install
yarn install v1.7.0
[1/4] 🔍  Resolving packages...
success Already up-to-date.
$ SENTRY_WIZARD_SKIP_CONNECT=1 SENTRY_WIZARD_QUIET=1 react-native link
rnpm-install info Platform 'ios' module lottie-react-native is already linked
rnpm-install info Platform 'android' module lottie-react-native is already linked
rnpm-install info Platform 'ios' module react-native-onepassword is already linked
rnpm-install info Platform 'ios' module react-native-pusher-push-notifications is already linked
rnpm-install info Platform 'android' module react-native-pusher-push-notifications is already linked
rnpm-install info Platform 'ios' module react-native-sentry is already linked
rnpm-install info Platform 'android' module react-native-sentry is already linked
Quiet mode On, DAMA, don't ask me anything
Running Sentry Wizard...
version: 0.11.1 | sentry-cli version: 1.34.0
Sentry Wizard will you help to configure your project
Thank you for using Sentry :)

Skipping connection to Sentry
Successfully set up android for react-native
Successfully set up ios for react-native

🎉  Successfully set up Sentry for your project 🎉

And after that the ios/sentry.properties is overwritten with a default file...

defaults.url=https://sentry.io/
#defaults.org=
#defaults.project=
#auth.token=
cli.executable=node_modules/@sentry/cli/bin/sentry-cli
@HazAT
Copy link
Member

HazAT commented Sep 27, 2018

I am sorry, I know it's been a long time, but can you run the command also with SENTRY_WIZARD_DEBUG=true to see why it tries to link again?

@abouariu-clarisoft
Copy link

This issue is still happening. As a workaround, I committed on source control (private repo) the sentry.properties files and after react-native link I run:

git checkout android/sentry.properties
git checkout ios/sentry.properties

@HazAT
Copy link
Member

HazAT commented Sep 4, 2019

I am closing all old issues, please if this is still a problem feel free to revive it.
Also, consider moving to our new SDK @sentry/react-native if it still happens there please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants