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

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

Open
troZee opened this issue Dec 6, 2023 · 6 comments
Open

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

troZee opened this issue Dec 6, 2023 · 6 comments

Comments

@troZee
Copy link

troZee commented Dec 6, 2023

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
Copy link
Member

Lms24 commented Dec 7, 2023

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
Copy link
Author

troZee commented Dec 15, 2023

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
Copy link
Member

Lms24 commented Dec 15, 2023

@krystofwoldrich would you mind taking a look at this?

@troZee
Copy link
Author

troZee commented Dec 15, 2023

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

Copy link

github-actions bot commented Jan 6, 2024

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
Copy link
Member

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants