Skip to content

feature(react-native): report react render errors that no error boundary catches - #409

Merged
KishanPRao merged 7 commits into
mainfrom
feature/report-render-errors
Oct 7, 2026
Merged

KishanPRao merged 7 commits into
mainfrom
feature/report-render-errors

Conversation

@KishanPRao

Copy link
Copy Markdown
Collaborator

Summary

Render errors that no error boundary catches now produce one crash report with the JS stack and the component stack, instead of a native crash report without JS frames.

Changes

  • UnhandledExceptionHandler.ts: report render errors that no error boundary catches, attach the component stack, restore React Native's handler on dispose.
  • exceptionsManagerHelper.ts: new, find React Native's exception handler on every supported version.
  • renderErrorHandlerTests.spec.ts: new, cover uncaught and caught render errors, debug builds, dispose and re-init.
  • renderErrorRendererTests.spec.ts: new, throw during a real render on the old and New Architecture, and on the React 18 path.
  • exceptionsManagerHelperTests.spec.ts: new, cover both module shapes and a missing module.
  • ci-crash-driver.js: add a deep link that throws during render outside the app's error boundary, log each stored report's type and threads.
  • android-js-fatal.sh: add a render error mode, check the report type and the component stack.
  • android.yml: run the render error check on both architectures.

Note

Depends on #408, merge after.

ref: BT-7713

@KishanPRao
KishanPRao requested a review from melekr October 7, 2026 10:58
@KishanPRao KishanPRao self-assigned this Oct 7, 2026
@KishanPRao KishanPRao added the enhancement New feature or request label Oct 7, 2026
@KishanPRao
KishanPRao changed the base branch from main to bugfix/android-fatal-js-double-report October 7, 2026 11:18
@KishanPRao
KishanPRao marked this pull request as ready for review October 7, 2026 14:05
Base automatically changed from bugfix/android-fatal-js-double-report to main October 7, 2026 14:08
# Conflicts:
#	.github/scripts/android-js-fatal.sh
#	.github/scripts/ci-crash-driver.js
#	.github/workflows/android.yml
#	packages/react-native/src/handlers/UnhandledExceptionHandler.ts
@KishanPRao
KishanPRao merged commit af96ba4 into main Oct 7, 2026
12 checks passed
@KishanPRao
KishanPRao deleted the feature/report-render-errors branch October 7, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants