getsentry / sentry-wizard

Sentry Project Setup Wizard
MIT License
190 stars 48 forks source link

sentry.properties file does not contain all needed fields #512

Open troZee opened 10 months ago

troZee commented 10 months ago

Environment

MacOS, brew

Steps to Reproduce

  1. run brew install getsentry/tools/sentry-wizard && sentry-wizard -i android in https://github.com/getsentry/sentry-react-native/tree/main/samples/react-native
  2. checkout file samples/react-native/android/sentry.properties
  3. run command ./gradlew assembleRelease for testing crashes
  4. get error: A project slug is required

Expected Result

This file should contain

defaults.org=__ORGNAME__
defaults.url=https://sentry.io/
defaults.project= __PROJECTNAME__
auth.token=___TOKEN

Actual Result

This file contains only this key

auth.token=___TOKEN___
Lms24 commented 10 months ago

Hi, @troZee thanks for writing in! We ideally want to move away from storing more than the auth token in the sentry.properties file. The reason is that the auth token has to be kept secret while properties like url, project and org can be safely commited to your repo.

I'm a bit confused though because according to your repro steps you're running the Android wizard in a react native project? Maybe I'm missing something but perhaps you want to give our dedicated React Native wizard a try?

troZee commented 9 months ago

I'm a bit confused though because according to your file paths, you're running the Android wizard in a react native project?

Without it, I am not able to build the release version of the react native app, since the gradle plugin is looking for that file. This is why I used that wizard for Android.

I used https://docs.sentry.io/platforms/react-native/#install but it did not work

Lms24 commented 9 months ago

@krystofwoldrich would you mind taking a look at this?

troZee commented 9 months ago

@Lms24 to reproduce that issue, I just downloaded the example and built an Android release version of the example app.

github-actions[bot] commented 9 months ago

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

krystofwoldrich commented 9 months ago

@troZee Hi, thanks for the message.

The sample application is set up to be built with the SDK from the source and it's not expected that the wizard will work with it. The wizard setups apps with production publicly available packages. You can change the values in the existing sentry.properties and App.tsx to send errors from the Sample to your project.

The Android wizard only adds the token to sentry.properties which is correct. But the RN Sentry Android Gradle plugin requires also project and org as you mentioned. This is filled in by the RN wizard.

Could you share what happened with the RN Wizard? Have you tried it in your project or only in the Sentry SDK Sample?