Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANR during Sentry Event Processing #3781

Open
ZeeshanShabbir opened this issue Oct 9, 2024 · 1 comment
Open

ANR during Sentry Event Processing #3781

ZeeshanShabbir opened this issue Oct 9, 2024 · 1 comment

Comments

@ZeeshanShabbir
Copy link

ZeeshanShabbir commented Oct 9, 2024

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

@markushi
Copy link
Member

markushi commented Oct 9, 2024

The Sentry Android Plugin is a Gradle Build Plugin, I hope you're not shipping that within your app 😅
In any case this sounds like something we should have a look at, thanks for reporting!

@markushi markushi transferred this issue from getsentry/sentry-android-gradle-plugin Oct 9, 2024
@markushi markushi self-assigned this Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Backlog
Development

No branches or pull requests

3 participants