When you build Android games with Unity using IL2CPP, a symbol ZIP file is generated containing the symbols used in your C# code as well as the Unity framework itself. These files should be uploaded, along with any ProGuard, DexGuard, or R8 mappings and NDK symbol files in order to show full stacktraces in your dashboard.
$ bugsnag-cli upload unity-android <path> --aab-path <aab-path>
<path> is either the symbols ZIP file or the directory containing it. This defaults to the current directory if omitted.
The command will also attempt to upload Android mapping and symbols files from the Android App Bundle (AAB) produced by the Gradle build. If an AAB is located in the same directory as the Unity symbols file (or at the location provided in
--aab-path) then the manifest inside it will be used to provide your app’s build information required for the symbol upload.
Assuming the symbols ZIP and generated AAB are in the app build directory, the simplest way to run the command is to specify this directory along with the project API key:
$ bugsnag-cli upload unity-android /path/to/build/directory \ --api-key my-api-key
Alternatively you can provide the symbols ZIP and AAB file paths specifically:
$ bugsnag-cli upload unity-android /path/to/my-game.symbols.zip \ --aab-path /path/to/my-game.aab \ --api-key my-api-key
The path to the generated
.aab file to upload with the Unity symbols.
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 unique application ID, usually the package name, of the app. This defaults to the value of
Package in your app’s manifest file, if found.
Used to see the files and options that would be uploaded without actually sending them to the BugSnag endpoint.
Whether to stop any further uploads if a file fails to upload successfully. By default the command attempts to upload all files.
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 number of seconds to wait before failing an upload attempt. By default the upload is given 300s (5 mins).
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.