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

My console gets spammed with Firestore Debug messages on IOS #10609

Closed timurbutt5053 closed 1 year ago

timurbutt5053 commented 1 year ago

Bug report

Describe the bug My console always gets spammed with Firestore messages logging EVERYTHING, making it impossible to debug. Here is an example Message: 10.3.0 - [FirebaseFirestore][I-FST000001] WatchStream (10df86d38) headers (allowlisted): date: Wed, 15 Mar 2023 22:07:37 GMT.

Steps to reproduce

Steps to reproduce the behavior:

The problem was suddenly there, and I can't remember doing anything that caused the issue.

What I tried so far

In my AppDelegate.swift file, I tested the lines

Firestore.enableLogging(false)
FirebaseConfiguration.shared.setLoggerLevel(.min)

both of them didn't work. I also edited the Scheme of the xcodeworkspace and added the Argument -FIRDebugDisabled, cleaned the project etc and started it again. Didn't work.

I also went back to a commit that didn't have the problem, but it was still there. So it has anything to do with my Mac I suppose.


Flutter doctor

Click To Expand ``` [✓] Flutter (Channel stable, 3.7.3, on macOS 13.1 22C65 darwin-arm64, locale en-DE) [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, please use `flutter config --android-sdk` to update to that location. [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [!] Android Studio (not installed) [✓] VS Code (version 1.76.2) [✓] Connected device (3 available) [✓] HTTP Host Availability ```

Flutter dependencies

Click To Expand ``` Dart SDK 2.19.2 Flutter SDK 3.7.3 zaap 0.0.3+22 dependencies: - apple_maps_flutter 1.2.1 [flutter] - badges 3.0.2 [flutter] - camera 0.10.3+2 [camera_android camera_avfoundation camera_platform_interface camera_web flutter flutter_plugin_android_lifecycle quiver] - clear_all_notifications 0.0.3 [flutter] - cloud_firestore 4.4.3 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cloud_functions 4.0.11 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter] - country_codes 2.2.0 [flutter] - cupertino_icons 1.0.5 - curved_gradient 0.2.2 [flutter] - custom_refresh_indicator 2.0.1 [flutter] - event_listener 0.2.0 - firebase_analytics 10.1.4 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_app_check 0.1.1+12 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 4.2.9 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_cached_image 0.4.2 [firebase_core firebase_storage flutter path path_provider sqflite uuid] - firebase_core 2.7.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_dynamic_links 5.0.15 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_messaging 14.2.5 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_remote_config 3.0.13 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter] - firebase_storage 11.0.14 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - flutter 0.0.0 [characters collection js material_color_utilities meta vector_math sky_engine] - flutter_animate 4.1.0 [flutter] - flutter_contacts 1.1.6 [flutter] - flutter_image_compress 1.1.3 [flutter] - flutter_keyboard_visibility 5.4.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_launcher_icons 0.10.0 [args checked_yaml cli_util image json_annotation path yaml] - flutter_localizations 0.0.0 [flutter intl characters clock collection js material_color_utilities meta path vector_math] - flutter_map 3.1.0 [async collection flutter http latlong2 meta polylabel positioned_tap_detector_2 proj4dart tuple vector_math] - flutter_native_splash 2.2.16 [args flutter flutter_web_plugins js html image meta path universal_io xml yaml] - flutter_processing 0.2.0 [flutter fast_noise image path] - flutter_riverpod 2.3.0 [collection flutter meta riverpod state_notifier] - font_awesome_flutter 10.4.0 [flutter] - geocoding 2.0.5 [flutter geocoding_platform_interface] - geolocator 9.0.2 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows] - get 4.6.5 [flutter] - http 0.13.5 [async http_parser meta path] - i18n_extension 5.0.1 [sprintf args analyzer gettext_parser equatable intl flutter] - icon_shadow 1.0.1 [flutter meta] - image_cropper 3.0.1 [flutter image_cropper_platform_interface image_cropper_for_web] - image_picker 0.8.6+4 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface] - image_size_getter 2.1.2 [collection hashcodes] - linked_scroll_controller 0.2.0 [flutter] - local_auth 2.1.6 [flutter local_auth_android local_auth_ios local_auth_platform_interface local_auth_windows] - marquee 2.2.3 [fading_edge_scrollview flutter] - mobile_scanner 2.1.0 [flutter flutter_web_plugins js] - overlay_support 2.1.0 [flutter async] - package_info_plus 3.0.3 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface win32] - parallax_rain 1.1.0 [flutter] - path_provider 2.0.13 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - permission_handler 10.2.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface] - pinput 2.2.31 [flutter smart_auth universal_platform] - privacy_screen 0.0.6 [flutter plugin_platform_interface] - provider 6.0.5 [collection flutter nested] - pull_to_refresh 2.0.0 [flutter] - qr_flutter 4.1.0 [flutter qr] - share_extend 2.0.0 [meta flutter] - shared_preferences 2.0.18 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - shimmer 2.0.0 [flutter] - sliding_up_panel 2.0.0+1 [flutter] - tflite_flutter 0.9.2 [flutter path quiver ffi] - tflite_flutter_helper 0.3.1 [flutter meta quiver path_provider tflite_flutter tuple camera ffi image] - url_launcher 6.1.10 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] - uuid 3.0.7 [crypto] - video_player 2.6.0 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web] dev dependencies: - flutter_lints 2.0.1 [lints] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection js matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] dependency overrides: - intl 0.18.0 [clock meta path] transitive dependencies: - _fe_analyzer_shared 47.0.0 [meta] - _flutterfire_internals 1.0.16 [collection firebase_core firebase_core_platform_interface flutter meta] - analyzer 4.7.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.3.6 [crypto path pointycastle] - args 2.4.0 - async 2.10.0 [collection meta] - boolean_selector 2.1.1 [source_span string_scanner] - camera_android 0.10.4+1 [camera_platform_interface flutter flutter_plugin_android_lifecycle stream_transform] - camera_avfoundation 0.9.12 [camera_platform_interface flutter stream_transform] - camera_platform_interface 2.4.1 [cross_file flutter plugin_platform_interface stream_transform] - camera_web 0.3.1+2 [camera_platform_interface flutter flutter_web_plugins stream_transform] - characters 1.2.1 - checked_yaml 2.0.2 [json_annotation source_span yaml] - cli_util 0.3.5 [meta path] - clock 1.1.1 - cloud_firestore_platform_interface 5.11.3 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 3.3.3 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - cloud_functions_platform_interface 5.1.30 [firebase_core flutter meta plugin_platform_interface] - cloud_functions_web 4.3.19 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - collection 1.17.0 - convert 3.1.1 [typed_data] - cross_file 0.3.3+4 [js meta] - crypto 3.0.2 [typed_data] - csslib 0.17.2 [source_span] - equatable 2.0.5 [collection meta] - fading_edge_scrollview 3.0.0 [flutter] - fake_async 1.3.1 [clock collection] - fast_noise 1.0.1 [fixnum] - ffi 2.0.1 - file 6.1.4 [meta path] - firebase_analytics_platform_interface 3.3.21 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.5.1+12 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_app_check_platform_interface 0.0.5+15 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_app_check_web 0.0.7+15 [_flutterfire_internals firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 6.11.11 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.2.8 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.5.3 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.2.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_dynamic_links_platform_interface 0.2.3+30 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.2.14 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.2.15 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_remote_config_platform_interface 1.1.33 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_remote_config_web 1.1.22 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js] - firebase_storage_platform_interface 4.1.30 [collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.3.23 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta] - fixnum 1.1.0 - 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_plugin_android_lifecycle 2.0.9 [flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - geocoding_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - geolocator_android 4.1.7 [flutter geolocator_platform_interface] - geolocator_apple 2.2.5 [flutter geolocator_platform_interface] - geolocator_platform_interface 4.0.7 [flutter plugin_platform_interface vector_math meta] - geolocator_web 2.1.6 [flutter flutter_web_plugins geolocator_platform_interface] - geolocator_windows 0.1.1 [flutter geolocator_platform_interface] - gettext_parser 0.2.0 - glob 2.1.1 [async collection file path string_scanner] - hashcodes 2.0.0 - html 0.15.2 [csslib source_span] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - image 3.3.0 [archive meta xml] - image_cropper_for_web 1.0.3 [flutter flutter_web_plugins image_cropper_platform_interface js] - image_cropper_platform_interface 3.0.3 [flutter plugin_platform_interface http] - image_picker_android 0.8.5+9 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - image_picker_for_web 2.1.11 [flutter flutter_web_plugins image_picker_platform_interface] - image_picker_ios 0.8.7 [flutter image_picker_platform_interface] - image_picker_platform_interface 2.6.3 [cross_file flutter http plugin_platform_interface] - js 0.6.5 [meta] - json_annotation 4.8.0 [meta] - latlong2 0.8.1 [intl] - lints 2.0.1 - lists 1.0.1 [meta] - local_auth_android 1.0.20 [flutter flutter_plugin_android_lifecycle intl local_auth_platform_interface] - local_auth_ios 1.1.0 [flutter intl local_auth_platform_interface] - local_auth_platform_interface 1.0.7 [flutter plugin_platform_interface] - local_auth_windows 1.0.6 [flutter local_auth_platform_interface] - matcher 0.12.13 [meta stack_trace] - material_color_utilities 0.2.0 - meta 1.8.0 - mgrs_dart 2.0.0 [unicode] - nested 1.0.0 [flutter] - package_config 2.1.0 [path] - package_info_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - path 1.8.2 - path_provider_android 2.0.23 [flutter path_provider_platform_interface] - path_provider_foundation 2.1.2 [flutter path_provider_platform_interface] - path_provider_linux 2.1.9 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_platform_interface 2.0.6 [flutter platform plugin_platform_interface] - path_provider_windows 2.1.4 [ffi flutter path path_provider_platform_interface win32] - permission_handler_android 10.2.0 [flutter permission_handler_platform_interface] - permission_handler_apple 9.0.7 [flutter permission_handler_platform_interface] - permission_handler_platform_interface 3.9.0 [flutter meta plugin_platform_interface] - permission_handler_windows 0.1.2 [flutter permission_handler_platform_interface] - petitparser 5.1.0 [meta] - platform 3.1.0 - plugin_platform_interface 2.1.4 [meta] - pointycastle 3.6.2 [collection convert js] - polylabel 1.0.1 [collection] - positioned_tap_detector_2 1.0.4 [flutter] - process 4.2.4 [file path platform] - proj4dart 2.1.0 [mgrs_dart wkt_parser meta] - pub_semver 2.1.3 [collection meta] - qr 3.0.1 [meta] - quiver 3.2.1 [matcher] - riverpod 2.3.0 [collection meta stack_trace state_notifier] - shared_preferences_android 2.0.16 [flutter shared_preferences_platform_interface] - shared_preferences_foundation 2.1.4 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.1.4 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_platform_interface 2.1.1 [flutter plugin_platform_interface] - shared_preferences_web 2.0.5 [flutter flutter_web_plugins shared_preferences_platform_interface] - shared_preferences_windows 2.1.4 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - sky_engine 0.0.99 - smart_auth 1.0.8 [flutter flutter_web_plugins] - source_span 1.9.1 [collection path term_glyph] - sprintf 6.0.2 - sqflite 2.2.5 [flutter sqflite_common path] - sqflite_common 2.4.2+2 [synchronized path meta] - stack_trace 1.11.0 [path] - state_notifier 0.7.2+1 [meta] - stream_channel 2.1.1 [async] - stream_transform 2.1.0 - string_scanner 1.2.0 [source_span] - synchronized 3.0.1 - term_glyph 1.2.1 - test_api 0.4.16 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - tuple 2.0.1 - typed_data 1.3.1 [collection] - unicode 0.3.1 [lists] - universal_io 2.2.0 [collection meta typed_data] - universal_platform 1.0.0+1 - url_launcher_android 6.0.25 [flutter url_launcher_platform_interface] - url_launcher_ios 6.1.2 [flutter url_launcher_platform_interface] - url_launcher_linux 3.0.4 [flutter url_launcher_platform_interface] - url_launcher_macos 3.0.4 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.1.2 [flutter plugin_platform_interface] - url_launcher_web 2.0.16 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.5 [flutter url_launcher_platform_interface] - vector_math 2.1.4 - video_player_android 2.3.11 [flutter video_player_platform_interface] - video_player_avfoundation 2.4.0 [flutter video_player_platform_interface] - video_player_platform_interface 6.0.2 [flutter plugin_platform_interface] - video_player_web 2.0.14 [flutter flutter_web_plugins video_player_platform_interface] - watcher 1.0.2 [async path] - win32 3.1.3 [ffi] - wkt_parser 2.0.0 - xdg_directories 1.0.0 [meta path process] - xml 6.2.2 [collection meta petitparser] - yaml 3.1.1 [collection source_span string_scanner] ```

darshankawar commented 1 year ago

@timurbutt5053 I am unable to replicate this behavior using the cloud_firestore plugin example running on iOS. If you have specifics / concrete steps to replicate, please provide the same to make this issue actionable.

Do you get any error or they are just warnings ?

timurbutt5053 commented 1 year ago

@timurbutt5053 I am unable to replicate this behavior using the cloud_firestore plugin example running on iOS. If you have specifics / concrete steps to replicate, please provide the same to make this issue actionable.

Do you get any error or they are just warnings ?

There are no warnings and errors whatsoever. There are only messages documenting each single step what the firestore does. I don't have a single Idea how to replicate this. My friend who is working on the same project doesn't have the problem either.

finn-olekahl commented 1 year ago

I have the same problem. When debugging with my iPhone I'm getting the same messages as mentioned by @timurbutt5053. Because of this it's really hard to debug my code. Is there a fix?

darshankawar commented 1 year ago

@timurbutt5053 @dereinefinn I am assuming this is happening on your current existing / working project, so in order to narrow it down to only cloud_firestore plugin related issue, is there a way for you to trim down or just create a barebone project with only required ff plugins like core and cloud_firestore and run to see if you still get the same behavior or not ?

finn-olekahl commented 1 year ago

I solved the problem with the help of this issue: https://github.com/firebase/firebase-ios-sdk/issues/2774

So it's indeed a problem with Firebase/Firestore on iOS. Sometimes I need to test things on our production backend. Because we use Appcheck, I need a debug token to do so. So I get my tokens with the help of this guide: https://firebase.google.com/docs/app-check/flutter/debug-provider

The problem is that the mentioned flag -FIRDebugEnabled now enables these spammy debug logs from firestore since one of the last updates.

google-oss-bot commented 1 year ago

Hey @timurbutt5053. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 1 year ago

Since there haven't been any recent updates here, I am going to close this issue.

@timurbutt5053 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.