Skip to content

[iOS] invalid symbols files produced by --split-debug-info #138182

@btrautmann

Description

@btrautmann

Is there an existing issue for this?

Steps to reproduce

  1. Create a Flutter project using flutter create
  2. Build the flutter application using the following command (note, signing disabled for ease, but this reproduces with signed binaries as well):
flutter build ipa --no-codesign --split-debug-info=app-symbols -v
  1. Navigate to the app-symbols directory and run the following:
  2. Install the Sentry CLI by following these directions.
  3. Verify the validity of the produced symbols files by running the following:
sentry-cli debug-files check app.ios-arm64.symbols

Expected results

Sentry CLI should produce output indicating that the produced debug file is valid:

Debug Info File Check
  Type: elf debug companion
  Contained debug identifiers:
    > Debug ID: cf2c4e5d-9766-3f21-b0cd-b42e5c0e2683
      Code ID:  cf2c4e5d97663f21b0cdb42e5c0e2683
      Arch:     arm64
  Contained debug information:
    > symtab, unwind
  Usable: yes

Actual results

Sentry CLI produces output indicating that the produced debug file is invalid:

Debug Info File Check
  Type: elf debug companion
  Contained debug identifiers:
    > Debug ID: 00000000-0000-0000-0000-000000000000
      Arch:     arm64
  Contained debug information:
    > symtab, debug
  Usable: no (missing debug identifier, likely stripped)

Code sample

I've created a reproduction repo here, though it's basically just a shell project, so nothing too special.

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Ironically my output exceeded the maximum character length. Including as a file.

build_output.txt

Flutter Doctor output

Doctor output
[!] Flutter (Channel unknown, 3.10.7, on macOS 13.6.1 22G313 darwin-arm64, locale en-US)
    ! Flutter version 3.10.7 on channel unknown at /Users/brandontrautmann/fvm/versions/3.10.7
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Unknown upstream repository.
      Reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    • Framework revision e285328a69 (3 months ago), 2023-08-17 17:55:17 -0700
    • Engine revision 077a732ef4
    • Dart version 3.0.7
    • DevTools version 2.23.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/brandontrautmann/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • ANDROID_SDK_ROOT = /Users/brandontrautmann/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode_14.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Community Edition (version 2023.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.84.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.76.0

[✓] Connected device (4 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554                        • android-arm64  • Android 13 (API 33) (emulator)
    • iPhone 13 mini (mobile)     • 0492C672-A151-402C-AAA0-0B694038CF37 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
    • macOS (desktop)             • macos                                • darwin-arm64   • macOS 13.6.1 22G313 darwin-arm64
    • Chrome (web)                • chrome                               • web-javascript • Google Chrome 119.0.6045.123

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Note: We're currently using the funky 3.10.7 release that (AFAIK) never made it to stable, but I've tried this on versions going way back in time and am having the same issue with all versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: buildBuilding flutter applications with the toolfound in release: 3.13Found to occur in 3.13found in release: 3.17Found to occur in 3.17has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions