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

io.sentry.JsonSerializer.<init> ANR triggered by slow operations in main thread #3583

Closed
seven415 opened this issue Jul 18, 2024 · 5 comments

Comments

@seven415
Copy link

Description

com.android.tools.build:gradle:7.3.1

SDK Version:7.9.0

log from firebase:

java.lang.Object.hashCode (Object.java:122)
java.util.HashMap.hash (HashMap.java:336)
java.util.HashMap.put (HashMap.java:608)
io.sentry.JsonSerializer. (JsonSerializer.java:113)
io.sentry.SentryOptions. (SentryOptions.java:122)
io.sentry.SentryOptions.empty (SentryOptions.java:2495)
io.sentry.NoOpHub. (NoOpHub.java:22)
io.sentry.NoOpHub. (NoOpHub.java:16)
io.sentry.Sentry. (Sentry.java:47)
io.sentry.android.core.SentryAndroid.init (SentryAndroid.java:87)
io.sentry.android.core.SentryAndroid.init (SentryAndroid.java:58)
io.sentry.android.core.SentryInitProvider.onCreate (SentryInitProvider.java)
android.content.ContentProvider.attachInfo (ContentProvider.java:2468)
android.content.ContentProvider.attachInfo (ContentProvider.java:2433)
io.sentry.android.core.SentryInitProvider.attachInfo (SentryInitProvider.java:39)
android.app.ActivityThread.installProvider (ActivityThread.java:7867)
android.app.ActivityThread.installContentProviders (ActivityThread.java:7378)
ccc.rrr.hhh.s.a.setEnd (Native method)
ccc.rrr.hhh.s.a.attachBaseContext (a.java:82)
android.app.Application.attach (Application.java:355)
android.app.Instrumentation.newApplication (Instrumentation.java:1251)
android.app.LoadedApk.makeApplicationInner (LoadedApk.java:1485)
android.app.LoadedApk.makeApplicationInner (LoadedApk.java:1422)
android.app.ActivityThread.handleBindApplication (ActivityThread.java:7087)
android.app.ActivityThread.-$$Nest$mhandleBindApplication (unavailable)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2220)
android.os.Handler.dispatchMessage (Handler.java:106)
android.os.Looper.loopOnce (Looper.java:211)
android.os.Looper.loop (Looper.java:300)
android.app.ActivityThread.main (ActivityThread.java:8296)
java.lang.reflect.Method.invoke (Native method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:559)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:954)

@kahest
Copy link
Member

kahest commented Jul 19, 2024

Hi @seven415 can you share your Sentry options? Can you reproduce this locally with a minimal setup? And do you also see other ANR events on startup/initialization of your app? If something blocks the main thread extensively, the stack traces of reported ANRs might not be reliable.

related:
#3584
#3585
might have the same root cause, all happening during initialization

@getsantry getsantry bot moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 3 Jul 19, 2024
@kahest kahest moved this from Needs Discussion to Needs More Information in Mobile & Cross Platform SDK Jul 19, 2024
@seven415
Copy link
Author

It cannot be reproduced locally. These ANRs are all seen from firebase.
7 days data:

Image

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Jul 22, 2024
@getsantry getsantry bot moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 3 Jul 22, 2024
@kahest
Copy link
Member

kahest commented Jul 22, 2024

@seven415 can you share your Sentry options? Do you also see other ANR events on startup/initialization of your app? If something blocks the main thread extensively, the stack traces of reported ANRs might not be reliable.

@seven415
Copy link
Author

@kahest

Image

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Jul 22, 2024
@kahest kahest moved this from Needs More Information to Needs Discussion in Mobile & Cross Platform SDK Jul 22, 2024
@markushi
Copy link
Member

@seven415 thanks for reporting this issue. We're closing this in favor of #2541, which is a similar issue.

@markushi markushi closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2024
@github-project-automation github-project-automation bot moved this from Needs Discussion to Done in Mobile & Cross Platform SDK Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

No branches or pull requests

3 participants