Closed ChurikiTenna closed 4 months ago
@ChurikiTenna Thank you for reporting this issue. Please try to update your Firebase plugins to the latest version and try again.
@TarekkMA The same happens here. I'm using theses versions:
firebase_core: ^3.2.0 cloud_firestore: ^5.1.0
The misbehavior happened simply because I was trying to get too much documents in short amount of time. (around 200-300 total in a minute) I resolved it by improving the data-handling protocol to more efficient one.
It would be great if firestore could throw error like "too much requests in this amount of time" or such. And I wonder why this did not reproduce in mobile, but only on web.
Is there an existing issue for this?
Which plugins are affected?
Database
Which platforms are affected?
Web
Description
I am building web and mobile apps with the plugin. It works fine on mobile, however get() request for a CollectionReference seems to fail after several times.
For example, I need to show search result of names like this.
It works fine until first 1-3rd try, then it fails on 4~5th try. "fails" means it stumbles on the await status, and never move to the code written after (i.e.
print('result ${snap.length}');
), or it returns 0 QuerySnapshot documents. I have to wait for a few mins to be able to get() to work again.In addition, if I try getting more documents at once (like
limit(100)
), it does not work from the first time.It doesn't throw any errors on
catch
.Reproducing the issue
Call get() multiple times with short intervals.
var snap = await FirebaseFirestore.instance.collection("names").limit(24).get();
Firebase Core version
2.28.0
Flutter Version
3.22.1
Relevant Log Output
No response
Flutter dependencies
Expand
Flutter dependencies
snippet```yaml Dart SDK 3.4.1 Flutter SDK 3.22.1 juki_manuals 1.1.2+14 dependencies: - app_tracking_transparency 2.0.4 [flutter] - 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+4 [camera_android camera_avfoundation camera_platform_interface camera_web flutter flutter_plugin_android_lifecycle quiver] - chewie 1.7.1 [cupertino_icons flutter provider video_player wakelock_plus] - cloud_firestore 4.16.0 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - crypto 3.0.3 [typed_data] - csv 5.0.2 - cupertino_icons 1.0.6 - fcm_config 3.5.2 [flutter firebase_core firebase_messaging flutter_local_notifications http path_provider] - file_picker 5.5.0 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32] - firebase_auth 4.19.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.28.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_dynamic_links 5.5.0 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_messaging 14.8.0 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_storage 11.7.0 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - fl_chart 0.68.0 [equatable flutter] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_app_badger 1.5.0 [flutter] - flutter_launcher_icons 0.13.1 [args checked_yaml cli_util image json_annotation path yaml] - flutter_localization 0.2.0 [flutter flutter_web_plugins flutter_localizations plugin_platform_interface shared_preferences] - flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math] - font_awesome_flutter 10.5.0 [flutter] - google_fonts 6.1.0 [flutter http path_provider crypto] - google_sign_in 6.1.5 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - html 0.15.4 [csslib source_span] - http 1.1.0 [async http_parser meta] - image_picker 1.0.4 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_linux image_picker_macos image_picker_platform_interface image_picker_windows] - in_app_review 2.0.6 [flutter in_app_review_platform_interface] - intl 0.19.0 [clock meta path] - keyboard_actions 4.2.0 [flutter] - loading_animation_widget 1.2.0+4 [flutter] - package_info_plus 4.1.0 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface win32] - page_transition 2.1.0 [flutter] - path_provider 2.1.1 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - pdf 3.10.4 [archive barcode bidi crypto image meta path_parsing vector_math xml] - permission_handler 11.0.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface] - printing 5.12.0 [ffi flutter flutter_web_plugins http image js meta pdf pdf_widget_wrapper plugin_platform_interface] - 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] - 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] - sign_in_with_apple 5.0.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web] - universal_io 2.2.2 [collection meta typed_data] - url_launcher 6.1.14 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] - video_player 2.7.2 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web] - video_thumbnail 0.5.3 [flutter] dev dependencies: - flutter_lints 2.0.3 [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] transitive dependencies: - _fe_analyzer_shared 61.0.0 [meta] - _flutterfire_internals 1.3.28 [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.3 [crypto path pointycastle] - args 2.4.2 - async 2.11.0 [collection meta] - barcode 2.2.4 [meta qr] - bidi 2.0.10 - 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] - camera_android 0.10.8+12 [camera_platform_interface flutter flutter_plugin_android_lifecycle stream_transform] - camera_avfoundation 0.9.13+5 [camera_platform_interface flutter stream_transform] - camera_platform_interface 2.5.2 [cross_file flutter plugin_platform_interface stream_transform] - camera_web 0.3.2+2 [camera_platform_interface flutter flutter_web_plugins stream_transform] - characters 1.3.0 - checked_yaml 2.0.3 [json_annotation source_span yaml] - cli_util 0.4.0 [meta path] - clock 1.1.1 - 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] - collection 1.18.0 - convert 3.1.1 [typed_data] - cross_file 0.3.3+5 [js meta] - csslib 1.0.0 [source_span] - dbus 0.7.8 [args ffi meta xml] - equatable 2.0.5 [collection meta] - fake_async 1.3.1 [clock collection] - ffi 2.1.0 - file 6.1.4 [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_auth_platform_interface 7.2.1 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.11.0 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web] - firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.14.0 [firebase_core_platform_interface flutter flutter_web_plugins meta web] - firebase_dynamic_links_platform_interface 0.2.6+28 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.5.30 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.8.0 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins meta web] - firebase_storage_platform_interface 5.1.15 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.9.0 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http meta web] - flutter_cache_manager 3.3.1 [clock collection file flutter http path path_provider rxdart sqflite uuid] - flutter_local_notifications 14.1.3+1 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone] - flutter_local_notifications_linux 4.0.0+1 [dbus ffi flutter flutter_local_notifications_platform_interface path xdg_directories] - flutter_local_notifications_platform_interface 7.0.0+1 [flutter plugin_platform_interface] - flutter_plugin_android_lifecycle 2.0.16 [flutter] - flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math] - glob 2.1.2 [async collection file path string_scanner] - google_identity_services_web 0.2.1+1 [js meta] - google_sign_in_android 6.1.20 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.6.4 [flutter google_sign_in_platform_interface pigeon] - google_sign_in_platform_interface 2.4.2 [flutter plugin_platform_interface quiver] - google_sign_in_web 0.12.0+4 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http js] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - image 4.1.3 [archive meta xml] - image_picker_android 0.8.8+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.8+2 [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] - in_app_review_platform_interface 2.0.4 [flutter url_launcher plugin_platform_interface platform] - js 0.6.7 [meta] - json_annotation 4.8.1 [meta] - leak_tracker 10.0.4 [clock collection meta path vm_service] - leak_tracker_flutter_testing 3.0.3 [flutter leak_tracker leak_tracker_testing matcher meta] - leak_tracker_testing 3.0.1 [leak_tracker matcher meta] - lints 2.1.1 - matcher 0.12.16+1 [async meta stack_trace term_glyph test_api] - material_color_utilities 0.8.0 [collection] - meta 1.12.0 - mime 1.0.4 - nested 1.0.0 [flutter] - octo_image 2.0.0 [flutter] - package_config 2.1.0 [path] - package_info_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - path 1.9.0 - path_parsing 1.0.1 [vector_math meta] - path_provider_android 2.2.0 [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] - pdf_widget_wrapper 1.0.4 [flutter pdf] - permission_handler_android 11.0.5 [flutter permission_handler_platform_interface] - permission_handler_apple 9.1.4 [flutter permission_handler_platform_interface] - permission_handler_platform_interface 3.11.5 [flutter meta plugin_platform_interface] - permission_handler_windows 0.1.3 [flutter permission_handler_platform_interface] - petitparser 5.4.0 [meta] - pigeon 11.0.1 [analyzer args collection meta path yaml] - platform 3.1.2 - plugin_platform_interface 2.1.8 [meta] - pointycastle 3.7.3 [collection convert js] - provider 6.0.5 [collection flutter nested] - pub_semver 2.1.4 [collection meta] - qr 3.0.1 [meta] - quiver 3.2.1 [matcher] - rxdart 0.27.7 - share_plus_platform_interface 4.0.0 [cross_file flutter meta mime plugin_platform_interface path_provider uuid] - 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.1 [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.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - sign_in_with_apple_platform_interface 1.0.0 [flutter plugin_platform_interface meta] - sign_in_with_apple_web 1.0.1 [flutter flutter_web_plugins sign_in_with_apple_platform_interface js] - sky_engine 0.0.99 - source_span 1.10.0 [collection path term_glyph] - 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] - synchronized 3.1.0 - term_glyph 1.2.1 - test_api 0.7.0 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph] - timezone 0.9.2 [path] - typed_data 1.3.2 [collection] - url_launcher_android 6.1.0 [flutter url_launcher_platform_interface] - url_launcher_ios 6.1.5 [flutter url_launcher_platform_interface] - url_launcher_linux 3.0.6 [flutter url_launcher_platform_interface] - url_launcher_macos 3.0.7 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.1.5 [flutter plugin_platform_interface] - url_launcher_web 2.0.19 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.8 [flutter url_launcher_platform_interface] - uuid 3.0.7 [crypto] - vector_math 2.1.4 - video_player_android 2.4.10 [flutter video_player_platform_interface] - video_player_avfoundation 2.4.11 [flutter video_player_platform_interface] - video_player_platform_interface 6.2.1 [flutter plugin_platform_interface] - video_player_web 2.0.17 [flutter flutter_web_plugins video_player_platform_interface] - vm_service 14.2.1 - wakelock_plus 1.1.1 [flutter flutter_web_plugins meta wakelock_plus_platform_interface win32 dbus package_info_plus js] - wakelock_plus_platform_interface 1.1.0 [flutter plugin_platform_interface meta] - watcher 1.1.0 [async path] - web 0.5.1 - win32 5.0.9 [ffi] - xdg_directories 1.0.3 [meta path] - xml 6.3.0 [collection meta petitparser] - yaml 3.1.2 [collection source_span string_scanner] ```
Additional context and comments
No response