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

Sentry: (Info) Detected an ANR event: Application not responding for at least 5000 ms.

Open ArnauKokoro opened this issue 3 years ago • 7 comments
trafficstars

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

  1. 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.

ArnauKokoro avatar Oct 11 '22 17:10 ArnauKokoro

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?

bitsandfoxes avatar Oct 12 '22 08:10 bitsandfoxes

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!

ArnauKokoro avatar Oct 12 '22 08:10 ArnauKokoro

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.

bitsandfoxes avatar Oct 12 '22 08:10 bitsandfoxes

One thing that comes to mind might be startup/scene loading where a "false" ANR might be reported.

bitsandfoxes avatar Oct 12 '22 08:10 bitsandfoxes

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!

ArnauKokoro avatar Oct 12 '22 12:10 ArnauKokoro

So the issue is: There is no freeze, there is no ANR, but Sentry reports an ANR?

bitsandfoxes avatar Oct 13 '22 11:10 bitsandfoxes

Yes, that's it!

ArnauKokoro avatar Oct 14 '22 08:10 ArnauKokoro

Is it possible for you to create a small repro? I failed to reproduce this behaviour with the sample we have.

bitsandfoxes avatar Oct 17 '22 13:10 bitsandfoxes

Working as expected!

ArnauKokoro avatar Nov 17 '22 21:11 ArnauKokoro