Symbolication/Deobfuscation

Explained here is how to symbolicate your crashes to get more details from the stack trace for your React Native app.

iOS Crash Reporting

Native iOS Crashes

For iOS native crashes and details regarding symbolication and uploading dSYMs, please refer to the native iOS crash reporting documentation here.

JavaScript Crashes

Uploading iOS Source Map Files

You can follow these steps to generate iOS sourcemap files and upload them.

1

Prepare

Go to your project root directory.

2

Generate sourcemap and bundle

Run the following script:

Shell
react-native bundle --platform ios \
  --entry-file index.js \
  --dev false \
  --bundle-output ./ios/main.jsbundle \
  --sourcemap-output ./ios-sourcemap.json &&
  zip ./ios-sourcemap.zip ./ios-sourcemap.json
3

Upload

Upload the generated file "ios-sourcemap.json" at your project’s root directory.

Android Crash Reporting

Native Android Crashes

For Android native crashes and details regarding obfuscation and uploading mapping files, please refer to the documentation here.

JavaScript Crashes

Uploading Android Source Map Files

You can follow these steps to generate Android sourcemap files and upload them.

1

Prepare

Go to your project root directory.

2

Generate sourcemap and bundle

Run the following script:

Shell
react-native bundle --platform android \
  --entry-file index.js \
  --dev false \
  --bundle-output ./android/main.jsbundle \
  --sourcemap-output ./android-sourcemap.json &&
  zip ./android-sourcemap.zip ./android-sourcemap.json
3

Upload

Upload the generated file "android-sourcemap.json" at your project’s root directory.

Uploading Source Maps Automatically

For your app crashes to show up with a fully symbolicated/deobfuscated stack trace, we will automatically generate the source map files and upload them to your dashboard on release build. To do so, we rely on your app token being explicitly added to Luciq.init('YOUR_APP_TOKEN') (iOS) or Luciq.start('YOUR_APP_TOKEN') (Android) in JavaScript.

If your app token is defined as a constant or you have different tokens for both iOS and Android apps, set the token as shown in the platform-specific sections below.

iOS

To enable automatic uploading on iOS, follow these steps:

1

Open Build Phases

Navigate to the build phases of your project in Xcode and expand "Upload Sourcemap".

2

Add token and upload script

Replace YOUR_APP_TOKEN with your token from the dashboard and ensure the following lines exist:

Android

To enable automatic uploading on Android:

  • Ensure your app token is explicitly added to Luciq.start('YOUR_APP_TOKEN') in JavaScript. If the token is defined as a constant, you can set an environment variable LUCIQ_APP_TOKEN to be used instead.

  • We automatically read your versionName and versionCode to upload your sourcemap file. Alternatively, set the environment variables LUCIQ_APP_VERSION_NAME and LUCIQ_APP_VERSION_CODE to override these values.

To disable the automatic upload, set the environment variable LUCIQ_SOURCEMAPS_UPLOAD_DISABLE to TRUE.

Uploading Files via API

You can also upload dSYMs, mapping files, and source map files directly via API. Files must be uploaded one by one:

  • dSYMs: .zip

  • Mapping files: .txt

  • Source map files: .json

Request format:

Updated 8 days ago

What’s Next

After a crash has been symbolicated/deobfuscated and the fix is done, reach out to your affected users and let them know to update.

  • Reply to Affected Users

Last updated