firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.72k stars 3.97k forks source link

🐛 [firebase_crashlytics] Error uploading dart obfuscated symbols for iOS platform #12050

Closed OutdatedGuy closed 11 months ago

OutdatedGuy commented 11 months ago

Bug report

Describe the bug

I'm building my flutter project for iOS using the following command:

flutter build ipa --release --obfuscate --split-debug-info="build/obfuscation-debug-symbols/ios"

As I'm using --obfuscate flag it generates a dart symbols table in the build/obfuscation-debug-symbols/ios directory. It is needed to upload this symbols file to Firebase Crashlytics to de-obfuscate any dart crash events/StackTrace.

So to do that I'm using the following command:

firebase crashlytics:symbols:upload --app="xxx:ios:xxx" "build/obfuscation-debug-symbols/ios/"

But running this command is giving me the following error:

i  Generating symbols for build/obfuscation-debug-symbols/ios/
⚠  [CRASHLYTICS LOG DEBUG] Crashlytics Buildtools initialized.
[CRASHLYTICS LOG DEBUG] Skipping dumpsyms extraction, file exists: .crashlytics/dump_syms.bin
[CRASHLYTICS LOG DEBUG] Breakpad symbol generator initialized: .crashlytics/dump_syms.bin
[CRASHLYTICS LOG DEBUG] Generating native symbol files for build/obfuscation-debug-symbols/ios; writing output to: /var/folders/y8/zgs_2lq12553qmw10ywr4cr40000gn/T/crashlytics-aa391dbb-e0da-46f4-b357-c86635c520e8/nativeSymbols/1-32944439449-ios-f2f1aba1db652a7f95f808/breakpad
[CRASHLYTICS LOG DEBUG] 1 native libraries found at build/obfuscation-debug-symbols/ios
[CRASHLYTICS LOG DEBUG] Crashlytics generating Breakpad Symbol file for: build/obfuscation-debug-symbols/ios/app.ios-arm64.symbols
[CRASHLYTICS LOG DEBUG] Extracting Breakpad symbols to temp file: /var/folders/y8/zgs_2lq12553qmw10ywr4cr40000gn/T/crashlytics-aa391dbb-e0da-46f4-b357-c86635c520e8/nativeSymbols/1-32944439449-ios-f2f1aba1db652a7f95f808/breakpad/app.ios-arm64.symbols13739753712731686809.tmp
java.io.IOException: Breakpad symbol generation failed (exit=1), see STDERR
        at com.google.firebase.crashlytics.buildtools.ndk.internal.breakpad.BreakpadSymbolGenerator.generateSymbols(BreakpadSymbolGenerator.java:133)
        at com.google.firebase.crashlytics.buildtools.Buildtools.generateNativeSymbolFiles(Buildtools.java:273)
        at com.google.firebase.crashlytics.buildtools.CommandLineHelper.executeGenerateSymbols(CommandLineHelper.java:185)
        at com.google.firebase.crashlytics.buildtools.CommandLineHelper.executeCommand(CommandLineHelper.java:118)
        at com.google.firebase.crashlytics.buildtools.CommandLineHelper.main(CommandLineHelper.java:65)
        at com.google.firebase.crashlytics.buildtools.Buildtools.main(Buildtools.java:111)

Error: java command failed with args: -jar,.cache/firebase/crashlytics/buildtools/crashlytics-buildtools-2.9.2.jar,-symbolGenerator,breakpad,-symbolFileCacheDir,/var/folders/y8/zgs_2lq12553qmw10ywr4cr40000gn/T/crashlytics-aa391dbb-e0da-46f4-b357-c86635c520e8/nativeSymbols/1-32944439449-ios-f2f1aba1db652a7f95f808/breakpad,-verbose,-generateNativeSymbols,-unstrippedLibrary,build/obfuscation-debug-symbols/ios/,-clientName,firebase-cli;crashlytics-buildtools
updating: app.ios-arm64.symbols (deflated 72%)

This is only happening on iOS. On Android the obfuscation symbols are getting uploaded without any problems.

Steps to reproduce

