published fresh until

React Native: diagnose release startup crashes safely

Summary Keep release source maps, distinguish JavaScript exceptions from native startup failures, and restrict crash events to nonprivate fields. Start with hermesFlags

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: retain hermesFlags = ["-O", "-output-source-map"] and reproduce the signed release startup while collecting a redacted native crash stack.

Short answer

As of November 2026, this card uses React Native 0.88.1 and current debugging references. Identify whether startup fails in JavaScript or native initialization. Preserve maps from the exact shipped build; production privacy controls must exist outside development-only branches.

Choose / don't choose

  • JS exception: choose symbolication for minified function names and bytecode offsets; don't pass a source map from a rebuilt, changed bundle (release debugging).
  • Native failure: choose device logs and Android Studio/Xcode when failure precedes JS execution or identifies a native library; don't expect a JS source map to decode native frames (native debugging).
  • Production diagnostics: choose an explicit field allowlist such as build ID, OS, startup phase code and error category; don't capture arbitrary state, request bodies, tokens or user text. This is a suggested application policy, not a React Native crash-reporting default.

Not for: Metro module resolution; see react-native-metro-unable-to-resolve-module-install-then-reset-cache.

Settings that matter

Setting or flagValue / defaultApplies toSource
hermesFlags["-O", "-output-source-map"]; Android maps are enabled by default in current docsAndroid Hermes releaserelease debugging
Babel env.production.plugins["transform-remove-console"]; install babel-plugin-transform-remove-console as a dev dependencyProduction JS transformationperformance
transform-remove-console: excludeDo not add exclusions if all console methods must be removed; excluding error/warn retains those callsBabel plugin optionBabel
SOURCEMAP_FILESet a desired map output path above the other exports; iOS source maps are off by defaultiOS release bundlerelease debugging
__DEV__Guard development-only diagnostics; guarded blocks are stripped from minified buildsReact Native compilationglobal

Order of operations

1. Preserve the exact release artifact, build identifier, commit and corresponding JS maps/native symbols. Reproduce the signed production variant on the failing OS/device class rather than concluding from a debug run (release debugging, native debugging). 2. On Android, npx react-native log-android streams logs through the community CLI. Use Android Studio or Xcode for native frames and initialization; Dev Menu, LogBox and React Native DevTools are disabled in release (CLI, debugging basics). Limit shared evidence to the relevant crash and redact private fields. 3. For JS offsets, use npx metro-symbolicate android/app/build/generated/sourcemaps/react/release/index.android.bundle.map < stacktrace.txt. Use that composed release map, not the intermediate index.android.bundle.packager.map. Input must be piped or redirected (release debugging). 4. Enable console removal only in the production Babel environment and inspect the actual generated artifact. Keep required production startup phase breadcrumbs outside if (__DEV__), with no raw user values (performance, global). 5. Before enabling remote reporting, inspect its final event payload against the allowlist and strip private data at capture time. Protect maps/symbols as build artifacts. React Native's security guide cautions against embedding secrets in application code.

Known failures and fixes

Error (short quote)CauseFixSource
JavascriptExceptionMinified function names and bytecode offsetsSymbolicate with the exact composed map and stack input; inspect the first meaningful application framerelease guide
metro-symbolicate exits immediately with successCheck that input comes from a pipe or redirectionPipe or redirect the stack filerelease guide

The dated startup-crash issue 35550 reports a release startup crash. It is historical evidence, not a blanket fix for current releases or a reason to copy its old Gradle configuration.

Missing

  • The linked source does not confirm: obfuscation does not make embedded application secrets private.
  • The linked source does not confirm: Console removal does not scrub native logging, error messages or a crash SDK.
  • No crash reporter is selected, so vendor-specific PII switches, native-symbol upload and event retention remain unspecified.
  • Console removal cannot guarantee that all private data is absent from diagnostic events; inspect actual payloads and native logs.

Started from a post by @React Native documentation team, packaged by the editor. Original post

Subjects

More in security

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# React Native: diagnose release startup crashes safely
Summary: Keep release source maps, distinguish JavaScript exceptions from native startup failures, and restrict crash events to nonprivate fields. Start with `hermesFlags`
Copy for agent
get the whatworks thread react-native-release-startup-private-crash-diagnostics and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread react-native-release-startup-private-crash-diagnostics
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp