Symbolicating A Stack Trace React Native
Symbolicating A Stack Trace React Native
The sections like p@1:132161 are minified function names and bytecode offsets. To
debug the problem, you would instead want to translate it into file, line and function
name: AwesomeProject/App.js:54:initializeMap . This is known as symbolication. You
can symbolicate minified function names and bytecode like the above by passing
metro-symbolicate a generated source map and the stack trace.
npx metro-symbolicate
android/app/build/generated/sourcemaps/react/release/index.android.bundle.map <
stacktrace.txt
This will turn each minified function name and offset like p@1:132161 into the actual
file- and function name AwesomeProject/App.js:54:initializeMap .
https://reactnative.dev/docs/symbolication 1/2
4/19/23, 7:45 AM Symbolicating a stack trace · React Native
Notes on Sourcemaps
Multiple source maps may be generated by the build process. Make sure to use the
one in the location shown in the examples.
Make sure that the source map you use corresponds to the exact commit of the
crashing app. Small changes in source code can cause large differences in offsets.
If metro-symbolicate exits immediately with success, make sure the input comes
from a pipe or redirection and not from a terminal.
https://reactnative.dev/docs/symbolication 2/2