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.62k stars 3.95k forks source link

πŸ› [cloud_firestore] NullPointerException #3535

Closed itssidhere closed 3 years ago

itssidhere commented 4 years ago

Bug report

Describe the bug I am seeing some usual occurrences of few bugs in production from the crash reports.

Steps to reproduce

It's unknown, I can't reproduce it on my side


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, v1.17.5, on Microsoft Windows [Version 10.0.19041.508], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 29.0.0) [√] Android Studio (version 4.0) [!] IntelliJ IDEA Community Edition (version 2019.2) X Flutter plugin not installed; this adds Flutter specific functionality. [√] Connected device (1 available) ! Doctor found issues in 1 category. ```

Flutter dependencies

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

Click To Expand ``` Dart SDK 2.8.4 Flutter SDK 1.17.5 mohalla 0.0.94325+387 dependencies: - animated_text_kit 2.2.0 [flutter] - audioplayers 0.16.1 [uuid path_provider flutter flutter_web_plugins] - auto_size_text 2.1.0 [flutter] - awesome_dialog 1.2.0 [flutter simple_animations flare_flutter] - bubble 1.1.9+1 [flutter] - cloud_firestore 0.14.0+2 [flutter meta quiver firebase_core firebase_core_platform_interface cloud_firestore_platform_interface cloud_firestore_web] - connectivity 0.4.9+2 [flutter meta connectivity_platform_interface connectivity_macos connectivity_for_web] - cupertino_icons 1.0.0 - device_info 0.4.2+7 [flutter device_info_platform_interface] - equatable 1.2.5 [collection meta] - extended_image 1.1.1 [flutter extended_image_library meta] - firebase_analytics 6.0.0 [meta flutter firebase_core firebase_analytics_web firebase_analytics_platform_interface] - firebase_auth 0.18.0+1 [meta firebase_core firebase_core_platform_interface firebase_auth_platform_interface firebase_auth_web flutter] - firebase_core 0.5.0 [firebase_core_platform_interface flutter quiver meta firebase_core_web] - firebase_database 4.0.0 [flutter firebase_core] - firebase_dynamic_links 0.6.0 [flutter firebase_core] - firebase_messaging 7.0.0 [meta platform flutter firebase_core] - firebase_remote_config 0.4.0 [flutter firebase_core] - firebase_storage 4.0.0 [flutter firebase_core] - flutter 0.0.0 [collection meta typed_data vector_math sky_engine] - flutter_bloc 6.0.5 [flutter bloc provider] - flutter_colorpicker 0.3.4 [flutter] - flutter_country_picker 0.1.6 [flutter diacritic] - flutter_facebook_login 3.0.0 [flutter collection] - flutter_linkify 3.1.3 [flutter linkify] - flutter_local_notifications 1.4.4+4 [flutter platform flutter_local_notifications_platform_interface] - flutter_screenutil 2.3.1 [flutter] - flutter_slidable 0.5.7 [flutter] - flutter_spinkit 4.1.2+1 [flutter] - fluttertoast 7.1.0 [flutter flutter_web_plugins] - font_awesome_flutter 8.8.1 [flutter] - get 3.10.2 [flutter] - get_it 4.0.4 [async meta] - giphy_picker 1.0.4 [flutter giphy_client http] - google_sign_in 4.5.3 [google_sign_in_platform_interface flutter meta google_sign_in_web] - hive 1.4.4 [meta crypto] - hive_flutter 0.3.1 [flutter hive path_provider path] - image_cropper 1.3.1 [flutter] - image_picker 0.6.7+7 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - in_app_purchase 0.3.4+6 [async collection flutter json_annotation meta] - intl 0.16.1 [path] - json_annotation 3.0.1 - like_button 1.0.1 [flutter] - local_auth 0.6.3+1 [flutter meta intl platform flutter_plugin_android_lifecycle] - package_info 0.4.3 [flutter] - page_transition 1.1.6 [flutter] - palette_generator 0.2.3 [flutter collection path] - photo_view 0.10.2 [flutter] - provider 4.3.2+2 [flutter nested collection] - random_color 1.0.5 [flutter] - rate_my_app 0.7.1+1 [shared_preferences smooth_star_rating pedantic flutter] - share 0.6.5 [meta mime flutter] - shimmer 1.1.1 [flutter] - slider_button 0.6.0 [vibration flutter] - timeago 2.0.27 - url_launcher 5.4.11 [flutter url_launcher_platform_interface url_launcher_web url_launcher_macos] - uuid 2.2.2 [crypto convert] - vibration 1.4.0 [flutter] - youtube_player_flutter 6.1.1 [flutter webview_media] dev dependencies: - build_runner 1.10.0 [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] - hive_generator 0.7.1 [build source_gen hive analyzer dartx] - json_serializable 3.3.0 [analyzer build build_config json_annotation meta path source_gen] transitive dependencies: - _fe_analyzer_shared 4.0.0 [meta] - analyzer 0.39.10 [_fe_analyzer_shared args charcode collection convert crypto glob html meta package_config path pub_semver source_span watcher yaml] - args 1.6.0 - async 2.4.2 [collection] - bloc 6.0.1 [meta] - build 1.3.0 [analyzer async convert crypto logging meta path glob] - build_config 0.4.2 [checked_yaml json_annotation meta path pubspec_parse yaml] - build_daemon 2.1.4 [built_collection built_value http_multi_server logging pedantic path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 1.3.9 [analyzer build crypto graphs logging path package_config pub_semver yaml] - build_runner_core 5.2.0 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pedantic pool timing watcher yaml] - built_collection 4.3.2 [collection quiver] - built_value 7.1.0 [built_collection collection fixnum quiver] - characters 1.0.0 - charcode 1.1.3 - checked_yaml 1.0.2 [json_annotation source_span yaml] - cloud_firestore_platform_interface 2.0.1 [flutter meta collection firebase_core plugin_platform_interface] - cloud_firestore_web 0.2.0+1 [flutter flutter_web_plugins firebase http_parser meta firebase_core cloud_firestore_platform_interface js] - code_builder 3.3.0 [built_collection built_value collection matcher meta] - collection 1.14.12 - connectivity_for_web 0.3.1 [connectivity_platform_interface flutter_web_plugins flutter] - connectivity_macos 0.1.0+3 [flutter] - connectivity_platform_interface 1.0.6 [flutter meta plugin_platform_interface] - convert 2.1.1 [charcode typed_data] - crypto 2.1.4 [collection convert typed_data] - csslib 0.16.1 [source_span] - dart_style 1.3.6 [analyzer args path source_span] - dartx 0.5.0 [collection path crypto characters time meta] - device_info_platform_interface 1.0.1 [flutter meta plugin_platform_interface] - diacritic 0.1.1 - extended_image_library 0.3.0 [flutter path_provider http_client_helper crypto path] - file 5.2.1 [intl meta path] - firebase 7.3.0 [http http_parser js] - firebase_analytics_platform_interface 1.0.1 [flutter meta] - firebase_analytics_web 0.1.1 [flutter flutter_web_plugins firebase firebase_analytics_platform_interface meta] - firebase_auth_platform_interface 2.0.1 [flutter meta firebase_core plugin_platform_interface] - firebase_auth_web 0.3.0+1 [flutter flutter_web_plugins firebase meta http_parser intl firebase_core firebase_auth_platform_interface js] - firebase_core_platform_interface 2.0.0 [flutter meta plugin_platform_interface quiver] - firebase_core_web 0.2.0 [firebase firebase_core_platform_interface flutter flutter_web_plugins meta js] - fixnum 0.10.11 - flare_dart 2.3.4 - flare_flutter 2.0.3 [flutter flare_dart meta] - flutter_local_notifications_platform_interface 1.0.1 [flutter plugin_platform_interface] - flutter_plugin_android_lifecycle 1.0.8 [flutter] - flutter_web_plugins 0.0.0 [flutter collection meta typed_data vector_math] - giphy_client 0.2.0 [meta http] - glob 1.2.0 [async collection node_io path pedantic string_scanner] - google_sign_in_platform_interface 1.1.2 [flutter meta quiver] - google_sign_in_web 0.9.1+1 [google_sign_in_platform_interface flutter flutter_web_plugins meta js] - graphs 0.2.0 - html 0.14.0+3 [csslib source_span] - http 0.12.1 [http_parser path pedantic] - http_client_helper 0.2.1 [http] - http_multi_server 2.2.0 [async] - http_parser 3.1.4 [charcode collection source_span string_scanner typed_data] - image_picker_platform_interface 1.1.0 [flutter meta http plugin_platform_interface] - io 0.3.4 [charcode meta path string_scanner] - js 0.6.2 - linkify 2.1.0 - logging 0.11.4 - matcher 0.12.8 [stack_trace] - meta 1.1.8 - mime 0.9.7 - nested 0.0.4 [flutter] - node_interop 1.1.1 [js] - node_io 1.1.1 [node_interop path] - package_config 1.9.3 [path charcode] - path 1.7.0 - path_provider 1.6.11 [flutter path_provider_platform_interface path_provider_macos path_provider_linux] - path_provider_linux 0.0.1+1 [path xdg_directories path_provider_platform_interface flutter] - path_provider_macos 0.0.4+3 [flutter] - path_provider_platform_interface 1.0.2 [flutter meta platform plugin_platform_interface] - pedantic 1.9.0 - platform 2.2.1 - platform_detect 1.4.0 [meta pub_semver] - plugin_platform_interface 1.0.2 [meta] - pool 1.4.0 [async stack_trace] - process 3.0.13 [file intl meta path platform] - pub_semver 1.4.4 [collection] - pubspec_parse 0.1.5 [checked_yaml json_annotation pub_semver yaml] - quiver 2.1.3 [matcher meta] - sa_anicoto 1.0.2 [flutter supercharged] - sa_multi_tween 1.1.1 [flutter supercharged] - sa_stateless_animation 1.0.1 [flutter supercharged sa_anicoto] - sa_v1_migration 1.1.2 [flutter] - shared_preferences 0.5.7+3 [meta flutter shared_preferences_platform_interface shared_preferences_macos shared_preferences_web] - shared_preferences_macos 0.0.1+10 [shared_preferences_platform_interface flutter] - shared_preferences_platform_interface 1.0.4 [meta flutter] - shared_preferences_web 0.1.2+7 [shared_preferences_platform_interface flutter flutter_web_plugins meta] - shelf 0.7.7 [async collection http_parser path stack_trace stream_channel] - shelf_web_socket 0.2.3 [shelf web_socket_channel stream_channel] - simple_animations 2.2.1 [flutter sa_multi_tween sa_anicoto sa_stateless_animation sa_v1_migration] - sky_engine 0.0.99 - smooth_star_rating 1.1.1 [flutter] - source_gen 0.9.5 [analyzer async build dart_style glob meta path pedantic source_span] - source_span 1.7.0 [charcode collection meta path term_glyph] - stack_trace 1.9.5 [path] - stream_channel 2.0.0 [async] - stream_transform 1.2.0 - string_scanner 1.0.5 [charcode meta source_span] - supercharged 1.6.0 [flutter] - term_glyph 1.1.0 - time 1.3.0 - timing 0.1.1+2 [json_annotation] - typed_data 1.1.6 - url_launcher_macos 0.0.1+7 [flutter] - url_launcher_platform_interface 1.0.7 [flutter meta plugin_platform_interface] - url_launcher_web 0.1.1+6 [url_launcher_platform_interface platform_detect flutter flutter_web_plugins meta] - vector_math 2.0.8 - watcher 0.9.7+15 [async path pedantic] - web_socket_channel 1.1.0 [async crypto stream_channel] - webview_media 0.1.2 [flutter] - xdg_directories 0.1.0 [path process flutter] - yaml 2.2.1 [charcode collection string_scanner source_span] ```

WhatsApp Image 2020-09-13 at 3 38 15 PM WhatsApp Image 2020-09-13 at 3 37 56 PM

darshankawar commented 4 years ago

@itssidhere, Can you provide how the data is being saved and retrieved using cloud_firestore ? Just a minimal code sample would be helpful.

itssidhere commented 4 years ago

Doesn't it looks like the cloud_firestore issue? @darshankawar

russellwheatley commented 4 years ago

Hey @itssidhere, it could be a cloud_firestore issue, but it might not be. We cannot understand the problem without a code sample repro. Please provide one and we can debug the problem.

itssidhere commented 4 years ago

@russellwheatley

Kindly have a look at this

WhatsApp Image 2020-09-16 at 6 55 19 PM

I cannot reproduce it but I am just pointing out that something is going on

Related issues are

3354 which got resolved by adding an if statement. This exception is also coming from the same file i.e, FlutterFirebaseFirestorePlugin.java

darshankawar commented 4 years ago

@itssidhere, As requested earlier, we would need a minimal code sample on how you are sending and retrieving data from cloud_firestore, which will help us to debug the issue faster and better. Thanks

google-oss-bot commented 3 years ago

Hey @itssidhere. 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 3 years ago

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

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