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

🐛 [cloud_firestore] Deleted documents remain in firestore cache #9564

Closed DSMan97 closed 2 years ago

DSMan97 commented 2 years ago

Bug report

Bug Description When querying the database I get snapshots of documents that was deleted.

Steps to reproduce

Steps to reproduce the behavior:

  1. Using One plus 10 pro 5g with Android 12
  2. Using App getting data, unistall app
  3. Whe compile and install again the firestore lib get the OLD cached files hosted in data/data/package.name (is like when unistall is not deleting the data app)
  4. That means that the unistall process in One plus 10 pro 5g is not working properly or firestore not working properly in that models.

Expected behavior

I don't expect deleted documents to appear in the app, I can't tell if this is a firestore cache issue or android system issue on One plus 10 pro 5g , unistall the installed app and then run it again, the deleted documents still appear in the snapshots. But if you clear cache and data from the app before unistall the app, firestore works okey. So i don't know if the problem is in firestore or One plus 10 pro 5 or both. If firebase team can checked just to avoid happends again.

Additional context

As you can see the app can read a query with id that not exists.

Console Log

Firestore Screenshoot


Flutter doctor

Click To Expand ``` Microsoft Windows [Versión 10.0.19044.2006] (c) Microsoft Corporation. Todos los derechos reservados. C:\Users\barra\StudioProjects\freakit>flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.0.4, on Microsoft Windows [Versi¢n 10.0.19044.2006], locale es-ES) [!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) X cmdline-tools component is missing Run `path/to/sdkmanager --install "cmdline-tools;latest"` See https://developer.android.com/studio/command-line for more details. X Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/windows#android-setup for more details. [√] Chrome - develop for the web [X] Visual Studio - develop for Windows X Visual Studio not installed; this is necessary for Windows development. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components [√] Android Studio (version 2021.1) [√] VS Code (version 1.68.0) [√] Connected device (4 available) [√] HTTP Host Availability ! Doctor found issues in 2 categories. ```

Flutter dependencies

