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.73k stars 3.98k forks source link

πŸ› [firebase_storage] ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception #5953

Closed yanivshaked closed 2 years ago

yanivshaked commented 3 years ago

Generally speaking, downloading works. But, from time to time while downloading from firebase storage, the following error message is omitted (on Android) and download stops. I'm unable to further download other files from firebase storage until I restart the application.

[ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: PlatformException(firebase_storage, length=11; index=11, {}, null) E/flutter ( 8185): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:581:7) E/flutter ( 8185): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:158:18) E/flutter ( 8185): E/flutter ( 8185): #2 new MethodChannelTask. (package:firebase_storage_platform_interface/src/method_channel/method_channel_task.dart) E/flutter ( 8185): E/flutter ( 8185):

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, 2.0.5, on Microsoft Windows [Version 10.0.18363.1440], locale en-IL) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [√] Chrome - develop for the web [√] Android Studio (version 4.1.0) [√] VS Code (version 1.55.1) [√] Connected device (2 available) β€’ No issues found! ```

Flutter dependencies

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

Click To Expand ``` Dart SDK 2.12.3 Flutter SDK 2.0.5 tw_app 0.12.545+2827 dependencies: - android_play_install_referrer 0.1.1 [flutter] - another_flushbar 1.10.20 [pedantic flutter] - ansicolor 2.0.1 - app_group_directory 2.0.0 [flutter] - assets_audio_player 3.0.3+2 [flutter rxdart uuid http path_provider assets_audio_player_web] - audio_filters 0.0.4 [flutter flutter_web_plugins ffi] - audioplayers 0.18.3 [uuid path_provider flutter flutter_web_plugins] - autocomplete_textfield_ns 2.0.0 [flutter] - bubble 1.2.1 [flutter] - cached_network_image 3.0.0 [flutter flutter_cache_manager octo_image] - camera 0.8.1 [flutter camera_platform_interface pedantic quiver] - charset_converter 2.0.0 [flutter] - collection 1.15.0 - connectivity 3.0.3 [flutter meta connectivity_platform_interface connectivity_macos connectivity_for_web] - contacts_service 0.6.1 [flutter collection quiver] - dashed_circle 0.0.2 [flutter] - device_info 2.0.0 [flutter device_info_platform_interface] - devicelocale 0.4.1 [flutter flutter_web_plugins] - equatable 2.0.0 [collection meta] - expandable 5.0.1 [flutter] - facebook_app_events 0.12.0 [flutter] - file_picker 3.0.1 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface] - firebase_analytics 8.0.1 [firebase_analytics_platform_interface firebase_analytics_web firebase_core flutter meta] - firebase_auth 1.1.1 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 1.0.4 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 2.0.1 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_messaging 9.1.2 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_storage 8.0.4 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - fixnum 1.0.0 - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine] - flutter_app_badger 1.2.0 [flutter] - flutter_bloc 7.0.0 [flutter bloc provider] - flutter_cached_pdfview 0.4.0-nullsafety [flutter flutter_pdfview flutter_cache_manager path_provider path] - flutter_colorpicker 0.4.0 [flutter] - flutter_datetime_picker 1.4.0 [flutter] - flutter_html 2.0.0-nullsafety.0 [html csslib css_colors flutter_layout_grid video_player chewie webview_flutter chewie_audio flutter_svg flutter] - flutter_image_compress 1.0.0 [flutter] - flutter_local_notifications 5.0.0+1 [flutter flutter_local_notifications_platform_interface platform timezone] - flutter_localizations 0.0.0 [flutter intl characters clock collection meta path typed_data vector_math] - flutter_mailer 2.0.0-null-safe [flutter] - flutter_native_text_input 1.0.0 [flutter] - flutter_secure_storage 4.2.0 [meta flutter] - flutter_sim_country_code 0.1.0 [flutter] - flutter_slidable 0.6.0 [flutter] - flutter_sound 8.1.1 [path_provider logger recase uuid provider flutter_spinkit path synchronized flutter flutter_sound_platform_interface flutter_sound_web] - flutter_svg 0.21.0+1 [flutter meta path_drawing vector_math xml] - flutter_typeahead 3.1.1 [flutter flutter_keyboard_visibility] - flutter_xlider 3.4.0 [flutter] - fluttertoast 8.0.3 [flutter flutter_web_plugins] - get_it 6.1.1 [async collection] - google_api_availability 3.0.1 [flutter meta] - google_maps_flutter 2.0.3 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface] - html_unescape 2.0.0 - http 0.13.1 [http_parser meta path pedantic] - image 3.0.2 [archive meta xml] - image_cropper 1.4.0 [flutter] - intl 0.17.0 [clock path] - json_annotation 4.0.1 - json_serializable 4.1.1 [analyzer build build_config collection json_annotation meta path source_gen] - location 4.1.1 [flutter location_platform_interface location_web meta] - modal_bottom_sheet 2.0.0 [flutter] - multi_image_picker 4.7.15 [flutter meta] - mutex 3.0.0 - native_device_orientation 1.0.0 [flutter meta] - ntp 2.0.0 - open_file 3.2.0 [flutter ffi] - package_info 2.0.0 [flutter] - path_provider 2.0.1 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows] - percent_indicator 3.3.0-nullsafety.1 [flutter] - permission_handler 6.1.3 [flutter meta permission_handler_platform_interface] - phone_number 0.9.0+1 [flutter meta] - photo_view 0.11.1 [flutter] - pin_code_fields 7.0.0 [flutter] - pointycastle 3.0.1 [collection] - provider 5.0.0 [collection flutter nested] - receive_sharing_intent 1.4.5 [flutter] - reorderables 0.4.1 [flutter] - rxdart 0.26.0 - screenshot 1.0.0-nullsafety.1 [flutter] - scroll_to_index 2.0.0 [flutter] - scrollable_positioned_list 0.2.0-nullsafety.0 [flutter collection] - share_extend 2.0.0 [meta flutter] - shared_preferences_app_group_ios 0.0.5 [flutter] - sliding_sheet 0.5.0 [flutter] - sliding_up_panel 1.0.2 [flutter] - sound_mode 1.0.2 [flutter] - sprintf 6.0.0 - sqfentity 2.0.0-nullsafety.0 [flutter sqflite_sqlcipher synchronized path sqfentity_gen sqflite_common sqflite_common_ffi] - sqfentity_gen 2.0.0-nullsafety.0+10 [build source_gen analyzer] - sqflite 2.0.0+3 [flutter sqflite_common path] - sticky_headers 0.2.0 [flutter] - system_settings 2.0.0 [flutter] - tab_indicator_styler 2.0.0-null-safety [flutter] - timer_builder 2.0.0 [flutter] - translator 0.1.7 [http] - tuple 2.0.0 [quiver] - uni_links2 0.6.0+2 [uni_links2_platform_interface uni_links_web2 flutter] - url_launcher 6.0.3 [flutter url_launcher_platform_interface url_launcher_linux url_launcher_macos url_launcher_windows url_launcher_web] - url_launcher_ios 0.0.3 [flutter] - uuid 3.0.4 [crypto] - vibration 1.7.4-nullsafety.0 [flutter vibration_web] - video_compress 3.0.0 [flutter] - video_player 2.1.1 [meta video_player_platform_interface video_player_web flutter flutter_test] - video_thumbnail 0.3.3 [flutter] - visibility_detector 0.2.0 [flutter] - wakelock 0.4.0 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web] - web_socket_channel 2.0.0 [async crypto stream_channel] - widgets_visibility_provider 3.0.1 [flutter bloc flutter_bloc equatable] dev dependencies: - build_runner 1.12.2 [args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style glob graphs http_multi_server io js logging meta mime path pedantic pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml] - build_verify 2.0.0 [path test] - flutter_driver 0.0.0 [file meta path vm_service webdriver flutter flutter_test fuchsia_remote_debug_protocol archive args async boolean_selector characters charcode clock collection convert crypto fake_async matcher platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math] - flutter_native_splash 1.1.8+4 [image meta path xml yaml universal_io] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data] - test 1.16.5 [analyzer async boolean_selector coverage http_multi_server io js node_preamble package_config path pedantic pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel typed_data web_socket_channel webkit_inspection_protocol yaml test_api test_core] dependency overrides: - archive 3.1.2 [crypto path] - convert 3.0.0 [typed_data] - crypto 3.0.1 [collection typed_data] - wakelock 0.4.0 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web] transitive dependencies: - _fe_analyzer_shared 21.0.0 [meta] - analyzer 1.5.0 [_fe_analyzer_shared cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml pedantic] - args 1.6.0 - assets_audio_player_web 3.0.3+2 [flutter flutter_web_plugins] - async 2.5.0 [collection] - bloc 7.0.0 [meta] - boolean_selector 2.1.0 [source_span string_scanner] - build 2.0.1 [analyzer async convert crypto glob logging meta path] - build_config 0.4.7 [checked_yaml json_annotation meta path pubspec_parse yaml] - build_daemon 2.1.10 [built_collection built_value http_multi_server logging pedantic path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.0.0 [analyzer build crypto graphs logging path package_config pool pub_semver stream_transform] - build_runner_core 6.1.12 [async build build_config build_resolvers collection convert crypto glob graphs logging meta path package_config pedantic pool timing watcher yaml] - built_collection 5.0.0 - built_value 8.0.5 [built_collection collection fixnum] - camera_platform_interface 2.0.1 [flutter meta plugin_platform_interface cross_file stream_transform] - characters 1.1.0 - charcode 1.2.0 - checked_yaml 2.0.1 [json_annotation source_span yaml] - chewie 1.0.0 [cupertino_icons flutter video_player wakelock] - chewie_audio 1.2.0 [cupertino_icons flutter video_player] - cli_util 0.3.0 [meta path] - clock 1.1.0 - code_builder 3.7.0 [built_collection built_value collection matcher meta] - connectivity_for_web 0.4.0 [connectivity_platform_interface flutter_web_plugins flutter] - connectivity_macos 0.2.0 [flutter] - connectivity_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - coverage 0.15.2 [args logging package_config path source_maps stack_trace vm_service] - cross_file 0.3.1+1 [flutter meta] - css_colors 1.1.0 [flutter] - csslib 0.17.0 [source_span] - cupertino_icons 1.0.2 - dart_style 2.0.0 [analyzer args path pub_semver source_span] - device_info_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - fake_async 1.2.0 [clock collection] - ffi 1.0.0 - file 6.0.0 [meta path] - firebase 9.0.1 [http http_parser js] - firebase_analytics_platform_interface 2.0.0 [flutter meta] - firebase_analytics_web 0.3.0 [firebase firebase_analytics_platform_interface flutter flutter_web_plugins meta] - firebase_auth_platform_interface 4.1.1 [firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 1.0.7 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.0.0 [flutter meta plugin_platform_interface] - firebase_core_web 1.0.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.0.1 [collection firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 2.1.2 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 1.0.5 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_storage_platform_interface 2.0.2 [collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 1.0.4 [async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta] - flutter_blurhash 0.6.0 [flutter meta pedantic] - flutter_cache_manager 3.0.1 [clock collection file flutter http image path path_provider pedantic rxdart sqflite uuid] - flutter_keyboard_visibility 5.0.1 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_web flutter] - flutter_keyboard_visibility_platform_interface 2.0.0 [flutter meta plugin_platform_interface] - flutter_keyboard_visibility_web 2.0.0 [flutter_keyboard_visibility_platform_interface flutter_web_plugins flutter] - flutter_layout_grid 1.0.1 [flutter collection meta quiver] - flutter_local_notifications_platform_interface 3.0.0 [flutter plugin_platform_interface] - flutter_pdfview 1.1.0 [flutter] - flutter_plugin_android_lifecycle 2.0.1 [flutter] - flutter_sound_platform_interface 8.1.1 [flutter meta plugin_platform_interface] - flutter_sound_web 8.1.1 [flutter_sound_platform_interface flutter flutter_web_plugins meta js] - flutter_spinkit 5.0.0 [flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math] - fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform] - glob 2.0.1 [async collection file path pedantic string_scanner] - google_maps_flutter_platform_interface 2.0.4 [flutter meta plugin_platform_interface stream_transform collection] - graphs 1.0.0 - html 0.15.0 [csslib source_span] - http_multi_server 3.0.1 [async] - http_parser 4.0.0 [charcode collection source_span string_scanner typed_data] - io 1.0.0 [meta path string_scanner] - js 0.6.3 - location_platform_interface 2.1.0 [flutter meta plugin_platform_interface] - location_web 3.0.0 [flutter flutter_web_plugins http_parser js location_platform_interface meta] - logger 1.0.0 - logging 1.0.1 - matcher 0.12.10 [stack_trace] - meta 1.3.0 - mime 1.0.0 - nested 1.0.0 [flutter] - node_preamble 1.4.13 - octo_image 1.0.0+1 [flutter flutter_blurhash] - package_config 2.0.0 [path] - path 1.8.0 - path_drawing 0.5.0 [vector_math meta path_parsing flutter] - path_parsing 0.2.0 [vector_math meta] - path_provider_linux 2.0.0 [path xdg_directories path_provider_platform_interface flutter] - path_provider_macos 2.0.0 [flutter] - path_provider_platform_interface 2.0.1 [flutter meta platform plugin_platform_interface] - path_provider_windows 2.0.1 [path_provider_platform_interface meta path flutter ffi win32] - pedantic 1.11.0 - permission_handler_platform_interface 3.3.0 [flutter meta plugin_platform_interface] - petitparser 4.1.0 [meta] - platform 3.0.0 - plugin_platform_interface 2.0.0 [meta] - pool 1.5.0 [async stack_trace] - process 4.0.0 [file path platform] - pub_semver 2.0.0 [collection] - pubspec_parse 1.0.0 [checked_yaml collection json_annotation pub_semver yaml] - quiver 3.0.1 [matcher] - recase 4.0.0 - shelf 1.1.1 [async collection http_parser path stack_trace stream_channel] - shelf_packages_handler 3.0.0 [path shelf shelf_static] - shelf_static 1.0.0 [convert http_parser mime path shelf] - shelf_web_socket 1.0.1 [shelf stream_channel web_socket_channel] - sky_engine 0.0.99 - source_gen 1.0.0 [analyzer async build dart_style glob meta path pedantic source_span] - source_map_stack_trace 2.1.0 [path stack_trace source_maps] - source_maps 0.10.10 [source_span] - source_span 1.8.0 [charcode collection path term_glyph] - sqflite_common 2.0.0+2 [synchronized path meta] - sqflite_common_ffi 2.0.0 [sqlite3 sqflite_common synchronized path meta] - sqflite_sqlcipher 2.0.0 [flutter synchronized path sqflite_common] - sqlite3 1.1.0 [collection ffi meta] - stack_trace 1.10.0 [path] - stream_channel 2.1.0 [async] - stream_transform 2.0.0 - string_scanner 1.1.0 [charcode source_span] - sync_http 0.2.0 - synchronized 3.0.0 - term_glyph 1.2.0 - test_api 0.2.19 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher] - test_core 0.3.15 [analyzer async args boolean_selector collection coverage glob io meta package_config path pedantic pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api] - timezone 0.7.0 [path] - timing 1.0.0 [json_annotation] - typed_data 1.3.0 [collection] - uni_links2_platform_interface 1.0.0+2 [plugin_platform_interface flutter] - uni_links_web2 0.1.0+2 [uni_links2_platform_interface flutter flutter_web_plugins] - universal_io 2.0.4 [collection crypto meta typed_data] - url_launcher_linux 2.0.0 [flutter] - url_launcher_macos 2.0.0 [flutter] - url_launcher_platform_interface 2.0.2 [flutter plugin_platform_interface] - url_launcher_web 2.0.0 [url_launcher_platform_interface meta flutter flutter_web_plugins] - url_launcher_windows 2.0.0 [flutter] - vector_math 2.1.0 - vibration_web 1.6.3-nullsafety.0 [flutter flutter_web_plugins] - video_player_platform_interface 4.1.0 [flutter meta flutter_test] - video_player_web 2.0.0 [flutter flutter_web_plugins meta video_player_platform_interface] - vm_service 5.5.0 [meta] - wakelock_macos 0.1.0 [flutter flutter_web_plugins wakelock_platform_interface] - wakelock_platform_interface 0.2.0 [flutter meta] - wakelock_web 0.2.0 [flutter flutter_web_plugins js wakelock_platform_interface] - watcher 1.0.0 [async path pedantic] - webdriver 2.1.2 [archive matcher path stack_trace sync_http] - webkit_inspection_protocol 1.0.0 [logging] - webview_flutter 2.0.4 [flutter] - win32 2.0.5 [ffi] - xdg_directories 0.2.0 [meta path process] - xml 5.1.0 [collection meta petitparser] - yaml 3.1.0 [collection source_span string_scanner] ```
markusaksli-nc commented 3 years ago

Hi @yanivshaked Is this specific to some type or size of files? Thank you

yanivshaked commented 3 years ago

No, and the same file might be downloaded ok or failed on different sessions.

yanivshaked commented 3 years ago

Following information from crashlytics shows the problem. I have provided illegal URL. Still, I would expect an error value returned rather than an unhandled exception.

image

image

russellwheatley commented 2 years ago

Hey @yanivshaked, are you able to provide a reproducible sample for this error? It appears that the error is fatal, and coming from the platform. In that case, there is nothing Flutterfire can do to catch the exception. This indicates a problem with the underlying Firebase SDK. Either way, it is hard to judge without a reproducible sample.

yanivshaked commented 2 years ago

Hi @russellwheatley, Sorry, but I'm unable to provide a reproducible sample for that error (that project is no longer on focus). As I wrote on my first message, this error is not persistent (doesn't happen every time) but happens from time to time. I believe this issue can be reproduced by trying to download a file from firebase storage and if it works, restarting the application and downloading again - until it fails. Sorry I can't provide any more relevant information or a reproduction sample.

darshankawar commented 2 years ago

@russellwheatley Hi, it looks similar to https://github.com/firebase/flutterfire/issues/3862 and fix to it was https://github.com/firebase/flutterfire/issues/3862#issuecomment-833578129, so does the same needed for this issue too ?

russellwheatley commented 2 years ago

I think given how stale the issue is, we ought to close it out.