In addition to the source maps, the command extracts version and build information, including your BugSnag API key, required for the upload from your app’s manifest file (
AndroidManifest.xml). These values can be overridden, or provided entirely, by command line options.
The simplest way to run the command is from the root directory of your React Native project:
$ bugsnag-cli upload react-native-android
Or by providing a specific bundle file and associated mapping file to upload:
$ bugsnag-cli upload react-native-android \ --bundle android/app/build/ASSETS/createBundleReleaseJsAndAssets/index.android.bundle \ --source-map android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
If you have multiple variants built or a non-standard project layout, you might need to provide extra options:
$ bugsnag-cli upload react-native-android \ --app-manifest android/app/build/intermediates/merged_manifests/release/AndroidManifest.xml \ --variant release
Your project’s API key. This defaults to the value of
com.bugsnag.android.API_KEY in your app’s manifest file, if found.
You can find your API key in Project Settings from your BugSnag dashboard.
The path to the app’s manifest file (
AndroidManifest.xml), which is used to extract app information required for the upload. By default, the command looks for this file in
android/app/build/intermediates/merged_manifests/<variant>/AndroidManifest.xml from your project directory.
android/app/build/generated/sourcemaps/react/release/index.android.bundle.map from your project directory.
Whether the app is a debug or release build. This value should mirror the value used when generating source map files with
Used to see the files and options that would be uploaded without actually sending them to the BugSnag endpoint.
Whether to ignore and overwrite existing uploads with same identifier. By default the command will fail if a matching file exists.
Path to strip from the beginning of source file names referenced in stacktraces when displayed as an error in your dashboard. This will default to your project’s root directory if the command has detected one, otherwise it’s empty.
The number of retry attempts before failing an upload. By default it is only attempted once.
The path to the source map generated by the React Native build. By default, the command looks for this file in
android/app/build/ASSETS/createBundleReleaseJsAndAssets/index.android.bundle from your project directory.
The number of seconds to wait before failing an upload attempt. By default the upload is given 300s (5 mins).
The BugSnag On-premise upload server hostname, optionally containing port number. The command will append the appropriate path to access the correct BugSnag API upload endpoint.
The build type/flavor (e.g. ‘debug’ or ‘release’). This is used to disambiguate the between built files when searching your project directory.
The version code of this build of the app. This defaults to the value of
VersionCode in your app’s manifest file, if found.
The version of the app. This defaults to the value of
VersionName in your app’s manifest file, if found.