From 61cd59248c9a47a26b973bc5ee092f486b204f7c Mon Sep 17 00:00:00 2001 From: Markus Hintersteiner Date: Tue, 21 Jan 2025 08:11:02 +0100 Subject: [PATCH 1/2] Fix swallow NDK loadLibrary errors --- .../src/main/java/io/sentry/android/ndk/SentryNdk.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java b/sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java index a37475002ef..aafd66b059d 100644 --- a/sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java +++ b/sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java @@ -22,6 +22,9 @@ private SentryNdk() {} try { //noinspection UnstableApiUsage io.sentry.ndk.SentryNdk.loadNativeLibraries(); + } catch (Throwable t) { + // ignored + // if loadLibrary() fails, the later init() will throw an exception anyway } finally { loadLibraryLatch.countDown(); } From cb6986ed3810ac846b995a5849a7e971a67d5cd7 Mon Sep 17 00:00:00 2001 From: Markus Hintersteiner Date: Tue, 21 Jan 2025 09:42:17 +0100 Subject: [PATCH 2/2] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00dbe2f7df9..dfdfa2879b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -295,6 +295,7 @@ If you have been using `8.0.0-rc.4` of the Java SDK, here's the new changes that - Due to how grouping works in Sentry currently sometimes the suppressed exception is treated as the main exception. This change ensures we keep using the main exception and not change how grouping works. - As a consequence the list of exceptions in the group on top of an issue is no longer shown in Sentry UI. - We are planning to improve this in the future but opted for this fix first. +- Fix swallow NDK loadLibrary errors ([#4082](https://github.com/getsentry/sentry-java/pull/4082)) ## 7.20.0