From df122086b0f6de92b1a4345ab3495927bb761a53 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Mon, 12 Oct 2026 17:31:44 +0200 Subject: [PATCH 1/6] added epithaph dependency to package --- CHANGELOG.md | 4 ++++ build/native-sdks.targets | 21 +++++++++++++++++++ .../package-release.zip.snapshot | 1 + 3 files changed, 26 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d43377ef..fffe59233 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Fixes + +- Android tombstone parsing via `AndroidTombstoneEnabled` no longer fails with `NoClassDefFoundError`. The SDK now ships the `epitaph` dependency that `sentry-android-core` requires. If you added `com.abovevacant:epitaph` to your Gradle template as a workaround, remove it to avoid duplicate classes. ([#2878](https://github.com/getsentry/sentry-unity/issues/2878)) + ### Dependencies - Bump Native SDK from v0.17.0 to v0.17.2 ([#2874](https://github.com/getsentry/sentry-unity/pull/2874)) diff --git a/build/native-sdks.targets b/build/native-sdks.targets index cc69718b8..198365978 100644 --- a/build/native-sdks.targets +++ b/build/native-sdks.targets @@ -330,6 +330,27 @@ + + + + + + <_EpitaphCatalogLine Include="@(_SentryJavaCatalogLines)" Condition="$([System.String]::Copy('%(Identity)').Contains('com.abovevacant:epitaph'))" /> + + + <_EpitaphCatalogLine>@(_EpitaphCatalogLine) + $([System.Text.RegularExpressions.Regex]::Replace('$(_EpitaphCatalogLine)', '^.*version\s*=\s*"([^"]+)".*$', '$1')) + $(GRADLE_USER_HOME) + $([System.Environment]::GetFolderPath(SpecialFolder.UserProfile))/.gradle + + + + + + + + diff --git a/test/Scripts.Tests/package-release.zip.snapshot b/test/Scripts.Tests/package-release.zip.snapshot index cda6e92ef..5d884886c 100644 --- a/test/Scripts.Tests/package-release.zip.snapshot +++ b/test/Scripts.Tests/package-release.zip.snapshot @@ -275,6 +275,7 @@ Plugins/Linux/Sentry~/libsentry-native.so Plugins/Linux/Sentry~/libsentry.dbg.so Plugins/Android/proguard-sentry-unity.pro Plugins/Android/proguard-sentry-unity.pro.meta +Plugins/Android/Sentry~/epitaph.jar Plugins/Android/Sentry~/sentry-android-core-release.aar Plugins/Android/Sentry~/sentry-android-ndk-release.aar Plugins/Android/Sentry~/sentry-native-ndk-release.aar From d8e587bc502c3dba04b0cbb85027b125245d8a11 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Mon, 12 Oct 2026 17:33:44 +0200 Subject: [PATCH 2/6] changed changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fffe59233..05f823c60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Fixes -- Android tombstone parsing via `AndroidTombstoneEnabled` no longer fails with `NoClassDefFoundError`. The SDK now ships the `epitaph` dependency that `sentry-android-core` requires. If you added `com.abovevacant:epitaph` to your Gradle template as a workaround, remove it to avoid duplicate classes. ([#2878](https://github.com/getsentry/sentry-unity/issues/2878)) +- Android tombstone parsing via `AndroidTombstoneEnabled` no longer fails with `NoClassDefFoundError`. The SDK now ships with its `epitaph` dependency. If you added `com.abovevacant:epitaph` to your Gradle template as a workaround, remove it to avoid duplicate classes. ([#2879](https://github.com/getsentry/sentry-unity/issues/2879)) ### Dependencies From d5199043bfb5e92037059fbfb497d091970799af Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Tue, 13 Oct 2026 14:03:30 +0200 Subject: [PATCH 3/6] check for version --- build/native-sdks.targets | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/build/native-sdks.targets b/build/native-sdks.targets index 198365978..4453a7b3d 100644 --- a/build/native-sdks.targets +++ b/build/native-sdks.targets @@ -332,19 +332,12 @@ - - - - - <_EpitaphCatalogLine Include="@(_SentryJavaCatalogLines)" Condition="$([System.String]::Copy('%(Identity)').Contains('com.abovevacant:epitaph'))" /> - - <_EpitaphCatalogLine>@(_EpitaphCatalogLine) - $([System.Text.RegularExpressions.Regex]::Replace('$(_EpitaphCatalogLine)', '^.*version\s*=\s*"([^"]+)".*$', '$1')) + $([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText('$(SentryAndroidRoot)gradle/libs.versions.toml')), '"com\.abovevacant:epitaph",\s*version\s*=\s*"([^"]+)"').Groups[1].Value) $(GRADLE_USER_HOME) $([System.Environment]::GetFolderPath(SpecialFolder.UserProfile))/.gradle - + From 047e3825e78f4cd3cf6c17a9359ac9953ec71c6b Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Tue, 13 Oct 2026 18:25:16 +0200 Subject: [PATCH 4/6] tests, changelog fix --- CHANGELOG.md | 2 +- src/sentry-dotnet | 2 +- test/IntegrationTest/Integration.Tests.ps1 | 15 +++++++++++++++ .../Scripts/IntegrationOptionsConfiguration.cs | 2 ++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05f823c60..ff781d922 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Fixes -- Android tombstone parsing via `AndroidTombstoneEnabled` no longer fails with `NoClassDefFoundError`. The SDK now ships with its `epitaph` dependency. If you added `com.abovevacant:epitaph` to your Gradle template as a workaround, remove it to avoid duplicate classes. ([#2879](https://github.com/getsentry/sentry-unity/issues/2879)) +- Android tombstone parsing via `AndroidTombstoneEnabled` no longer fails with `NoClassDefFoundError`. The SDK now ships with its `epitaph` dependency. If you added `com.abovevacant:epitaph` to your Gradle template as a workaround, remove it to avoid duplicate classes. ([#2879](https://github.com/getsentry/sentry-unity/pull/2879)) ### Dependencies diff --git a/src/sentry-dotnet b/src/sentry-dotnet index ce30e1eb9..68395d269 160000 --- a/src/sentry-dotnet +++ b/src/sentry-dotnet @@ -1 +1 @@ -Subproject commit ce30e1eb979d79b6ee8543c010aac7cac95cffef +Subproject commit 68395d269be8b3dc375b15471ff4ca7bbfd1a93a diff --git a/test/IntegrationTest/Integration.Tests.ps1 b/test/IntegrationTest/Integration.Tests.ps1 index 33e6315b0..04d6fe76b 100644 --- a/test/IntegrationTest/Integration.Tests.ps1 +++ b/test/IntegrationTest/Integration.Tests.ps1 @@ -506,6 +506,21 @@ if ($env:SENTRY_TEST_PLATFORM -ne "WebGL") { $exception.stacktrace | Should -Not -BeNullOrEmpty } + It "Merges the tombstone into the native crash" { + if ($script:Platform -ne "Android") { + Set-ItResult -Skipped -Because "tombstones are Android-only" + return + } + $apiLevel = [int](& adb shell getprop ro.build.version.sdk) + if ($apiLevel -lt 31) { + Set-ItResult -Skipped -Because "tombstones require Android 12 (API 31), device runs API $apiLevel" + return + } + + $runEvent.exception.values[0].mechanism.type | Should -Be "TombstoneMerged" + $runEvent.threads.values.Count | Should -BeGreaterThan 1 + } + It "Reports crashedLastRun as Crashed on relaunch" { $crashedLastRunLine = $runResult.CrashSendOutput | Where-Object { $_ -match "crashedLastRun=Crashed" diff --git a/test/Scripts.Integration.Test/Scripts/IntegrationOptionsConfiguration.cs b/test/Scripts.Integration.Test/Scripts/IntegrationOptionsConfiguration.cs index f6afcc406..0276d5ae6 100644 --- a/test/Scripts.Integration.Test/Scripts/IntegrationOptionsConfiguration.cs +++ b/test/Scripts.Integration.Test/Scripts/IntegrationOptionsConfiguration.cs @@ -53,6 +53,8 @@ public override void Configure(SentryUnityOptions options) options.AndroidNativeInitializationType = NativeInitializationType.Runtime; options.IosNativeInitializationType = NativeInitializationType.Runtime; + options.AndroidTombstoneEnabled = true; + options.Experimental.MacosBackend = MacosBackend.Cocoa; options.Experimental.WindowsBackend = WindowsBackend.Crashpad; options.Experimental.LinuxBackend = LinuxBackend.Breakpad; From 9ce7584f008efa18126091ce973f7d2d18f6d0fb Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 14 Oct 2026 10:11:43 +0200 Subject: [PATCH 5/6] reverted tombstone merge test --- test/IntegrationTest/Integration.Tests.ps1 | 15 --------------- .../Scripts/IntegrationOptionsConfiguration.cs | 2 -- 2 files changed, 17 deletions(-) diff --git a/test/IntegrationTest/Integration.Tests.ps1 b/test/IntegrationTest/Integration.Tests.ps1 index 04d6fe76b..33e6315b0 100644 --- a/test/IntegrationTest/Integration.Tests.ps1 +++ b/test/IntegrationTest/Integration.Tests.ps1 @@ -506,21 +506,6 @@ if ($env:SENTRY_TEST_PLATFORM -ne "WebGL") { $exception.stacktrace | Should -Not -BeNullOrEmpty } - It "Merges the tombstone into the native crash" { - if ($script:Platform -ne "Android") { - Set-ItResult -Skipped -Because "tombstones are Android-only" - return - } - $apiLevel = [int](& adb shell getprop ro.build.version.sdk) - if ($apiLevel -lt 31) { - Set-ItResult -Skipped -Because "tombstones require Android 12 (API 31), device runs API $apiLevel" - return - } - - $runEvent.exception.values[0].mechanism.type | Should -Be "TombstoneMerged" - $runEvent.threads.values.Count | Should -BeGreaterThan 1 - } - It "Reports crashedLastRun as Crashed on relaunch" { $crashedLastRunLine = $runResult.CrashSendOutput | Where-Object { $_ -match "crashedLastRun=Crashed" diff --git a/test/Scripts.Integration.Test/Scripts/IntegrationOptionsConfiguration.cs b/test/Scripts.Integration.Test/Scripts/IntegrationOptionsConfiguration.cs index 0276d5ae6..f6afcc406 100644 --- a/test/Scripts.Integration.Test/Scripts/IntegrationOptionsConfiguration.cs +++ b/test/Scripts.Integration.Test/Scripts/IntegrationOptionsConfiguration.cs @@ -53,8 +53,6 @@ public override void Configure(SentryUnityOptions options) options.AndroidNativeInitializationType = NativeInitializationType.Runtime; options.IosNativeInitializationType = NativeInitializationType.Runtime; - options.AndroidTombstoneEnabled = true; - options.Experimental.MacosBackend = MacosBackend.Cocoa; options.Experimental.WindowsBackend = WindowsBackend.Crashpad; options.Experimental.LinuxBackend = LinuxBackend.Breakpad; From 5a829f2659d70c08f8b74c63a938d8cc26163fec Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 14 Oct 2026 17:13:53 +0200 Subject: [PATCH 6/6] simplified --- build/native-sdks.targets | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/build/native-sdks.targets b/build/native-sdks.targets index 4453a7b3d..c5008ba7b 100644 --- a/build/native-sdks.targets +++ b/build/native-sdks.targets @@ -331,18 +331,19 @@ + pull in. Ship the jar resolved by the Gradle build above; Unity picks up `libs/*.jar`. + CI starts with an empty Gradle cache, so the only cached version is the one sentry-java resolved. --> - $([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText('$(SentryAndroidRoot)gradle/libs.versions.toml')), '"com\.abovevacant:epitaph",\s*version\s*=\s*"([^"]+)"').Groups[1].Value) $(GRADLE_USER_HOME) $([System.Environment]::GetFolderPath(SpecialFolder.UserProfile))/.gradle + $(GradleUserHome)/caches/modules-2/files-2.1/com.abovevacant/epitaph/ - - + - - + + +