Skip to content

Android build fails with cannot find symbol ReplayIntegration when sentry-android-replay is excluded #6802

Closed

Description

@InterstellarStella

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

  1. Install @sentry/react-native@8.20.0 in a React Native app.
  2. 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'
      }
    }
  3. 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.

Activity

  1. linear-code commented on Sep 29, 2026

    @linear-code
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Sep 29, 2026
  3. self-assigned this
    on Sep 29, 2026
  4. antonis commented on Sep 29, 2026

    @antonis
    Contributor

    Thank you for reporting @InterstellarStella 🙇 We'll check it and iterate back.

  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Sep 29, 2026
  6. antonis commented on Sep 30, 2026

    @antonis
    Contributor

    Fixed in #6803 and will ship with the next release.

  7. github-actions commented on Oct 1, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #6803, which was included in the 8.29.0 release.

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

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions