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.71k stars 3.97k forks source link

[Firebase storage]: iOS only - Unable to establish connection to channel, happens in Workmanager or isolate only #13064

Closed suesitran closed 4 months ago

suesitran commented 4 months ago

Is there an existing issue for this?

Which plugins are affected?

Storage

Which platforms are affected?

iOS

Description

I try to upload/download file to/from Cloud Storage, using package firebase_storage, everything works fine in foreground, but when I tried to run it in background with Workmanager, I get below error in iOS device (works fine in Android)

 [firebase_storage/channel_error] Unable to establish connection on channel.

So i changed to use Isolate, and same issue happens with iOS device.

Reproducing the issue

Code to reproduce issue

Using workmanager

Initialise workmanager

    await Workmanager()
        .initialize(mediaUploadDownload, isInDebugMode: kDebugMode);

call to trigger 1-off task to workmanager

  Workmanager().registerOneOffTask(TaskName.mediaTask,
    TaskName.uploadTask,
    tag: TaskName.uploadTask,
    existingWorkPolicy: ExistingWorkPolicy.replace,
    initialDelay: const Duration(seconds: 3),
    constraints: Constraints(networkType: NetworkType.connected),
    backoffPolicy: BackoffPolicy.linear,
    backoffPolicyDelay: const Duration(seconds: 10),
  );

Workmanager execution

@pragma('vm:entry-point')
void mediaUploadDownload() {
  Workmanager().executeTask((task, inputData) async {
    WidgetsFlutterBinding.ensureInitialized();
    try {
      await Firebase.initializeApp();

      final user = FirebaseAuth.instance.currentUser;

      print('user in work manager ${user?.uid}');

      final UploadTask uploadTask = FirebaseStorage.instance.ref(mediaPath).putData(byte);

      uploadTask
      .asStream().listen((event) {
        print('upload event ${event.state} => ${event.bytesTransferred}');
      });

    } catch (e) {
      print('Error output: ${e.toString()}');
    }

    return Future.value(true);
  });
}

Using Isolate

Spawn an isolate to start upload media

  Isolate.spawn<bool?>((message) async {
    WidgetsFlutterBinding.ensureInitialized();
    try {
      await Firebase.initializeApp();

      final user = FirebaseAuth.instance.currentUser;

      print('user in work manager ${user?.uid}');

      final UploadTask uploadTask = FirebaseStorage.instance.ref(mediaPath).putData(byte);

      uploadTask
          .asStream().listen((event) {
        print('upload event ${event.state} => ${event.bytesTransferred}');
      });

    } catch (e) {
      print('Error output: ${e.toString()}');
    }

  }, null);

Firebase Core version

2.28.0

Flutter Version

3.19.5

Relevant Log Output

No response

Flutter dependencies