Click To Expand ``` Dart SDK 2.17.5 Flutter SDK 3.0.4 project_name 1.0.0+1 dependencies: - animate_do 2.1.0 [flutter] - another_xlider 1.1.2 [flutter] - badges 2.0.3 [flutter] - cloud_firestore 3.4.8 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cupertino_icons 1.0.5 - device_info_plus 3.2.4 [flutter device_info_plus_platform_interface device_info_plus_macos device_info_plus_linux device_info_plus_web device_info_plus_windows] - diffutil_dart 3.0.0 - equatable 2.0.3 [collection meta] - ffi 1.2.1 - file_picker 4.6.1 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32] - firebase_analytics 9.3.0 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 3.5.1 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 1.20.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 2.8.6 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_messaging 13.0.1 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_storage 10.3.3 [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 sky_engine] - flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid] - flutter_linkify 5.0.2 [flutter linkify] - flutter_local_notifications 9.8.0 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone] - flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math] - flutter_native_splash 2.2.6 [args flutter flutter_web_plugins image js lint meta path universal_io xml yaml] - flutter_parsed_text 2.2.1 [flutter] - fluttertoast 8.0.9 [flutter flutter_web_plugins] - footer 0.0.4 [flutter] - geolocator 9.0.1 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows] - google_api_availability 3.0.1 [flutter meta] - google_sign_in 5.4.0 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - hive 2.2.3 [meta crypto] - hive_flutter 1.1.0 [flutter hive path_provider path] - html 0.15.0 [csslib source_span] - icon_badge 1.0.0 [flutter] - image_picker 0.8.5+3 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface] - intl 0.17.0 [clock path] - json_annotation 4.6.0 [meta] - latlng 0.2.0 - location 4.4.0 [flutter location_platform_interface location_web] - mime 1.0.2 - oktoast 3.2.0 [flutter] - open_file 3.2.1 [flutter ffi] - percent_indicator 4.2.2 [flutter] - permission_handler 10.0.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface] - photo_view 0.14.0 [flutter] - shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - slide_to_confirm 1.1.0 [flutter] - sliver_tools 0.2.7 [flutter] - step_progress_indicator 1.0.2 [flutter] - swipe_cards 1.0.0 [flutter] - timer_count_down 2.2.1 [flutter] - url_launcher 6.1.5 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] - vibration 1.7.4 [flutter vibration_web] - visibility_detector 0.3.3 [flutter] dev dependencies: - flutter_launcher_icons 0.9.3 [args image path yaml] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] - hive_generator 1.1.3 [build source_gen hive analyzer source_helper] transitive dependencies: - _fe_analyzer_shared 42.0.0 [meta] - analyzer 4.3.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.3.1 [crypto path] - args 2.3.1 - async 2.8.2 [collection meta] - boolean_selector 2.1.0 [source_span string_scanner] - build 2.3.0 [analyzer async convert crypto glob logging meta path] - characters 1.2.0 - charcode 1.3.1 - clock 1.1.0 - cloud_firestore_platform_interface 5.7.4 [collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 2.8.7 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - collection 1.16.0 - convert 3.0.2 [typed_data] - cross_file 0.3.3+1 [js meta] - crypto 3.0.2 [typed_data] - csslib 0.17.2 [source_span] - dart_style 2.2.3 [analyzer args path pub_semver source_span] - dbus 0.7.4 [args ffi meta xml] - device_info_plus_linux 2.1.1 [device_info_plus_platform_interface file flutter meta] - device_info_plus_macos 2.2.3 [device_info_plus_platform_interface flutter] - device_info_plus_platform_interface 2.3.0+1 [flutter meta plugin_platform_interface] - device_info_plus_web 2.1.0 [device_info_plus_platform_interface flutter_web_plugins flutter] - device_info_plus_windows 2.1.1 [device_info_plus_platform_interface ffi flutter win32] - fake_async 1.3.0 [clock collection] - file 6.1.2 [meta path] - firebase_analytics_platform_interface 3.3.0 [firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.4.2 [firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 6.4.0 [collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 4.1.1 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.5.1 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 1.7.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.2.12 [collection firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.1.4 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.1.4 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_storage_platform_interface 4.1.12 [collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.3.1 [async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta] - flutter_local_notifications_linux 0.5.0+1 [flutter flutter_local_notifications_platform_interface dbus path xdg_directories] - flutter_local_notifications_platform_interface 5.0.0 [flutter plugin_platform_interface] - flutter_plugin_android_lifecycle 2.0.7 [flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - geolocator_android 4.0.2 [flutter geolocator_platform_interface] - geolocator_apple 2.2.1 [flutter geolocator_platform_interface] - geolocator_platform_interface 4.0.6 [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] - glob 2.1.0 [async collection file path string_scanner] - google_sign_in_android 6.0.1 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.4.0 [flutter google_sign_in_platform_interface] - google_sign_in_platform_interface 2.2.0 [flutter quiver] - google_sign_in_web 0.10.2 [flutter flutter_web_plugins google_sign_in_platform_interface js] - http 0.13.4 [async http_parser meta path] - http_parser 4.0.1 [collection source_span string_scanner typed_data] - image 3.2.0 [archive meta xml] - image_picker_android 0.8.5+1 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - image_picker_for_web 2.1.8 [flutter flutter_web_plugins image_picker_platform_interface] - image_picker_ios 0.8.5+6 [flutter image_picker_platform_interface] - image_picker_platform_interface 2.5.0 [cross_file flutter http plugin_platform_interface] - js 0.6.4 - linkify 4.1.0 - lint 1.8.2 - location_platform_interface 2.3.0 [flutter meta plugin_platform_interface] - location_web 3.1.1 [flutter flutter_web_plugins http_parser js location_platform_interface meta] - logging 1.0.2 - matcher 0.12.11 [stack_trace] - material_color_utilities 0.1.4 - meta 1.7.0 - package_config 2.1.0 [path] - path 1.8.1 - path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows] - path_provider_android 2.0.16 [flutter path_provider_platform_interface] - path_provider_ios 2.0.10 [flutter path_provider_platform_interface] - path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_macos 2.0.6 [flutter path_provider_platform_interface] - path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface] - path_provider_windows 2.0.7 [ffi flutter path path_provider_platform_interface win32] - pedantic 1.11.1 - permission_handler_android 10.0.0 [flutter permission_handler_platform_interface] - permission_handler_apple 9.0.4 [flutter permission_handler_platform_interface] - permission_handler_platform_interface 3.7.0 [flutter meta plugin_platform_interface] - permission_handler_windows 0.1.0 [flutter permission_handler_platform_interface] - petitparser 5.0.0 [meta] - platform 3.1.0 - plugin_platform_interface 2.1.2 [meta] - process 4.2.4 [file path platform] - pub_semver 2.1.1 [collection meta] - quiver 3.1.0 [matcher] - rxdart 0.27.5 - shared_preferences_android 2.0.12 [flutter shared_preferences_platform_interface] - shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface] - shared_preferences_platform_interface 2.0.0 [flutter] - shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface] - shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - sky_engine 0.0.99 - source_gen 1.2.2 [analyzer async build dart_style glob meta path source_span yaml] - source_helper 1.3.2 [analyzer collection source_gen] - source_span 1.8.2 [collection path term_glyph] - sqflite 2.0.3 [flutter sqflite_common path] - sqflite_common 2.2.1+1 [synchronized path meta] - stack_trace 1.10.0 [path] - stream_channel 2.1.0 [async] - string_scanner 1.1.0 [charcode source_span] - synchronized 3.0.0+2 - term_glyph 1.2.0 - test_api 0.4.9 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - timezone 0.8.0 [path] - typed_data 1.3.1 [collection] - universal_io 2.0.4 [collection crypto meta typed_data] - url_launcher_android 6.0.17 [flutter url_launcher_platform_interface] - url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface] - url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface] - url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.1.0 [flutter plugin_platform_interface] - url_launcher_web 2.0.12 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface] - uuid 3.0.6 [crypto] - vector_math 2.1.2 - vibration_web 1.6.3 [flutter flutter_web_plugins] - watcher 1.0.1 [async path] - win32 2.6.1 [ffi] - xdg_directories 0.2.0+1 [meta path process] - xml 6.1.0 [collection meta petitparser] - yaml 3.1.1 [collection source_span string_scanner] ```

