Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface SentryAndroidGradlePluginOptions {
includeSourceContext?: boolean;
}

export const sentryAndroidGradlePluginVersion = '6.3.0';
export const sentryAndroidGradlePluginVersion = '6.4.0';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AGP 6.4.0 bundles SDK 8.38.0 but repo pins 8.37.1

High Severity

Per the PR changelog, AGP 6.4.0 bumps its bundled sentry-android SDK from 8.37.1 to 8.38.0. However, packages/core/android/build.gradle still explicitly declares api 'io.sentry:sentry-android:8.37.1' and debugImplementation 'io.sentry:sentry-spotlight:8.37.1', and packages/core/android/expo-handler/build.gradle still declares compileOnly 'io.sentry:sentry-android:8.37.1'. This introduces a version mismatch that didn't exist with AGP 6.3.0. The repo's own check-android-sdk-mismatch.js CI check is designed to catch and fail on exactly this scenario due to the risk of IllegalStateException: Sentry SDK has detected a mix of versions. Flagged per the dependency update review rule (project-0b61c077c0c2).

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 8aea7fd. Configure here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: A version mismatch between the Android Gradle Plugin's bundled SDK (8.38.0) and the declared dependency (8.37.1) will cause a fatal IllegalStateException on Android.
Severity: CRITICAL

Suggested Fix

Update the sentry-android dependency version in packages/core/android/build.gradle from 8.37.1 to 8.38.0 to match the version bundled by the updated Gradle plugin.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: packages/core/plugin/src/withSentryAndroidGradlePlugin.ts#L18

Potential issue: The update to `withSentryAndroidGradlePlugin.ts` implies the use of a
newer Sentry Android Gradle Plugin, which bundles Android SDK version 8.38.0. However,
the corresponding dependency version in `packages/core/android/build.gradle` was not
updated and remains at 8.37.1. This version mismatch between the SDK bundled by the
plugin and the one declared as a dependency is known to cause a fatal
`IllegalStateException: Sentry SDK has detected a mix of versions` at runtime, which
will crash Android applications during initialization.

Did we get this right? 👍 / 👎 to inform future reviews.


/**
* Adds the Sentry Android Gradle Plugin to the project.
Expand Down
2 changes: 1 addition & 1 deletion samples/react-native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildscript {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
classpath("io.sentry:sentry-android-gradle-plugin:6.3.0")
classpath("io.sentry:sentry-android-gradle-plugin:6.4.0")
}
}

Expand Down
Loading