Expand Flutter dependencies snippet
```yaml Dart SDK 3.3.3 Flutter SDK 3.19.5 interactive_diary 2.1.0+1 dependencies: - cached_network_image 3.3.0 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image] - camera 0.10.5+5 [camera_android camera_avfoundation camera_platform_interface camera_web flutter flutter_plugin_android_lifecycle quiver] - cupertino_icons 1.0.6 - dots_indicator 3.0.0 [flutter] - equatable 2.0.5 [collection meta] - expandable_page_view 1.0.17 [flutter] - firebase_core 2.32.0 [firebase_core_platform_interface firebase_core_web flutter meta] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_bloc 8.1.5 [bloc flutter provider] - flutter_html 3.0.0-beta.2 [html csslib collection list_counter flutter] - flutter_quill 9.3.6 [flutter flutter_localizations intl dart_quill_delta collection quiver equatable meta html flutter_colorpicker markdown html2md charcode url_launcher flutter_keyboard_visibility device_info_plus super_clipboard] - flutter_quill_extensions 9.3.10 [flutter http path meta universal_html cross_file flutter_quill photo_view video_player youtube_player_flutter url_launcher super_clipboard gal gal_linux image_picker] - flutter_svg 2.0.10+1 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler] - fvm 2.4.1 [args cli_notify cli_util console date_format io meta path process_run yaml] - get_it 7.6.4 [async collection] - go_router 13.2.2 [collection flutter flutter_web_plugins logging meta] - google_maps_flutter 2.6.0 [flutter google_maps_flutter_android google_maps_flutter_ios google_maps_flutter_platform_interface google_maps_flutter_web] - google_maps_flutter_android 2.7.0 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface stream_transform] - google_maps_flutter_platform_interface 2.6.0 [collection flutter plugin_platform_interface stream_transform] - image 4.1.7 [archive meta xml] - intl 0.18.1 [clock meta path] - mime 1.0.5 - mocktail 1.0.1 [collection matcher test_api] - nartus_app_settings 0.0.1 [flutter shared_preferences] - nartus_authentication 1.0.0+1 [flutter google_sign_in firebase_auth firebase_core cupertino_icons crypto] - nartus_connectivity 0.0.1 [flutter connectivity_plus] - nartus_geocoder 0.0.1 [flutter geocoding] - nartus_location 1.0.0+1 [flutter location permission_handler shared_preferences] - nartus_log 0.0.1 [flutter path_provider share_plus] - nartus_media 0.0.1 [device_info_plus flutter flutter_native_image path_provider permission_handler video_compress video_thumbnail] - nartus_remote_config 1.0.0+1 [flutter cupertino_icons firebase_core firebase_remote_config nartus_connectivity] - nartus_storage 0.0.1 [cloud_firestore firebase_auth firebase_core firebase_storage flutter hive_flutter intl path_provider shared_preferences video_compress workmanager] - nartus_ui_package 1.0.0+1 [flutter cupertino_icons google_fonts flutter_svg intl table_calendar cached_network_image video_player video_thumbnail] - shake 2.2.0 [sensors_plus flutter] - url_launcher 6.2.5 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] dev dependencies: - bloc_test 9.1.5 [bloc diff_match_patch meta mocktail test] - build_runner 2.4.6 [analyzer args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml] - camera_platform_interface 2.8.0 [cross_file flutter plugin_platform_interface stream_transform] - firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface] - flutter_gen_runner 5.3.2 [flutter_gen_core build collection crypto glob path] - flutter_lints 3.0.1 [lints] - flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service] - intl_utils 2.8.5 [analyzer archive args dart_style http intl path petitparser yaml] - network_image_mock 2.1.1 [flutter mockito] - video_player_platform_interface 6.2.1 [flutter plugin_platform_interface] transitive dependencies: - _fe_analyzer_shared 61.0.0 [meta] - _flutterfire_internals 1.3.35 [collection firebase_core firebase_core_platform_interface flutter meta] - analyzer 5.13.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.4.6 [crypto path pointycastle] - args 2.4.2 - async 2.11.0 [collection meta] - bloc 8.1.2 [meta] - boolean_selector 2.1.1 [source_span string_scanner] - build 2.3.1 [analyzer async convert crypto glob logging meta path] - build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml] - build_daemon 4.0.1 [built_collection built_value crypto http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.4.1 [analyzer async build collection convert crypto graphs logging package_config path pool pub_semver stream_transform yaml] - build_runner_core 7.2.7+1 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pool timing watcher yaml] - built_collection 5.1.1 - built_value 8.6.3 [built_collection collection fixnum meta] - 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] - camera_android 0.10.8+12 [camera_platform_interface flutter flutter_plugin_android_lifecycle stream_transform] - camera_avfoundation 0.9.13+6 [camera_platform_interface flutter stream_transform] - camera_web 0.3.2+3 [camera_platform_interface flutter flutter_web_plugins stream_transform] - characters 1.3.0 - charcode 1.3.1 - checked_yaml 2.0.3 [json_annotation source_span yaml] - cli_notify 0.0.4 [tint] - cli_util 0.3.5 [meta path] - clock 1.1.1 - cloud_firestore 4.16.0 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cloud_firestore_platform_interface 6.1.12 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 3.11.0 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins] - code_builder 4.7.0 [built_collection built_value collection matcher meta] - collection 1.18.0 - color 3.0.0 - connectivity_plus 6.0.1 [flutter flutter_web_plugins connectivity_plus_platform_interface web meta nm] - connectivity_plus_platform_interface 2.0.0 [flutter meta plugin_platform_interface] - console 4.1.0 [vector_math] - convert 3.1.1 [typed_data] - coverage 1.7.2 [args logging package_config path source_maps stack_trace vm_service] - cross_file 0.3.3+6 [js meta] - crypto 3.0.3 [typed_data] - csslib 0.17.3 [source_span] - dart_quill_delta 9.3.6 [collection diff_match_patch quiver] - dart_style 2.3.2 [analyzer args path pub_semver source_span] - dartx 1.2.0 [characters collection crypto meta path time] - date_format 2.0.7 - dbus 0.7.8 [args ffi meta xml] - device_info_plus 10.0.1 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta web win32 win32_registry] - device_info_plus_platform_interface 7.0.0 [flutter meta plugin_platform_interface] - diff_match_patch 0.4.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.2 [cross_file flutter http plugin_platform_interface] - file_selector_windows 0.9.3+1 [cross_file file_selector_platform_interface flutter] - firebase_auth 4.20.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_auth_platform_interface 7.3.0 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.12.0 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web] - firebase_core_web 2.17.1 [firebase_core_platform_interface flutter flutter_web_plugins meta web] - firebase_remote_config 4.4.0 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter] - firebase_remote_config_platform_interface 1.4.28 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_remote_config_web 1.6.0 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins] - firebase_storage 11.7.4 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - firebase_storage_platform_interface 5.1.19 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.9.4 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http meta web] - fixnum 1.1.0 - flutter_cache_manager 3.3.1 [clock collection file flutter http path path_provider rxdart sqflite uuid] - flutter_colorpicker 1.0.3 [flutter] - flutter_gen_core 5.3.2 [path yaml mime xml dartx color collection json_annotation glob dart_style args pub_semver] - flutter_inappwebview 6.0.0 [flutter flutter_inappwebview_platform_interface flutter_inappwebview_android flutter_inappwebview_ios flutter_inappwebview_macos flutter_inappwebview_web] - flutter_inappwebview_android 1.0.13 [flutter flutter_inappwebview_platform_interface] - flutter_inappwebview_internal_annotations 1.1.1 - flutter_inappwebview_ios 1.0.13 [flutter flutter_inappwebview_platform_interface] - flutter_inappwebview_macos 1.0.11 [flutter flutter_inappwebview_platform_interface] - flutter_inappwebview_platform_interface 1.0.10 [flutter flutter_inappwebview_internal_annotations plugin_platform_interface] - flutter_inappwebview_web 1.0.8 [flutter flutter_web_plugins js flutter_inappwebview_platform_interface] - flutter_keyboard_visibility 6.0.0 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_linux flutter_keyboard_visibility_macos flutter_keyboard_visibility_web flutter_keyboard_visibility_windows flutter] - flutter_keyboard_visibility_linux 1.0.0 [flutter_keyboard_visibility_platform_interface flutter] - flutter_keyboard_visibility_macos 1.0.0 [flutter_keyboard_visibility_platform_interface 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_keyboard_visibility_windows 1.0.0 [flutter_keyboard_visibility_platform_interface flutter] - flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math] - flutter_native_image 0.0.6+1 [flutter] - flutter_plugin_android_lifecycle 2.0.16 [flutter] - flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math] - frontend_server_client 3.2.0 [async path] - gal 2.3.0 [flutter] - gal_linux 0.1.0 [flutter gal path] - geocoding 3.0.0 [flutter geocoding_platform_interface geocoding_android geocoding_ios] - geocoding_android 3.3.0 [flutter geocoding_platform_interface] - geocoding_ios 3.0.1 [flutter geocoding_platform_interface] - geocoding_platform_interface 3.2.0 [flutter meta plugin_platform_interface] - glob 2.1.2 [async collection file path string_scanner] - google_fonts 6.1.0 [flutter http path_provider crypto] - google_identity_services_web 0.2.2 [js meta] - google_maps 7.1.0 [js js_wrapping meta web] - google_maps_flutter_ios 2.5.2 [flutter google_maps_flutter_platform_interface stream_transform] - google_maps_flutter_web 0.5.6+2 [collection flutter flutter_web_plugins google_maps google_maps_flutter_platform_interface sanitize_html stream_transform web] - google_sign_in 6.2.1 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - google_sign_in_android 6.1.20 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.7.5 [flutter google_sign_in_platform_interface] - google_sign_in_platform_interface 2.4.2 [flutter plugin_platform_interface quiver] - google_sign_in_web 0.12.1 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http js] - graphs 2.3.1 [collection] - hive 2.2.3 [meta crypto] - hive_flutter 1.1.0 [flutter hive path_provider path] - html 0.15.4 [csslib source_span] - html2md 1.3.1 [html collection] - http 1.2.1 [async http_parser meta web] - http_multi_server 3.2.1 [async] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - image_picker 1.1.1 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_linux image_picker_macos image_picker_platform_interface image_picker_windows] - image_picker_android 0.8.11 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - image_picker_for_web 3.0.4 [flutter flutter_web_plugins image_picker_platform_interface mime web] - image_picker_ios 0.8.10+1 [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.10.0 [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] - io 1.0.4 [meta path string_scanner] - irondash_engine_context 0.5.2 [flutter plugin_platform_interface] - irondash_message_channel 0.6.0 [flutter ffi] - js 0.6.7 [meta] - js_wrapping 0.7.4 [js] - json_annotation 4.8.1 [meta] - leak_tracker 10.0.0 [clock collection meta path vm_service] - leak_tracker_flutter_testing 2.0.1 [flutter leak_tracker leak_tracker_testing matcher meta] - leak_tracker_testing 2.0.1 [leak_tracker matcher meta] - lints 3.0.0 - list_counter 1.0.2 - location 6.0.1 [flutter location_platform_interface location_web] - location_platform_interface 4.0.0 [flutter plugin_platform_interface] - location_web 5.0.1 [flutter flutter_web_plugins http_parser js location_platform_interface] - logging 1.2.0 - markdown 7.2.2 [args meta] - matcher 0.12.16+1 [async meta stack_trace term_glyph test_api] - material_color_utilities 0.8.0 [collection] - meta 1.11.0 - mockito 5.4.2 [analyzer build code_builder collection dart_style matcher meta path source_gen test_api] - nested 1.0.0 [flutter] - nm 0.5.0 [dbus] - node_preamble 2.0.2 - octo_image 2.0.0 [flutter] - package_config 2.1.0 [path] - path 1.9.0 - path_parsing 1.0.1 [vector_math meta] - path_provider 2.1.3 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - path_provider_android 2.2.0 [flutter path_provider_platform_interface] - path_provider_foundation 2.3.2 [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] - permission_handler 11.3.1 [flutter meta permission_handler_android permission_handler_apple permission_handler_html permission_handler_windows permission_handler_platform_interface] - permission_handler_android 12.0.5 [flutter permission_handler_platform_interface] - permission_handler_apple 9.4.4 [flutter permission_handler_platform_interface] - permission_handler_html 0.1.1 [flutter flutter_web_plugins permission_handler_platform_interface] - permission_handler_platform_interface 4.2.1 [flutter meta plugin_platform_interface] - permission_handler_windows 0.2.1 [flutter permission_handler_platform_interface] - petitparser 5.4.0 [meta] - photo_view 0.14.0 [flutter] - pixel_snap 0.1.5 [flutter] - platform 3.1.3 - plugin_platform_interface 2.1.8 [meta] - pointycastle 3.7.3 [collection convert js] - pool 1.5.1 [async stack_trace] - process_run 0.12.5+3 [path collection charcode string_scanner yaml meta args pub_semver synchronized] - provider 6.0.5 [collection flutter nested] - pub_semver 2.1.4 [collection meta] - pubspec_parse 1.2.3 [checked_yaml collection json_annotation pub_semver yaml] - quiver 3.2.1 [matcher] - rxdart 0.27.7 - sanitize_html 2.1.0 [html meta] - sensors_plus 1.4.1 [flutter sensors_plus_web sensors_plus_platform_interface] - sensors_plus_platform_interface 1.1.3 [flutter meta plugin_platform_interface] - sensors_plus_web 1.1.2 [flutter sensors_plus_platform_interface flutter_web_plugins] - share_plus 9.0.0 [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 web win32] - share_plus_platform_interface 4.0.0 [cross_file flutter meta mime plugin_platform_interface path_provider uuid] - shared_preferences 2.2.3 [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.4.0 [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.1 [flutter flutter_web_plugins shared_preferences_platform_interface] - shared_preferences_windows 2.3.2 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.4.1 [async collection http_parser path stack_trace stream_channel] - shelf_packages_handler 3.0.2 [path shelf shelf_static] - shelf_static 1.1.2 [convert http_parser mime path shelf] - shelf_web_socket 1.0.4 [shelf stream_channel web_socket_channel] - simple_gesture_detector 0.2.0 [flutter] - sky_engine 0.0.99 - source_gen 1.4.0 [analyzer async build dart_style glob path source_span yaml] - source_map_stack_trace 2.1.1 [path source_maps stack_trace] - source_maps 0.10.12 [source_span] - 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 [synchronized path meta] - stack_trace 1.11.1 [path] - stream_channel 2.1.2 [async] - stream_transform 2.1.0 - string_scanner 1.2.0 [source_span] - super_clipboard 0.8.10 [flutter collection meta super_native_extensions] - super_native_extensions 0.8.10 [flutter flutter_web_plugins meta ffi collection path uuid irondash_engine_context irondash_message_channel device_info_plus pixel_snap web] - synchronized 3.1.0 - table_calendar 3.0.9 [flutter intl simple_gesture_detector] - term_glyph 1.2.1 - test 1.24.9 [analyzer async boolean_selector collection coverage http_multi_server io js matcher node_preamble package_config path pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel test_api test_core typed_data web_socket_channel webkit_inspection_protocol yaml] - test_api 0.6.1 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph] - test_core 0.5.9 [analyzer args async boolean_selector collection coverage frontend_server_client glob io meta package_config path pool source_map_stack_trace source_maps source_span stack_trace stream_channel test_api vm_service yaml] - time 2.1.3 [clock] - timing 1.0.1 [json_annotation] - tint 2.0.1 - typed_data 1.3.2 [collection] - universal_html 2.2.4 [async csslib charcode collection html meta source_span typed_data universal_io] - 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.0 [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.3.0 [flutter flutter_web_plugins url_launcher_platform_interface web] - url_launcher_windows 3.1.0 [flutter url_launcher_platform_interface] - uuid 4.1.0 [crypto sprintf] - vector_graphics 1.1.11+1 [flutter http vector_graphics_codec] - vector_graphics_codec 1.1.11+1 - vector_graphics_compiler 1.1.11+1 [args meta path_parsing xml vector_graphics_codec path] - vector_math 2.1.4 - video_compress 3.1.2 [flutter] - video_player 2.8.6 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web] - video_player_android 2.4.10 [flutter video_player_platform_interface] - video_player_avfoundation 2.5.7 [flutter video_player_platform_interface] - video_player_web 2.1.1 [flutter flutter_web_plugins video_player_platform_interface] - video_thumbnail 0.5.3 [flutter] - vm_service 13.0.0 - watcher 1.1.0 [async path] - web 0.5.1 - web_socket_channel 2.4.0 [async crypto stream_channel] - webkit_inspection_protocol 1.2.1 [logging] - win32 5.0.9 [ffi] - win32_registry 1.1.2 [ffi win32] - workmanager 0.5.2 [flutter] - xdg_directories 1.0.3 [meta path] - xml 6.3.0 [collection meta petitparser] - yaml 3.1.2 [collection source_span string_scanner] - youtube_player_flutter 9.0.1 [flutter flutter_inappwebview] ```

Additional context and comments

Here is how my rule looks like in my Cloud Storage

service firebase.storage {
  match /b/{bucket}/o {
    match /{uid}/{allPaths=**} {
      allow read, write: if request.auth.uid == uid;
    }
  }
}

and I can confirm that mediaPath matches format /{uid}/*

Lyokone commented 4 months ago

Closing in favor of https://github.com/firebase/flutterfire/issues/10353