Skip to content

Flutter symbol upload

Crash reports of release builds contain memory addresses on iOS and renamed classes on Android. Appelium turns them into readable stack traces with the symbol files of each build: the dSYM files of your iOS build and the mapping.txt of your Android build. Upload them once per build you distribute, from the machine or CI job that builds it. Crash reports that arrived before the upload are symbolicated again within a few minutes.

Before you start

  • You need a workspace API key with admin permissions from API Access Settings, for example a system API key. This is not one of the SDK's application API keys; see Authentication. Store it as a CI secret, for example in APPELIUM_TOKEN.
  • You need the application alias of each platform's application, shown in the application's settings in the Dashboard, for example my-app-ios and my-app-android.

iOS: dSYM files

flutter build ipa creates an Xcode archive with the dSYM files of your app, of the Flutter engine and of the frameworks it embeds. Zip the archive's dSYMs folder and upload it:

flutter build ipa

ditto -c -k --keepParent build/ios/archive/Runner.xcarchive/dSYMs dSYMs.zip

curl --fail-with-body -X POST "https://api.appelium.com/v2/symbolsFiles" \
    -H "X-Appelium-Token: $APPELIUM_TOKEN" \
    -H "X-Appelium-Application-Alias: my-app-ios" \
    -H "Content-Type: application/zip" \
    --data-binary @dSYMs.zip

Appelium reads the bundle identifier, version and build number from the dSYMs themselves. If you archive with Xcode, fastlane or Xcode Cloud instead, upload the archive's dSYMs folder as the iOS dSYM upload guide shows.

Android: mapping file

Flutter minifies Android release builds with R8, which writes the mapping file to build/app/outputs/mapping/release/mapping.txt. Upload it with the package name and the version of the build, which Flutter takes from the version in pubspec.yaml: 1.2.3+456 is version name 1.2.3 and version code 456.

flutter build appbundle

curl --fail-with-body -X POST "https://api.appelium.com/v2/symbolsFiles" \
    -H "X-Appelium-Token: $APPELIUM_TOKEN" \
    -H "X-Appelium-Application-Alias: my-app-android" \
    -H "X-Appelium-Package: com.example.myapp" \
    -H "X-Appelium-Version-Name: 1.2.3" \
    -H "X-Appelium-Version-Code: 456" \
    -H "Content-Type: text/plain" \
    --data-binary @build/app/outputs/mapping/release/mapping.txt

If you set the version with --build-name and --build-number, upload with those values. See Android mapping upload for details.

Troubleshooting

  • 401 Unauthorized: the token is missing or invalid. Use a workspace API key, not an application API key of the SDK.
  • 403 Forbidden: the key has no admin permissions. Use a system API key, or a personal key of a user with the Admin role.
  • Frames are still unsymbolicated on iOS: check that the uploaded dSYMs belong to the exact build in the report. Every build gets new dSYMs, even without code changes.
  • Stack traces are still obfuscated on Android: check that the package name, version name and version code of the upload match the build in the report.

The full request and response reference is in Symbols files REST API.