sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

ANR during Sentry Event Processing

Open ZeeshanShabbir opened this issue 1 year ago • 1 comments

Gradle Version

8.10.2

AGP Version

8.6.1

Code Minifier/Optimizer

Dexguard

Version

4.11.0

Sentry SDK Version

7.14.0

Steps to Reproduce

We’ve received reports indicating that an ANR has been triggered, and the root cause appears to be related to the Sentry Android plugin. The ANR occurs during file access in the external storage while processing events in Sentry.

Could you please investigate this issue further?

"main" tid=1 Native #00 pc 0x00000000000ecf88 /apex/com.android.runtime/lib64/bionic/libc.so (__faccessat+8) getsentry/sentry-android-gradle-plugin#1 pc 0x0000000000024338 /apex/com.android.art/lib64/libjavacore.so (Linux_access+76) at libcore.io.Linux.access (Native method) at libcore.io.ForwardingOs.access (ForwardingOs.java:128) at libcore.io.BlockGuardOs.access (BlockGuardOs.java:76) at libcore.io.ForwardingOs.access (ForwardingOs.java:128) at android.app.ActivityThread$AndroidOs.access (ActivityThread.java:8535) at java.io.UnixFileSystem.checkAccess (UnixFileSystem.java:332) at java.io.File.exists (File.java:829) at android.app.ContextImpl.ensureExternalDirsExistOrFilter (ContextImpl.java:3619) at android.app.ContextImpl.getExternalFilesDirs (ContextImpl.java:883) at android.app.ContextImpl.getExternalFilesDir (ContextImpl.java:872) at android.content.ContextWrapper.getExternalFilesDir (ContextWrapper.java:317) at io.sentry.android.core.DefaultAndroidEventProcessor.mergeOS (DefaultAndroidEventProcessor.java:196) at io.sentry.SentryBaseEvent.getContexts (SentryBaseEvent.java:177) at io.sentry.protocol.Contexts.toContextType (Contexts.java:97) at io.sentry.android.core.DefaultAndroidEventProcessor.mergeOS (DefaultAndroidEventProcessor.java:196) at io.sentry.protocol.Contexts.setOperatingSystem (Contexts.java:141) at io.sentry.protocol.Contexts.toContextType (Contexts.java:97) at io.sentry.android.core.DefaultAndroidEventProcessor.process (DefaultAndroidEventProcessor.java:75) at io.sentry.SentryClient.processEvent (SentryClient.java:449) at io.sentry.SentryClient.captureEvent (SentryClient.java:142) at io.sentry.Hub.captureEventInternal (Hub.java:120) at io.sentry.Hub.captureEvent (Hub.java:90) at io.sentry.Sentry.captureEvent (Sentry.java:527) at io.sentry.HubAdapter.captureEvent (HubAdapter.java:30) at io.sentry.IHub$-CC.$default$captureEvent (IHub.java:40) at io.sentry.android.timber.SentryTimberTree.captureEvent (SentryTimberTree.kt:272) at io.sentry.android.timber.SentryTimberTree.logWithSentry (SentryTimberTree.kt:240) at io.sentry.android.timber.SentryTimberTree.e (SentryTimberTree.kt:146) at timber.log.Timber$Forest.e (Timber.kt:342)

Expected Result

Sentry should work without creating the ANR

Actual Result

Sentry is causing the ANR and impacting the app's performance

ZeeshanShabbir avatar Oct 09 '24 08:10 ZeeshanShabbir