Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

feat: Expose crashed last run API

Open
#5,852 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
android, ios, react-native, typescript
Domain
api, mobile

Research direction

Start by locating the React Native native modules and the initialization path used after Sentry.init(), then compare the iOS lastRunStatus and Android isCrashedLastRun integrations described in the issue. Done means a callable JavaScript API exposes a documented, consistent result on both platforms.

Written by the indexing model from the issue text.

Description

Errors Feature React-Native

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.lastRunStatus on iOS and Sentry.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

Dominant language
TypeScript
Stars
1.8k
Forks
369
Avg merge
20h 53m
Merged PRs (30d)
103

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/sentry-react-native

All issues in getsentry/sentry-react-native

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.