Skip to content

feat: rebuild native crash monitoring as app lifecycle monitors#127

Open
V3RON wants to merge 12 commits into
mainfrom
feat/improved-crash-monitor
Open

feat: rebuild native crash monitoring as app lifecycle monitors#127
V3RON wants to merge 12 commits into
mainfrom
feat/improved-crash-monitor

Conversation

@V3RON
Copy link
Copy Markdown
Contributor

@V3RON V3RON commented May 21, 2026

Summary

Rebuild native crash monitoring around platform-owned app lifecycle monitors so Jest stays platform-neutral while Android and iOS handle their own crash correlation, artifact capture, and lifecycle state.

Context

The branch removes the old Jest-local crash monitor and replaces it with a shared AppLifecycleMonitor contract in @react-native-harness/platforms, with packages/jest driving monitor lifecycle events around app start, restart, readiness, test execution, and teardown.

Android and iOS now use platform-specific monitor implementations that correlate logs, process state, and persisted crash artifacts instead of depending on extra app-side crash-monitor plumbing. The physical-device path is a key part of this rebuild: iOS device monitoring leans on devicectl diagnostics and Android correlation no longer depends on brittle process-disappearance checks, which makes crash reporting more reliable on real hardware.

The branch also adds app-monitor event reporting hooks, refreshes crash-monitor docs through the ADR and website updates, adds playground-native crash fixtures for end-to-end coverage, and includes a version plan for the release.

Fixes #126

Proposed Testing Scenario

  1. Run the affected unit suites for @react-native-harness/jest, @react-native-harness/platform-android, and @react-native-harness/runtime and confirm the rebuilt lifecycle-monitor flow stays green.
  2. Start the playground crash-monitor scenarios on Android and iOS simulators, verify startup and in-test crashes are reported with correlated diagnostics, and confirm Harness restarts or fails the run in the expected phase.
  3. Exercise the physical-device runners, especially the crash scenarios, and verify native crash reporting works without adding extra crash-monitor dependencies inside the app and still produces useful diagnostics on real devices.
  4. Verify the LogBox-disabled playground coverage still suppresses in-app LogBox UI while preserving error forwarding needed for crash/debug output.

V3RON added 7 commits May 20, 2026 13:19
Add playground crash fixtures, env-driven signing, artifact-window fixes, and focused test cleanup for the improved crash monitor.
Drop the stale crashDetectionInterval option from config, docs, tests, and generated GitHub Action code.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-harness Ready Ready Preview, Comment May 21, 2026 5:56pm

Request Review

Vitest is provided at the workspace root for tests; other packages
already exclude it from @nx/dependency-checks the same way.

Co-authored-by: Cursor <cursoragent@cursor.com>
Revert playground rn-harness config changes so CI sees the same target set as main.
Set the default playground iOS simulator runtime to 26.2.
Poll crash report sources for longer while avoiding simctl diagnose on CI, and return as soon as either device logs or host DiagnosticReports yields an artifact.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rebuild native crash detection as app lifecycle monitors

1 participant