You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Report JS Loop stalls as Errors (similar to App Hangs on iOS) #3460
A user reported the app hanging but not event was sent to Sentry. As per docs:
There are many reasons why an app may become unresponsive, such as long-running code, infinite loop bugs, and so on. With app hang tracking you can detect and fix them.
I created an infinite loop to test it and no app hang events were sent. The same infinite loop works fine with Cocoa SDK.
Steps to reproduce:
Create a base react-native app
Add Sentry to it
Add the following button anywhere:
<Button
onPress={() => {
var i = 1;
while (i > 0){i++;}
}}
title="LeLoop"
color="#841584"
/>
run the app on ios
It is still possible to scroll through the app, but all other buttons no longer work as the app is still on the loop. But no event is sent.
Under which conditions is it expected for an event to be sent?
@krystofwoldrich understood, thanks. We've also used the React Native Tracing option within the Performance, but having trouble understanding how this metric will be recorded in the dashboard. Can you provide a screenshot or a sample metric displaying the same? Thanks
Activity
yogendrajs commentedon Dec 11, 2023
Based on our recent conversations, thanks for taking the time to create the issue here, Rodolfo. Will subscribe and follow up on this.
[-]App Hang tracking not working[/-][+]Report JS Loop stalls as Errors (similar to App Hangs on iOS) [/+]krystofwoldrich commentedon Dec 13, 2023
@rodolfoBee and @yogendrajs Thank you for the message.
The SDK currently reports App Hangs when the native UI thread hangs (users can't interact with the app, even scrolling doesn't work).
The JS loop hangs (stalls) are currently reported as a metric with Sentry Transactions.
I've marked this issue as a feature request we will discuss internally if and how to report JS Loop stalls as Errors.
yogendrajs commentedon Dec 13, 2023
@krystofwoldrich understood, thanks. We've also used the React Native Tracing option within the Performance, but having trouble understanding how this metric will be recorded in the dashboard. Can you provide a screenshot or a sample metric displaying the same? Thanks
krystofwoldrich commentedon Dec 13, 2023
When you open Transaction Detail you will see the stalls on the right side. Transactions are created based on screen names defined in navigation library you use.
Stall times are displayed in milliseconds.
4 remaining items
github-actions commentedon Nov 5, 2026
A PR closing this issue has just been released 🚀
This issue was referenced by PR #6964, which was included in the 8.34.0 release.