invertase / flutterfire_cli

A CLI to help with using FlutterFire in your Flutter applications.
Apache License 2.0
164 stars 47 forks source link

[bug]: Upload Crashlytics Symbols dSYM Files NOT working! #314

Open Shatha-Naami opened 1 week ago

Shatha-Naami commented 1 week ago

Is there an existing issue for this?

CLI Version

1.0.0

Firebase Tools version

13.11.2

Flutter Doctor Output

image

Description

I followed the Firebase Crashlytics setup guide for Flutter to integrate Firebase Crashlytics into my Flutter app. While I am able to see crash reports and user metrics in the Firebase Analytics dashboard, the dSYM files are not being uploaded automatically.

Steps to reproduce

  1. Follow the official Firebase Crashlytics setup guide for Flutter.
  2. Complete all the steps as instructed, including adding the necessary dependencies and setting up the Crashlytics SDK.
  3. Run the app and force a crash to test the integration.
  4. Check the Firebase Analytics dashboard for crash reports and user metrics.

Expected behavior

The dSYM files should be uploaded automatically without any manual intervention.

Actual Behavior: Although crash reports and user metrics appear in the Firebase Analytics dashboard, the dSYM files are not uploaded automatically.

Screenshots

image

image

image

Additional context and comments

Flutter version: 3.22.2 Firebase Crashlytics version: ^4.0.1 Xcode version: 15.4

Shatha-Naami commented 1 week ago

@russellwheatley any updates?

DougSig commented 1 week ago

I am also experiencing this. Have been since May 29th when I first integrated crashlytics -- have not had a successful dsym upload yet despite logs showing the script finishing successfully.

DougSig commented 1 week ago

Additionally, flutterfire configure does not add the input files that the iOS instructions say are required -- and if you manually add them, running flutterfire configure overrides it and removes them. However, manually adding the input files still does not solve the uploading issue.

michaelowolf commented 1 week ago

We're getting the same - I've tried spitting out the logs as described in https://github.com/invertase/flutterfire_cli/issues/249 and they suggest the upload is successful:

Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
Processing dSYMs...
Successfully submitted symbols for architecture x86_64 with UUID 36303faa3e1f34a5ba0279f924182260 in dSYM: /Users/[..]/build/ios/Debug-development-iphonesimulator/Runner.app.dSYM
Successfully uploaded Crashlytics build event and symbols
Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
Processing dSYMs...
Successfully submitted symbols for architecture x86_64 with UUID 36303faa3e1f34a5ba0279f924182260 in dSYM: /Users/[..]/build/ios/Debug-development-iphonesimulator/Runner.app.dSYM
Successfully uploaded Crashlytics build event and symbols

But the dSYM(s) never appear in the Firebase console.

If helpful, we're using Very Good CLI, so we have build flavours for production, staging and development, and a Firebase project per environment. This also means we don't have a permanent top-level GoogleService-Info.plist, but rather copy in an environment-specific version at build time. I've not tried to manually configure the input files for the build phase (yet!).

Shatha-Naami commented 6 days ago

We're getting the same - I've tried spitting out the logs as described in #249 and they suggest the upload is successful:

Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
Processing dSYMs...
Successfully submitted symbols for architecture x86_64 with UUID 36303faa3e1f34a5ba0279f924182260 in dSYM: /Users/[..]/build/ios/Debug-development-iphonesimulator/Runner.app.dSYM
�[32mSuccessfully uploaded Crashlytics build event and symbols�[0m
Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
Processing dSYMs...
Successfully submitted symbols for architecture x86_64 with UUID 36303faa3e1f34a5ba0279f924182260 in dSYM: /Users/[..]/build/ios/Debug-development-iphonesimulator/Runner.app.dSYM
�[32mSuccessfully uploaded Crashlytics build event and symbols�[0m

But the dSYM(s) never appear in the Firebase console.

If helpful, we're using Very Good CLI, so we have build flavours for production, staging and development, and a Firebase project per environment. This also means we don't have a permanent top-level GoogleService-Info.plist, but rather copy in an environment-specific version at build time. I've not tried to manually configure the input files for the build phase (yet!).

@michaelowolf
I tried running the command: flutter build ios --obfuscate --split-debug-info=./ios-build

The console indicated that everything worked fine, and I received the output:

Screenshot 2024-06-20 at 1 20 21 PM

However, when I checked Firebase Crashlytics, I found that the dSYM(s) were not uploaded.

image
Shatha-Naami commented 3 days ago

Additionally, flutterfire configure does not add the input files that the iOS instructions say are required -- and if you manually add them, running flutterfire configure overrides it and removes them. However, manually adding the input files still does not solve the uploading issue.

Exactly, @DougSig . That's what I tried to do. I added all the steps manually and attempted to upload the dSYM files, but they still didn't upload! :(

russellwheatley commented 1 day ago

Hey @Shatha-Naami - as mentioned here, please check to see if that file is missing. Could other folks experiencing this issue also let me know if that file is missing. Thanks 🙏

michaelowolf commented 1 day ago

Hey @Shatha-Naami - as mentioned here, please check to see if that file is missing. Could other folks experiencing this issue also let me know if that file is missing. Thanks 🙏

Hey @russellwheatley, I have a version of app_id_file.json at .dart_tool/flutterfire/platforms/ios/targets/Runner/{Firebase project id}/app_id_file.json for my development Firebase project (of which the contents look correct), but no equivalent for my production Firebase project (although IIRC, neither development nor production were uploading the dSYMs).

Shatha-Naami commented 1 day ago

Hey @Shatha-Naami - as mentioned here, please check to see if that file is missing. Could other folks experiencing this issue also let me know if that file is missing. Thanks 🙏

Hey @russellwheatley, When I checked my app, unfortunately, I didn't find the file. I'm sure I followed all the steps in the documentation, so how can I generate the file?

image
russellwheatley commented 1 day ago

@Shatha-Naami - what version of FlutterFire CLI are you using? The script is added to your build phases and it generates the file when you build you app (or uses existing file if you have built app previously). It is then used to upload symbols.

russellwheatley commented 1 day ago

@michaelowolf - you said you were using VGV CLI? They set their apps up to use build configuration. You should probably be configuring your app to use build configuration instead of target. In other words, use this flag - --ios-build-config= instead of --ios-target=. Unless you have some custom setup of course which doesn't make use of build configuration.

Shatha-Naami commented 1 day ago

@Shatha-Naami - what version of FlutterFire CLI are you using? The script is added to your build phases and it generates the file when you build you app (or uses existing file if you have built app previously). It is then used to upload symbols.

@russellwheatley The version of FlutterFire CLI is --> 1.0.0

After following this document and checking Xcode's Build Phases, I found that this run script was generated automatically and not created manually. I didn't use any previously built files.

image
tpkowastaken commented 2 hours ago

Hi, I have been experiencing the same issue and that's just after freshly installing everything - new mac, new flutter, new xcode, new project. It's very easily reproducable, please look into it. Thank you for your time and effort.

The issue in question: https://github.com/firebase/flutterfire/issues/12990

tpkowastaken commented 1 hour ago

There is a duplicate of this already:

  1. https://github.com/invertase/flutterfire_cli/issues/321