darshankawar commented 2 years ago

Thanks for the report @DSMan97. Are you able to consistently replicate this behavior ? If so, can you provide a complete minimal code sample with steps to replicate ? Also, please check this SO link and this and see if it helps.

DSMan97 commented 2 years ago

Thats happend whe you compile the app after unistalling from android app settings (android system) I print the files located in /data/user/0/com.packageapp

INFO: First use after install App
I/flutter (16669): INFO: List of Data in /data/user/0/com.packageapp
I/flutter (16669): INFO: 2022-09-20 19:33:59.696541: /data/user/0/com.packageapp/cache
I/flutter (16669): INFO: 2022-09-20 19:33:59.699418: /data/user/0/com.packageapp/files
I/flutter (16669): INFO: 2022-09-20 19:33:59.699514: /data/user/0/com.packageapp/files/libCachedImageData.db-journal
I/flutter (16669): INFO: 2022-09-20 19:33:59.699759: /data/user/0/com.packageapp/files/PersistedInstallation.W0RFRkFVTFRd+MTo4ODU2MjY0MjAzNzY6YW5kcm9pZDoyOWY1MmRkNTgwZGFhY2NiNjQ2NGVk.json
I/flutter (16669): INFO: 2022-09-20 19:33:59.699848: /data/user/0/com.packageapp/files/libCachedImageData.db
I/flutter (16669): INFO: 2022-09-20 19:33:59.699916: /data/user/0/com.packageapp/files/generatefid.lock
I/flutter (16669): INFO: 2022-09-20 19:33:59.699993: /data/user/0/com.packageapp/files/.com.google.firebase.crashlytics.files.v2:com.packageapp
I/flutter (16669): INFO: 2022-09-20 19:33:59.700057: /data/user/0/com.packageapp/files/.com.google.firebase.crashlytics.files.v2:com.packageapp/com.crashlytics.settings.json
I/flutter (16669): INFO: 2022-09-20 19:33:59.700125: /data/user/0/com.packageapp/files/.com.google.firebase.crashlytics.files.v2:com.packageapp/native-reports
I/flutter (16669): INFO: 2022-09-20 19:33:59.700181: /data/user/0/com.packageapp/files/.com.google.firebase.crashlytics.files.v2:com.packageapp/priority-reports
I/flutter (16669): INFO: 2022-09-20 19:33:59.700246: /data/user/0/com.packageapp/files/.com.google.firebase.crashlytics.files.v2:com.packageapp/reports
I/flutter (16669): INFO: 2022-09-20 19:33:59.700330: /data/user/0/com.packageapp/files/.com.google.firebase.crashlytics.files.v2:com.packageapp/open-sessions
I/flutter (16669): INFO: 2022-09-20 19:33:59.700386: /data/user/0/com.packageapp/files/.com.google.firebase.crashlytics.files.v2:com.packageapp/open-sessions/6329F98402CB0001411DEBECADC5B9BC
I/flutter (16669): INFO: 2022-09-20 19:33:59.700452: /data/user/0/com.packageapp/files/.com.google.firebase.crashlytics.files.v2:com.packageapp/open-sessions/6329F98402CB0001411DEBECADC5B9BC/report
I/flutter (16669): INFO: 2022-09-20 19:33:59.700620: /data/user/0/com.packageapp/files/.com.google.firebase.crashlytics.files.v2:com.packageapp/open-sessions/6329F98402CB0001411DEBECADC5B9BC/start-time
I/flutter (16669): INFO: 2022-09-20 19:33:59.700690: /data/user/0/com.packageapp/databases
I/flutter (16669): INFO: 2022-09-20 19:33:59.700746: /data/user/0/com.packageapp/databases/firestore.%5BDEFAULT%5D.firebaseProject.%28default%29-journal
I/flutter (16669): INFO: 2022-09-20 19:33:59.700800: /data/user/0/com.packageapp/databases/firestore.%5BDEFAULT%5D.firebaseProject.%28default%29
I/flutter (16669): INFO: 2022-09-20 19:33:59.700857: /data/user/0/com.packageapp/databases/google_app_measurement_local.db-journal
I/flutter (16669): INFO: 2022-09-20 19:33:59.700924: /data/user/0/com.packageapp/databases/google_app_measurement_local.db
I/flutter (16669): INFO: 2022-09-20 19:33:59.701005: /data/user/0/com.packageapp/databases/com.google.android.datatransport.events-journal
I/flutter (16669): INFO: 2022-09-20 19:33:59.701066: /data/user/0/com.packageapp/databases/com.google.android.datatransport.events
I/flutter (16669): INFO: 2022-09-20 19:33:59.701128: /data/user/0/com.packageapp/shared_prefs
I/flutter (16669): INFO: 2022-09-20 19:33:59.701190: /data/user/0/com.packageapp/shared_prefs/FlutterSharedPreferences.xml
I/flutter (16669): INFO: 2022-09-20 19:33:59.701249: /data/user/0/com.packageapp/shared_prefs/flutter_image_picker_shared_preference.xml
I/flutter (16669): INFO: 2022-09-20 19:33:59.701305: /data/user/0/com.packageapp/shared_prefs/com.google.firebase.auth.api.Store.W0RFRkFVTFRd+MTo4ODU2MjY0MjAzNzY6YW5kcm9pZDoyOWY1MmRkNTgwZGFhY2NiNjQ2NGVk.xml
I/flutter (16669): INFO: 2022-09-20 19:33:59.701363: /data/user/0/com.packageapp/shared_prefs/com.google.android.gms.signin.xml
I/flutter (16669): INFO: 2022-09-20 19:33:59.701422: /data/user/0/com.packageapp/shared_prefs/com.google.android.gms.appid.xml
I/flutter (16669): INFO: 2022-09-20 19:33:59.701493: /data/user/0/com.packageapp/shared_prefs/notification_plugin_cache.xml
I/flutter (16669): INFO: 2022-09-20 19:33:59.701552: /data/user/0/com.packageapp/shared_prefs/com.google.android.gms.measurement.prefs.xml
I/flutter (16669): INFO: 2022-09-20 19:33:59.701638: /data/user/0/com.packageapp/shared_prefs/com.google.firebase.messaging.xml
I/flutter (16669): INFO: 2022-09-20 19:33:59.701700: /data/user/0/com.packageapp/shared_prefs/com.google.firebase.crashlytics.xml
I/flutter (16669): INFO: 2022-09-20 19:33:59.701767: /data/user/0/com.packageapp/shared_prefs/FirebaseHeartBeatW0RFRkFVTFRd+MTo4ODU2MjY0MjAzNzY6YW5kcm9pZDoyOWY1MmRkNTgwZGFhY2NiNjQ2NGVk.xml
I/flutter (16669): INFO: 2022-09-20 19:33:59.701824: /data/user/0/com.packageapp/no_backup
I/flutter (16669): INFO: 2022-09-20 19:33:59.701878: /data/user/0/com.packageapp/no_backup/com.google.android.gms.appid-no-backup
I/flutter (16669): INFO: 2022-09-20 19:33:59.701935: /data/user/0/com.packageapp/app_flutter
I/flutter (16669): INFO: 2022-09-20 19:33:59.701989: /data/user/0/com.packageapp/app_flutter/unreadmessages.lock
I/flutter (16669): INFO: 2022-09-20 19:33:59.702050: /data/user/0/com.packageapp/app_flutter/unreadmessages.hive
I/flutter (16669): INFO: 2022-09-20 19:33:59.702105: /data/user/0/com.packageapp/app_flutter/imagesotro.lock
I/flutter (16669): INFO: 2022-09-20 19:33:59.702158: /data/user/0/com.packageapp/app_flutter/imagesotro.hive
I/flutter (16669): INFO: 2022-09-20 19:33:59.702211: /data/user/0/com.packageapp/app_flutter/verificar.lock
I/flutter (16669): INFO: 2022-09-20 19:33:59.702275: /data/user/0/com.packageapp/app_flutter/verificar.hive
I/flutter (16669): INFO: 2022-09-20 19:33:59.702332: /data/user/0/com.packageapp/app_flutter/tokens.lock
I/flutter (16669): INFO: 2022-09-20 19:33:59.702389: /data/user/0/com.packageapp/app_flutter/tokens.hive
I/flutter (16669): INFO: 2022-09-20 19:33:59.702447: /data/user/0/com.packageapp/app_flutter/matches.lock
I/flutter (16669): INFO: 2022-09-20 19:33:59.702501: /data/user/0/com.packageapp/app_flutter/matches.hive
I/flutter (16669): INFO: 2022-09-20 19:33:59.702692: /data/user/0/com.packageapp/app_flutter/images.lock
I/flutter (16669): INFO: 2022-09-20 19:33:59.702741: /data/user/0/com.packageapp/app_flutter/images.hive
I/flutter (16669): INFO: 2022-09-20 19:33:59.702790: /data/user/0/com.packageapp/app_flutter/perfiles.lock
I/flutter (16669): INFO: 2022-09-20 19:33:59.702824: /data/user/0/com.packageapp/app_flutter/perfiles.hive
I/flutter (16669): INFO: 2022-09-20 19:33:59.702858: /data/user/0/com.packageapp/app_flutter/bbdd.lock
I/flutter (16669): INFO: 2022-09-20 19:33:59.702896: /data/user/0/com.packageapp/app_flutter/bbdd.hive
I/flutter (16669): INFO: 2022-09-20 19:33:59.702930: /data/user/0/com.packageapp/app_flutter/flutter_assets
I/flutter (16669): INFO: 2022-09-20 19:33:59.702964: /data/user/0/com.packageapp/app_flutter/flutter_assets/kernel_blob.bin
I/flutter (16669): INFO: 2022-09-20 19:33:59.702998: /data/user/0/com.packageapp/app_flutter/flutter_assets/vm_snapshot_data
I/flutter (16669): INFO: 2022-09-20 19:33:59.703032: /data/user/0/com.packageapp/app_flutter/flutter_assets/isolate_snapshot_data
I/flutter (16669): INFO: 2022-09-20 19:33:59.703069: /data/user/0/com.packageapp/app_flutter/res_timestamp-1-1663695228921
I/flutter (16669): INFO: 2022-09-20 19:33:59.703104: /data/user/0/com.packageapp/code_cache
I/flutter (16669): INFO: 2022-09-20 19:33:59.703136: /data/user/0/com.packageapp/code_cache/flutter_engine
I/flutter (16669): INFO: 2022-09-20 19:33:59.703211: /data/user/0/com.packageapp/code_cache/flutter_engine/6ba2af10bb05c88a2731482cedf2cfd11cf5af0b
I/flutter (16669): INFO: 2022-09-20 19:33:59.703259: /data/user/0/com.packageapp/code_cache/flutter_engine/6ba2af10bb05c88a2731482cedf2cfd11cf5af0b/skia
I/flutter (16669): INFO: 2022-09-20 19:33:59.703295: /data/user/0/com.packageapp/code_cache/flutter_engine/6ba2af10bb05c88a2731482cedf2cfd11cf5af0b/skia/fd9c66e1803092e5fc6f9d6c4cad3d8c030bb860
I/flutter (16669): INFO: 2022-09-20 19:33:59.703337: /data/user/0/com.packageapp/code_cache/flutter_engine/6ba2af10bb05c88a2731482cedf2cfd11cf5af0b/skia/fd9c66e1803092e5fc6f9d6c4cad3d8c030bb860/sksl
I/flutter (16669): INFO: 2022-09-20 19:33:59.703377: /data/user/0/com.packageapp/code_cache/appnameOCKESR
I/flutter (16669): INFO: 2022-09-20 19:33:59.703409: /data/user/0/com.packageapp/code_cache/appnameOCKESR/appname

