flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

[firebase_crashlytics]: java.io.IOException: Breakpad symbol generation failed (exit=1) by GitHub Actions

Open alpha2048 opened this issue 1 year ago • 5 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

Which plugins are affected?

Crashlytics

Which platforms are affected?

Android

Description

When I upload crashlytics symbols generated by Flutter Android build in GitHub Actions (ubuntu-latest), BreakPad error occurs.

Reproducing the issue

Sample Repository: https://github.com/alpha2048/flutter_firebase_crashlytics_test/tree/feature/flutterfire

Reproduce Step:

  1. flutter create
  2. add firebase_core, firebase_crashlytics to pubspec.yaml
  3. Github Actions: build apk with those options: -obfuscate, --split-debug-info
  4. Github Actions: crashlytics:symbols:upload with w9jds/[email protected]

Firebase Core version

~~2.31.0~~ 3.3.0

Flutter Version

3.22.2

Relevant Log Output

java.io.IOException: Breakpad symbol generation failed (exit=1), see STDERR
	at com.google.firebase.crashlytics.buildtools.ndk.internal.breakpad.BreakpadSymbolGenerator.generateSymbols(BreakpadSymbolGenerator.java:129)
	at com.google.firebase.crashlytics.buildtools.Buildtools.generateNativeSymbolFiles(Buildtools.java:306)
	at com.google.firebase.crashlytics.buildtools.CommandLineHelper.executeGenerateSymbols(CommandLineHelper.java:193)
	at com.google.firebase.crashlytics.buildtools.CommandLineHelper.executeCommand(CommandLineHelper.java:125)
	at com.google.firebase.crashlytics.buildtools.CommandLineHelper.main(CommandLineHelper.java:72)
	at com.google.firebase.crashlytics.buildtools.Buildtools.main(Buildtools.java:114)


Error: java command failed with args: -jar,/github/home/.cache/firebase/crashlytics/buildtools/crashlytics-buildtools-3.0.2.jar,-symbolGenerator,breakpad,-symbolFileCacheDir,/tmp/crashlytics-7e5def19-0756-4885-86d6-b898c867ed4a/nativeSymbols/1-88925584673-android-5e29e631a333787113d260/breakpad,-verbose,-generateNativeSymbols,-unstrippedLibrary,outputs,-clientName,firebase-cli;crashlytics-buildtools

Flutter dependencies

Expand Flutter dependencies snippet

Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments

If I use an older firebase-action, e.g. v13.10.2, it succeeds. Also, if I upload it from my Mac with the new CLI, it succeeds too.

I don't know what's causing the error. It might be a problem with firebase-action. Sorry, but I'll put it here first.

alpha2048 avatar Aug 11 '24 10:08 alpha2048

Hello, you are using an old version of Firebase Core (and potentially crashlytics but didn't fill out the Flutter Dependencies part). Please update to the latest version and report back.

Lyokone avatar Aug 12 '24 07:08 Lyokone

@Lyokone Hi, I updated the library to the latest version and still the same problem occurs.

https://github.com/alpha2048/flutter_firebase_crashlytics_test/blob/main/pubspec.yaml https://github.com/alpha2048/flutter_firebase_crashlytics_test/actions/runs/10362231794

alpha2048 avatar Aug 13 '24 01:08 alpha2048

Hi, any updates? @Lyokone I also create an example that reproduces this issue using the firebase_crashlytics example in flutterfire. https://github.com/alpha2048/flutter_firebase_crashlytics_test_2 https://github.com/alpha2048/flutter_firebase_crashlytics_test_2/actions/runs/10438117026/job/28905066500

alpha2048 avatar Aug 18 '24 05:08 alpha2048

For me it works when I set the following path --split-debug-info=build/app/outputs/symbols. When I use the root of my project as path I get java.io.IOException: No native libraries found at <root/path>

kewitschka avatar Aug 19 '24 08:08 kewitschka

I change split-debug-info path to it, but still getting the same issue. https://github.com/alpha2048/flutter_firebase_crashlytics_test_2/actions/runs/10452789994/job/28941942809 Is it small mistake? Does anyone else face a similar problem?

alpha2048 avatar Aug 19 '24 12:08 alpha2048

The firebase-tools used by w9jds/firebase-action are not compatible with Crashlytics. Installing and using firebase cli worked!

      - name: Install firebase CLI
        run: curl -sL https://firebase.tools | bash
      - name: export GOOGLE_APPLICATION_CREDENTIALS_JSON
        run: echo ${{ secrets.FIREBASE_CREDENTIAL_FILE_BASE64 }} > /tmp/google_application_credentials.json
      - name: Upload symbols to firebase crashlytics
        run: firebase crashlytics:symbols:upload --app=${{ secrets.FIREBASE_APP_ID }} build/app/outputs/symbols
        env:
          GOOGLE_APPLICATION_CREDENTIALS: /tmp/google_application_credentials.json

myohei avatar Sep 02 '24 12:09 myohei

@myohei Hi, I followed your suggestion and it was successful! Thank you for your support. https://github.com/alpha2048/flutter_firebase_crashlytics_test_2/actions/runs/10668122043/job/29567129017

I don't know why there is such a difference, but maybe it's not flutterfire problem, so I'm going to close this issue. I might discuss this further in firebase-actions.

alpha2048 avatar Sep 03 '24 05:09 alpha2048