OS:
_Platform:_
SDK:
@sentry/react-nativereact-native-sentryreact-native version: 0.61.5
I've installed the @sentry/react-native package and ran through the wizard which has updated my React Native project.
When I try to compile the app for Android my build fails due to this error:
INFO [2020-01-02 00:54:13.57]: â–¸ > Task :app:bundleProductionReleaseJsAndAssets_SentryUpload FAILED
 | INFO [2020-01-02 00:54:13.57]: ▸ INFO 2020-01-02 00:54:13.540885495 +00:00 Loaded config from /root/.sentryclirc
 | INFO [2020-01-02 00:54:13.57]: ▸ DEBUG 2020-01-02 00:54:13.540939361 +00:00 sentry-cli version: 1.49.0, platform: "linux", architecture: "x86_64"
 | INFO [2020-01-02 00:54:13.57]: ▸ INFO 2020-01-02 00:54:13.540956819 +00:00 sentry-cli was invoked with the following command line: "/workdir/node_modules/@sentry/cli/sentry-cli" "--log-level" "debug" "react-native" "gradle" "--bundle" "/workdir/packages/native/android/app/build/generated/assets/react/production/release/index.android.bundle" "--sourcemap" "/workdir/packages/native/android/app/build/generated/sourcemaps/react/production/release/index.android.bundle.map" "--release" "my-app-1.2.0" "--dist" "1"
 | INFO [2020-01-02 00:54:13.57]: ▸ DEBUG 2020-01-02 00:54:13.540984948 +00:00 error: running update nagger
 | INFO [2020-01-02 00:54:13.58]: ▸ DEBUG 2020-01-02 00:54:13.540993535 +00:00 skipping update nagger because session is not attended
 | INFO [2020-01-02 00:54:13.58]: ▸ error: An organization slug is required (provide with --org)
 | INFO [2020-01-02 00:54:13.58]: ▸ DEBUG 2020-01-02 00:54:13.548006159 +00:00 client close; no transport to shut down (from sentry)
 | INFO [2020-01-02 00:54:13.58]: ▸ > Task :app:bundleProductionReleaseJsAndAssets_SentryUploadCleanUp SKIPPED
 | INFO [2020-01-02 00:54:13.67]: ▸ FAILURE: Build failed with an exception.
 | INFO [2020-01-02 00:54:13.67]: ▸ * What went wrong:
 | INFO [2020-01-02 00:54:13.67]: ▸ Execution failed for task ':app:bundleProductionReleaseJsAndAssets_SentryUpload'.
 | INFO [2020-01-02 00:54:13.67]: ▸ > Process 'command '/workdir/node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1
 | INFO [2020-01-02 00:54:13.67]: ▸ * Try:
 | INFO [2020-01-02 00:54:13.68]: ▸ Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Any ideas how you're supposed to pass the --org to the cli? I was expecting this to come from sentry.properties file.
I figured out what the problem was. Our RN project is in a monorepo so I had to manually specify the properties file path this way:
.gradle
project.ext.sentryCli = [
logLevel: "debug",
sentryProperties: "../sentry.properties"
]
This is how the default path is derived:
in case anyone gets this in iOS, I had a similar issue. For iOS, I needed to change the build scripts (both upload and the bundle script) from:
export SENTRY_PROPERTIES=../sentry.properties
to:
export SENTRY_PROPERTIES=sentry.properties
Can we ignore this step of sentry.properties , What exactly it does?
Can we ignore this step of
sentry.properties, What exactly it does?
@pnutmath This step is required to provide the authentication key and the organization + project to create the release and upload the source maps to. Although you _can_ ignore it if you like, you would have to upload the source maps yourself otherwise the production stack traces will be minified and unreadable.
I am getting the same on android. Any solutions there?
@alexstoyanov You will have to correctly set the location of sentry.properties
@alexstoyanov Hi I am also do for android have any solution for there,
@jennmueng sentery.properties is required for android project in react-native also?
Most helpful comment
in case anyone gets this in iOS, I had a similar issue. For iOS, I needed to change the build scripts (both upload and the bundle script) from:
to: