sentry-unity
sentry-unity copied to clipboard
Sentry: (Info) Detected an ANR event: Application not responding for at least 5000 ms.
Environment
How do you use Sentry? Sentry SaaS (sentry.io)
Which version of the SDK? 0.23.1
How did you install the package? Git-URL
Which version of Unity? 2020.3.13f
Is this happening in Unity (editor) or on a player like Android, iOS, Windows? Android
Steps to Reproduce
- Sentry Initialize programmatically
Expected Result
Not throw a Sentry error, just log it.
Actual Result
Error thrown as a sentry exception error and send it to sentry.
Any logs or screenshots
Sentry: (Info) Detected an ANR event: Application not responding for at least 5000 ms.
Hey @ArnauKokoro. I'm not sure I understand the issue. When an ANR is detected we capture and send it to Sentry. Is this not the behavior you are experiencing?
Sorry @bitsandfoxes,
The problem here is that the application is indeed running when this ANR is sent. I don't know why sentry says that is not responding at least 5000 ms.
Many thanks!
I know that without the stack trace to pinpoint where it froze it's hard to tell what's going on. ANR means it froze for some time but it might have recovered. Do the breadcrumbs in the issue give you any more insights into this? Based on the timestamps you might be able to see a >= 5s gap.
One thing that comes to mind might be startup/scene loading where a "false" ANR might be reported.
Hi @bitsandfoxes,
I attach the sentry logs where you can see it's been 3 second the scene is loaded.
Changed active scene to 'Onboarding' ----- 12.22.19
Scene 'Onboarding' was loaded ------ 12.22.19
Sentry.Unity.ApplicationNotResponding: Application not responding for at least 5000 ms. ------ 12.22.22
Many thanks!
So the issue is: There is no freeze, there is no ANR, but Sentry reports an ANR?
Yes, that's it!
Is it possible for you to create a small repro? I failed to reproduce this behaviour with the sample we have.
Working as expected!