As you can see there are many files like hive files and firebase cache that should not exist

This printCode is executed in main.dart before firebase and hive initialitation as you can see in that screenshot: image

If I open the file /data/user/0/com.packageapp/databases/firestore.%5BDEFAULT%5D.firebaseProject.%28default%29

I can found 200 references to that id 2Wdz0J3FOxSqmwK7n9C2ezIf3s52 with text like in the image that you can see: image

That confirm my theory that when you unistall the flutter app in One Plus 10 Pro 5G located in /data/user/0/com.packageapp in not deleting properly.

I hope that all this information can be useful for you and your team.

I will wait for your answer

Thanks in advanced :)

darshankawar commented 2 years ago

Thanks for this update. Can you confirm if the same behavior occurs with a fresh Flutter app integrated with Firebase and using only flutterfire plugins ?

DSMan97 commented 2 years ago

Let me check. I will answer as soon as possible

adnanatif commented 2 years ago

i also faced this issue and here is my function for getting streams of data from firestore

when the item is deleted and when i listen this data first it return the deleted data and i think data is cached somehow and then again it return the actual data so the flickring on screen put a bad impact so any help from you guys?

Stream<List<Ball>> getBalls<T>(String sessionId) { var docRef = _firestore .collection(ServiceConstants.Sessions) .doc(sessionId) .collection(ServiceConstants.balls) .snapshots(); final Stream<QuerySnapshot> snapshots = docRef; List<Ball> balls = []; var mapped = snapshots.map((snapshot) { balls.clear(); snapshot.docs.forEach((element) { balls.add(Ball.fromMap(element.data())); }); return balls; }); return mapped; }

google-oss-bot commented 2 years ago

Hey @DSMan97. 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 2 years ago

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

@DSMan97 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.