Crash reports

Bugsee automatically intercepts uncaught exceptions and sends crash reports on app restart. Don't forget to call Bugsee.initialize() to let us install all required hooks. Refer to installation for more details.

Symbolication

We use sourcemaps to get proper methods, filenames and line numbers for each frame in captured stack trace. To let us use them, sourcemaps need to be generated and uploaded with bugsee-sourcemaps utility. Refer to documentation for bugsee-sourcemaps to learn how to use it. Once you have everything configured, before deploying your app (either debug or production build), run bugsee-sourcemaps to let it generate and upload sourcemaps for your application.

As we use application versions to pick the right sourcemaps for each crash report, we need to make sure they are actually aligned. Both the bugsee-sourcemaps CLI tool and Bugsee instance running within your app have an options to set/change the application versions.

By default, during Bugsee initialization on application start, we will try to get version automatically. Similarly, CLI tool will pick the application version from package.json in your project's root. If you rely on that automatic mechanism, then make sure you keep that versions in sync: in package.json and in your applications' projects (iOS and Android projects).

On the other hand (and this is what we recommend), you can set versions yourself. Use Bugsee.setAppVersion('') method in your application, to set desired version. You should do that right after Bugsee.initialize(). Note, however, that initialization is an async operation and you should wait for its completion (like, await Bugsee.initialize() or Bugsee.initialize().then(() => {})) to actually set version and prevent any race conditions.

Example usage

Note: Regardless of the build configuration (debug or build) we encourage you to set application version explicitly via Bugsee.setAppVersion().

By default, sourcemaps are generated by react-native module itself and you need to call it yourself to generate them. Doing so, will make you also trigger upload command for bugsee-sourcemaps to upload generated data. We want to help you save time and efforts and encouraging to stick with make command which does all the things itself. Below, we briefly describe the steps and give you command examples on how to upload sourcemaps in your generic development flow.

Debug builds

  • Open your React Native project
  • Make some changes
  • Build
  • Upload sourcemaps with:

!iOS

# Execute in project root or add project path as last parameter
bugsee-sourcemaps make -t <YOUR-TOKEN> \
-v <APP-VERSION> \
-p ios \
-c debug \
--overwrite

!Android

# Execute in project root or add project path as last parameter
bugsee-sourcemaps make -t <YOUR-TOKEN> \
-v <APP-VERSION> \
-p android \
-c debug \
--overwrite
  • Run your app

Release builds

IMPORTANT: For release builds, we strongly recommend to upload sourcemaps BEFORE deploying your app. That will guarantee your reports will not fail to symbolicate due to missing symbols.

  • Open your React Native project
  • Make some changes
  • Build
  • Upload sourcemaps with:

!iOS

# Execute in project root or add project path as last parameter
bugsee-sourcemaps make -t <YOUR-TOKEN> \
-v <APP-VERSION> \
-p ios \
-c release \
--overwrite

!Android

# Execute in project root or add project path as last parameter
bugsee-sourcemaps make -t <YOUR-TOKEN> \
-v <APP-VERSION> \
-p android \
-c release \
--overwrite
  • Deploy your build app to target Store