What React Native libraries do you use?
React Native without Frameworks
Are you using sentry.io or on-premise?
sentry.io (SaS)
Are you using any other error monitoring solution alongside Sentry?
No
Other Error Monitoring Solution Name
No response
@sentry/react-native SDK Version
8.20.0 (bundles io.sentry:sentry-android:8.49.0). Still present on 8.28.0 (8.58.0).
How does your development environment look like?
Not environment specific. This is a compile error in the SDK's Android sources, independent of the React Native version or tooling.
Sentry.init()
// Not relevant, the failure happens at compile time.
// Session Replay is not configured.
Sentry . init ( {
dsn : 'https://...@sentry.io/...' ,
} ) ;
Steps to Reproduce
Install @sentry/react-native@8.20.0 in a React Native app.
Exclude the replay module as documented in Excluding Session Replay from Android and fix(replay): Allow excluding the sentry-android-replay module from android targets #5174 , in the root android/build.gradle:
subprojects {
configurations. all {
exclude group : ' io.sentry' , module : ' sentry-android-replay'
}
}
Build Android, for example cd android && ./gradlew assembleDebug.
Expected Result
The @sentry/react-native Android library compiles without sentry-android-replay on the classpath, as it did after #5174 (released in 7.1.0).
Actual Result
compileDebugJavaWithJavac fails for the @sentry/react-native module:
error: cannot find symbol
symbol: class ReplayIntegration
location: package io.sentry.android.replay
/node_modules/@sentry/react-native/android/src/main/java/io/sentry/react/replay/RNSentryReplayFragmentLifecycleTracer.java:23: error: cannot find symbol
private @Nullable ReplayIntegration replayIntegration;
Root cause:
Workaround: delete RNSentryReplayFragmentLifecycleTracer.java from node_modules/@sentry/react-native/android/src/main/java/io/sentry/react/replay/ using patch-package or yarn patch.
What React Native libraries do you use?
React Native without Frameworks
Are you using sentry.io or on-premise?
sentry.io (SaS)
Are you using any other error monitoring solution alongside Sentry?
No
Other Error Monitoring Solution Name
No response
@sentry/react-native SDK Version
8.20.0 (bundles
io.sentry:sentry-android:8.49.0). Still present on 8.28.0 (8.58.0).How does your development environment look like?
Sentry.init()
Steps to Reproduce
@sentry/react-native@8.20.0in a React Native app.android/build.gradle:cd android && ./gradlew assembleDebug.Expected Result
The
@sentry/react-nativeAndroid library compiles withoutsentry-android-replayon the classpath, as it did after #5174 (released in 7.1.0).Actual Result
compileDebugJavaWithJavacfails for the@sentry/react-nativemodule:Root cause:
RNSentryReplayFragmentLifecycleTracerwas added in fix(session-replay): Fixes orientation change misalignment for session replay on Android #5321 (7.5.0). It importsio.sentry.android.replay.ReplayIntegrationdirectly.packages/core/android/libs/replay-stubs.jaronly stubsDefaultReplayBreadcrumbConverter, so compilation fails once the real module is excluded.RNSentryReplayFragmentLifecycleTracerTest.kt.Workaround: delete
RNSentryReplayFragmentLifecycleTracer.javafromnode_modules/@sentry/react-native/android/src/main/java/io/sentry/react/replay/usingpatch-packageoryarn patch.