Steps to reproduce the behavior:

  1. Create a new flutter app
  2. Add required firebase dependencies (firebase_core, firebase_crashlytics, etc)
  3. Using flutterfire cli connect to a firebase project (flutterfire configure --project="xxx" --platforms="ios")
  4. Build app using the command: flutter build ipa --release --obfuscate --split-debug-info="build/obfuscation-debug-symbols/ios"
  5. After build is successful, run this command to upload dart obfuscation symbols to firebase crashlytics: firebase crashlytics:symbols:upload --app="xxx:ios:xxx" "build/obfuscation-debug-symbols/ios/"
  6. See the crash

Expected behavior

It should upload the dart obfuscation symbols to firebase crashlytics without any error like in Android


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.16.4, on macOS 14.2 23C64 darwin-arm64, locale en-IN) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.1) [✓] VS Code (version 1.85.1) [✓] VS Code (version 1.86.0-insider) [✓] Connected device (2 available) [✓] Network resources • No issues found! ```

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand ``` Dart SDK 3.2.3 Flutter SDK 3.16.4 client_app_5amclub 7.0.0+22 dependencies: - algolia_helper_flutter 0.5.0 [algolia_insights algoliasearch collection flutter logging meta rxdart] - animated_text_kit 4.2.2 [flutter characters] - awesome_notifications 0.8.2 [flutter flutter_web_plugins plugin_platform_interface intl] - badges 3.1.2 [flutter] - cached_network_image 3.3.0 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image] - cached_video_player_plus 1.0.1 [flutter video_player_platform_interface video_player_web] - carousel_slider 4.2.1 [flutter] - cloud_firestore 4.13.6 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cloud_functions 4.5.8 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter] - dotted_border 2.1.0 [flutter path_drawing] - email_validator 2.1.17 - ensure_visible_when_focused 1.2.0 [flutter] - firebase_analytics 10.7.4 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_app_check 0.2.1+8 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 4.15.3 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.24.2 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 3.4.8 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_messaging 14.7.9 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_performance 0.9.3+8 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter] - firebase_storage 11.5.6 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math web sky_engine] - flutter_dotenv 5.1.0 [flutter] - flutter_easyloading 3.0.5 [flutter flutter_spinkit] - flutter_svg 2.0.9 [flutter vector_graphics vector_graphics_codec vector_graphics_compiler] - flutter_tts 3.8.5 [flutter flutter_web_plugins] - font_awesome_flutter 10.6.0 [flutter] - get_storage 2.1.1 [flutter get path_provider] - google_fonts 6.1.0 [flutter http path_provider crypto] - http 1.1.2 [async http_parser meta web] - image_cropper 5.0.1 [flutter image_cropper_platform_interface image_cropper_for_web] - image_picker 1.0.5 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_linux image_picker_macos image_picker_platform_interface image_picker_windows] - infinite_scroll_pagination 4.0.0 [flutter flutter_staggered_grid_view sliver_tools] - intl 0.18.1 [clock meta path] - intl_phone_field 3.2.0 [flutter] - just_the_tooltip 0.0.12 [flutter] - lottie 2.7.0 [archive flutter path vector_math] - path 1.8.3 - path_provider 2.1.1 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - pin_code_fields 8.0.1 [flutter] - progress_border 0.1.5 [flutter] - provider 6.1.1 [collection flutter nested] - razorpay_flutter 1.3.5 [flutter eventify fluttertoast package_info_plus] - readmore 2.2.0 [flutter] - receive_sharing_intent_plus 1.0.1 [flutter] - rounded_loading_button 2.1.0 [flutter rxdart] - share_plus 7.2.1 [cross_file meta mime flutter flutter_web_plugins share_plus_platform_interface file url_launcher_web url_launcher_windows url_launcher_linux url_launcher_platform_interface ffi win32] - timeline_tile 2.0.0 [flutter] - upgrader 8.4.0 [flutter device_info_plus html http os_detect package_info_plus shared_preferences url_launcher version xml] - url_launcher 6.2.2 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] - uuid 4.2.2 [crypto sprintf meta] - wakelock_plus 1.1.4 [flutter flutter_web_plugins meta wakelock_plus_platform_interface win32 dbus package_info_plus js] dev dependencies: - flutter_lints 3.0.1 [lints] - flutter_native_splash 2.3.8 [args flutter flutter_web_plugins js html image meta path universal_io xml yaml ansicolor] - flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math async boolean_selector characters collection material_color_utilities meta source_span stream_channel string_scanner term_glyph web] - icons_launcher 2.1.6 [args image path universal_io yaml] - package_rename 1.5.2 [args html logger yaml] transitive dependencies: - _flutterfire_internals 1.3.16 [collection firebase_core firebase_core_platform_interface flutter meta] - algolia_client_core 0.3.0 [dio] - algolia_client_insights 0.3.0 [algolia_client_core json_annotation collection] - algolia_client_search 0.3.0 [algolia_client_core json_annotation collection] - algolia_insights 0.2.2 [algolia_client_insights collection flutter hive logging meta path_provider rxdart uuid] - algoliasearch 0.3.0 [algolia_client_core algolia_client_search algolia_client_insights json_annotation collection] - ansicolor 2.0.2 - archive 3.4.9 [crypto path pointycastle] - args 2.4.2 - async 2.11.0 [collection meta] - boolean_selector 2.1.1 [source_span string_scanner] - cached_network_image_platform_interface 3.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.1.0 [cached_network_image_platform_interface flutter flutter_cache_manager] - characters 1.3.0 - clock 1.1.1 - cloud_firestore_platform_interface 6.0.10 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 3.8.10 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - cloud_functions_platform_interface 5.5.11 [firebase_core flutter meta plugin_platform_interface] - cloud_functions_web 4.6.11 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - collection 1.18.0 - convert 3.1.1 [typed_data] - cross_file 0.3.3+8 [meta web] - crypto 3.0.3 [typed_data] - csslib 1.0.0 [source_span] - dbus 0.7.10 [args ffi meta xml] - device_info_plus 9.1.1 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta win32 win32_registry] - device_info_plus_platform_interface 7.0.0 [flutter meta plugin_platform_interface] - dio 5.4.0 [async http_parser meta path] - eventify 1.0.1 - fake_async 1.3.1 [clock collection] - ffi 2.1.0 - file 7.0.0 [meta path] - file_selector_linux 0.9.2+1 [cross_file file_selector_platform_interface flutter] - file_selector_macos 0.9.3+3 [cross_file file_selector_platform_interface flutter] - file_selector_platform_interface 2.6.1 [cross_file flutter http plugin_platform_interface] - file_selector_windows 0.9.3+1 [cross_file file_selector_platform_interface flutter] - firebase_analytics_platform_interface 3.8.4 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.5.5+11 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_app_check_platform_interface 0.1.0+10 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_app_check_web 0.1.0+10 [_flutterfire_internals firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 7.0.9 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.8.12 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser js meta] - firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.10.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.6.16 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.5.18 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.5.18 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_performance_platform_interface 0.1.4+16 [_flutterfire_internals firebase_core flutter plugin_platform_interface] - firebase_performance_web 0.1.4+16 [_flutterfire_internals firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins js] - firebase_storage_platform_interface 5.1.3 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.6.17 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta] - flutter_cache_manager 3.3.1 [clock collection file flutter http path path_provider rxdart sqflite uuid] - flutter_plugin_android_lifecycle 2.0.17 [flutter] - flutter_spinkit 5.2.0 [flutter] - flutter_staggered_grid_view 0.7.0 [flutter] - flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math web] - fluttertoast 8.2.4 [flutter flutter_web_plugins] - get 4.6.6 [flutter] - hive 2.2.3 [meta crypto] - html 0.15.4 [csslib source_span] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - image 4.1.3 [archive meta xml] - image_cropper_for_web 3.0.0 [flutter flutter_web_plugins image_cropper_platform_interface js] - image_cropper_platform_interface 5.0.0 [flutter plugin_platform_interface http] - image_picker_android 0.8.9+1 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - image_picker_for_web 3.0.1 [flutter flutter_web_plugins image_picker_platform_interface mime] - image_picker_ios 0.8.9 [flutter image_picker_platform_interface] - image_picker_linux 0.2.1+1 [file_selector_linux file_selector_platform_interface flutter image_picker_platform_interface] - image_picker_macos 0.2.1+1 [file_selector_macos file_selector_platform_interface flutter image_picker_platform_interface] - image_picker_platform_interface 2.9.1 [cross_file flutter http plugin_platform_interface] - image_picker_windows 0.2.1+1 [file_selector_platform_interface file_selector_windows flutter image_picker_platform_interface] - js 0.6.7 [meta] - json_annotation 4.8.1 [meta] - lints 3.0.0 - logger 2.0.2+1 - logging 1.2.0 - matcher 0.12.16 [async meta stack_trace term_glyph test_api] - material_color_utilities 0.5.0 [collection] - meta 1.10.0 - mime 1.0.4 - nested 1.0.0 [flutter] - octo_image 2.0.0 [flutter] - os_detect 2.0.1 - package_info_plus 4.2.0 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface win32] - package_info_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - path_drawing 1.0.1 [vector_math meta path_parsing flutter] - path_parsing 1.0.1 [vector_math meta] - path_provider_android 2.2.1 [flutter path_provider_platform_interface] - path_provider_foundation 2.3.1 [flutter path_provider_platform_interface] - path_provider_linux 2.2.1 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_platform_interface 2.1.1 [flutter platform plugin_platform_interface] - path_provider_windows 2.2.1 [ffi flutter path path_provider_platform_interface win32] - petitparser 6.0.2 [meta] - platform 3.1.3 - plugin_platform_interface 2.1.7 [meta] - pointycastle 3.7.3 [collection convert js] - rxdart 0.27.7 - share_plus_platform_interface 3.3.1 [cross_file flutter meta mime plugin_platform_interface path_provider uuid] - shared_preferences 2.2.2 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - shared_preferences_android 2.2.1 [flutter shared_preferences_platform_interface] - shared_preferences_foundation 2.3.4 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.3.2 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_platform_interface 2.3.1 [flutter plugin_platform_interface] - shared_preferences_web 2.2.2 [flutter flutter_web_plugins shared_preferences_platform_interface web] - shared_preferences_windows 2.3.2 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - sky_engine 0.0.99 - sliver_tools 0.2.12 [flutter] - source_span 1.10.0 [collection path term_glyph] - sprintf 7.0.0 - sqflite 2.3.0 [flutter sqflite_common path] - sqflite_common 2.5.0+2 [synchronized path meta] - stack_trace 1.11.1 [path] - stream_channel 2.1.2 [async] - string_scanner 1.2.0 [source_span] - synchronized 3.1.0+1 - term_glyph 1.2.1 - test_api 0.6.1 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph] - typed_data 1.3.2 [collection] - universal_io 2.2.2 [collection meta typed_data] - url_launcher_android 6.2.0 [flutter url_launcher_platform_interface] - url_launcher_ios 6.2.1 [flutter url_launcher_platform_interface] - url_launcher_linux 3.1.1 [flutter url_launcher_platform_interface] - url_launcher_macos 3.1.0 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.2.0 [flutter plugin_platform_interface] - url_launcher_web 2.2.2 [flutter flutter_web_plugins url_launcher_platform_interface web] - url_launcher_windows 3.1.1 [flutter url_launcher_platform_interface] - vector_graphics 1.1.9+1 [flutter vector_graphics_codec] - vector_graphics_codec 1.1.9+1 - vector_graphics_compiler 1.1.9+1 [args meta path_parsing xml vector_graphics_codec path] - vector_math 2.1.4 - version 3.0.2 - video_player_platform_interface 5.1.4 [flutter plugin_platform_interface] - video_player_web 2.0.15 [flutter flutter_web_plugins video_player_platform_interface] - wakelock_plus_platform_interface 1.1.0 [flutter plugin_platform_interface meta] - web 0.3.0 - win32 5.1.1 [ffi] - win32_registry 1.1.2 [ffi win32] - xdg_directories 1.0.3 [meta path] - xml 6.5.0 [collection meta petitparser] - yaml 3.1.2 [collection source_span string_scanner] ```

darshankawar commented 11 months ago

@OutdatedGuy Check this comment and associated links with comments and see if they help in your case or not.

OutdatedGuy commented 11 months ago

Yo @darshankawar, upon checking your linked comment and associated links with it. It looks like for me currently, the dart obfuscated symbols are automatically uploaded by the script to upload dSYM.

As no crash has happened yet, I have no way to know if dart obfuscation is de-obfuscated in the Firebase Console UI.

So for now I'll close this issue and if I found that there is error in de-obfuscating dart code in Firebase Crashlytics Console UI I'll re-open the issue.