feat: Expose crashed last run API
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- android, ios, react-native, typescript
Direzione di ricerca
Inizia individuando i moduli nativi di React Native e il percorso di inizializzazione utilizzato dopo Sentry.init(), quindi confronta le integrazioni iOS lastRunStatus e Android isCrashedLastRun descritte nell’issue. Il lavoro è completato quando un’API JavaScript invocabile espone un risultato documentato e coerente su entrambe le piattaforme.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem Statement
Both native SDKs now provide APIs to check if the previous app session ended in a crash:
- iOS (Cocoa SDK 9.8.0+):
SentrySDK.lastRunStatus— returns unknown, no-crash, or crash - Android:
Sentry.isCrashedLastRun()— returns a boolean
There is currently no way to access this information from the React Native (JavaScript) layer.
Use Cases
- Show a recovery UI (e.g., "Sorry, the app crashed") after restarting from a crash
- Disable experimental features that may have caused a crash
- Send custom analytics or breadcrumbs about crash recovery
- Implement progressive rollout logic that backs off after crashes
Proposed Solution
Expose a unified JS API, e.g.:
import * as Sentry from '@sentry/react-native';
const status = Sentry.lastRunStatus();
// Returns: 'unknown' | 'no-crash' | 'crash'
Implementation Notes
- Bridge
SentrySDK.lastRunStatuson iOS andSentry.isCrashedLastRun()on Android through the native modules - Normalize the return value across platforms (iOS has 3 states, Android has a boolean — need to decide on a unified shape)
- Should be callable after
Sentry.init()
References
- Cocoa SDK PR: https://github.com/getsentry/sentry-cocoa/issues/7469
- Cocoa SDK bump to 9.8.0: https://github.com/getsentry/sentry-react-native/pull/5847
- Lingua principale
- TypeScript
- Stelle
- 1.8k
- Fork
- 367
- Merge medio
- 1g 6h
- PR unite (30g)
- 94
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/sentry-react-native
-
React-Native Replays Task
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
getsentry/sentry-react-native#6680 · 1 commento ·
-
Improvement React-Native
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getsentry/sentry-react-native#6143 · 2 commenti ·
-
React-Native Task User Feedbacks
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
getsentry/sentry-react-native#5932 · 2 commenti ·
-
React-Native Replays Task
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
getsentry/sentry-react-native#5882 · 1 commento ·
-
Good First Issue React-Native Task
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
getsentry/sentry-react-native#5771 · 1 commento ·
Tutte le issue di getsentry/sentry-react-native
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
copse-dev/agent-pane#2953 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Apertabug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
calcite-components needs triage refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Esri/calcite-design-system#15203 ·