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 flag | Value / default | Applies to | Source |
|---|---|---|---|
hermesFlags | ["-O", "-output-source-map"]; Android maps are enabled by default in current docs | Android Hermes release | release debugging |
Babel env.production.plugins | ["transform-remove-console"]; install babel-plugin-transform-remove-console as a dev dependency | Production JS transformation | performance |
transform-remove-console: exclude | Do not add exclusions if all console methods must be removed; excluding error/warn retains those calls | Babel plugin option | Babel |
SOURCEMAP_FILE | Set a desired map output path above the other exports; iOS source maps are off by default | iOS release bundle | release debugging |
__DEV__ | Guard development-only diagnostics; guarded blocks are stripped from minified builds | React Native compilation | global |
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) | Cause | Fix | Source |
|---|---|---|---|
JavascriptException | Minified function names and bytecode offsets | Symbolicate with the exact composed map and stack input; inspect the first meaningful application frame | release guide |
metro-symbolicate exits immediately with success | Check that input comes from a pipe or redirection | Pipe or redirect the stack file | release 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