Skip to content
Closed
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 @@ -76,6 +76,8 @@
ndkOptions.setEnableAppHangTracking(options.isEnableNdkAppHangTracking());
ndkOptions.setAppHangTimeoutMillis(options.getNdkAppHangTimeoutIntervalMillis());

ndkOptions.setEnableLogs(options.getLogs().isEnabled());

Check failure on line 79 in sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java

View workflow job for this annotation

GitHub Actions / Build and Analyze SDK Size

cannot find symbol

Check failure on line 79 in sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java

View workflow job for this annotation

GitHub Actions / Build Job ubuntu-latest - Java 17

cannot find symbol

Check failure on line 79 in sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java

View workflow job for this annotation

GitHub Actions / Ui tests

cannot find symbol

Check failure on line 79 in sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java

View workflow job for this annotation

GitHub Actions / AGP Matrix Release - AGP 9.0.0 - Integrations true

cannot find symbol

Check failure on line 79 in sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java

View workflow job for this annotation

GitHub Actions / AGP Matrix Release - AGP 9.1.1 - Integrations true

cannot find symbol

Check failure on line 79 in sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java

View workflow job for this annotation

GitHub Actions / AGP Matrix Release - AGP 9.2.1 - Integrations true

cannot find symbol

Check failure on line 79 in sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java

View workflow job for this annotation

GitHub Actions / app-metrics

cannot find symbol

Check failure on line 79 in sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java

View workflow job for this annotation

GitHub Actions / Benchmarks

cannot find symbol

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: The call to ndkOptions.setEnableLogs() will cause a NoSuchMethodError at runtime, as the method does not exist in the current sentry-native-ndk dependency version.
Severity: CRITICAL

Suggested Fix

This pull request should not be merged until the sentry-native-ndk dependency containing the NdkOptions.enableLogs field is released. After the dependency is released, update its version in gradle/libs.versions.toml before merging.

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: sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java#L79

Potential issue: The code unconditionally calls `ndkOptions.setEnableLogs()`, a method
that is part of the `sentry-native-ndk` dependency. According to the pull request
description, this feature is not yet available in the currently specified dependency
version (`0.16.2`). This will result in a `NoSuchMethodError` at runtime when
`SentryNdk.init()` is invoked. The error will cause a complete NDK initialization
failure, crashing any Android application that uses the Sentry SDK with NDK integration
during its startup sequence.

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


//noinspection UnstableApiUsage
io.sentry.ndk.SentryNdk.init(ndkOptions);

Expand Down
Loading