getsentry / getsentry/sentry-react-native

Report JS Loop stalls as Errors (similar to App Hangs on iOS)

Ouverte
#3,460 5 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Errors Feature React-Native
Langage dominant
TypeScript
Étoiles
1.8k
Forks
366
Merge moyen
1 j 6 h
PR mergées (30 j)
94

Description

**Platform:**

- [X] iOS
- [ ] Android

**SDK:**

- [X] `@sentry/react-native` (>= 1.0.0)
- [ ] `react-native-sentry` (<= 0.43.2)

**SDK version:**
5.15.1

`react-native` version:
0.72.7

**Are you using Expo?**

- [ ] Yes
- [X] No

**Are you using [sentry.io]() or on-premise?**

- [X] [sentry.io]() (SaaS)
- [ ] on-premise
**Configuration:**

(`@sentry/react-native`)

```
Sentry.init({
dsn: 'MY_DSN',
debug:true
})
```

---

**I have the following issue:**

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:

```
{
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?

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par reproduire la boucle JavaScript infinie de l’issue dans une application @sentry/react-native de base sur iOS, puis examinez le point d’entrée du suivi des blocages de l’application du SDK et comparez son comportement avec celui du Cocoa SDK. Déterminez quelles conditions devraient émettre un événement et vérifiez que la boucle signalée respecte ces conditions.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
ios, javascript, react-native, typescript
Domaine
mobile, observability
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.