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.58k stars 3.94k forks source link

πŸ› [cloud_firestore] You cannot use '!=' filters more than once, incorrectly invoked #12348

Closed urbanmania closed 6 months ago

urbanmania commented 6 months ago

Bug report

After updating from 4.13.6 to 4.15.4 I started getting an error on this query:

ref.whereFieldPath(FieldPath(const ["roles"]), arrayContains: auth.currentUser!.uid).whereName_order(isNull: false).orderByName_order();

It used to work but now I get the following error:

You cannot use '!=' filters more than once.
'package:cloud_firestore/src/query.dart':
Failed assertion: line 791 pos 16: '!hasNotEqualTo'

It's not the first time I've seen this bug and last time it was fixed with an update to 4.13.6

Steps to reproduce

Steps to reproduce the behavior:

Quite a long repo list as you have to set up a roles based access control in Firebase and the right data setup.

Expected behavior

I get a list of documents this user has access to

Sample project

If this description is not enough then I might try and set up a project


Additional context

Add any other context about the problem here.


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` [βœ“] Flutter (Channel stable, 3.16.7, on macOS 14.3.1 23D60 darwin-arm64, locale en-IS) β€’ Flutter version 3.16.7 on channel stable at /Users/johannesoe/Dev/flutter β€’ Upstream repository https://github.com/flutter/flutter.git β€’ Framework revision ef1af02aea (5 weeks ago), 2024-01-11 15:19:26 -0600 β€’ Engine revision 4a585b7929 β€’ Dart version 3.2.4 β€’ DevTools version 2.28.5 [βœ“] Android toolchain - develop for Android devices (Android SDK version 33.0.2) β€’ Android SDK at /Users/johannesoe/Library/Android/sdk β€’ Platform android-34, build-tools 33.0.2 β€’ Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java β€’ Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314) β€’ All Android licenses accepted. [βœ“] Xcode - develop for iOS and macOS (Xcode 15.2) β€’ Xcode at /Applications/Xcode.app/Contents/Developer β€’ Build 15C500b β€’ CocoaPods version 1.13.0 [βœ“] Chrome - develop for the web β€’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [βœ“] Android Studio (version 2023.1) β€’ Android Studio at /Applications/Android Studio.app/Contents β€’ Flutter plugin can be installed from: πŸ”¨ https://plugins.jetbrains.com/plugin/9212-flutter β€’ Dart plugin can be installed from: πŸ”¨ https://plugins.jetbrains.com/plugin/6351-dart β€’ Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314) [βœ“] VS Code (version 1.86.1) β€’ VS Code at /Applications/Visual Studio Code.app/Contents β€’ Flutter extension version 3.82.0 ```

Flutter dependencies

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

Click To Expand ``` Dart SDK 3.2.4 Flutter SDK 3.16.7 stablemgmt 1.0.0+5 dependencies: - bloc 8.1.3 [meta] - cached_network_image 3.3.1 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image] - camera 0.10.5+9 [camera_android camera_avfoundation camera_platform_interface camera_web flutter flutter_plugin_android_lifecycle] - cloud_firestore 4.15.4 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cloud_firestore_odm 1.0.0-dev.83 [cloud_firestore flutter json_annotation meta] - cupertino_icons 1.0.6 - encrypt 5.0.3 [args asn1lib clock collection crypto pointycastle] - firebase_analytics 10.8.5 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 4.17.4 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.25.4 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 3.4.14 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_in_app_messaging 0.7.4+13 [firebase_core firebase_core_platform_interface firebase_in_app_messaging_platform_interface flutter meta] - firebase_messaging 14.7.15 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_storage 11.6.5 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - firebase_ui_auth 1.13.0 [email_validator firebase_auth firebase_core firebase_dynamic_links firebase_ui_localizations firebase_ui_oauth firebase_ui_shared flutter flutter_localizations meta] - firebase_ui_firestore 1.6.2 [cloud_firestore firebase_ui_localizations firebase_ui_shared flutter] - firebase_ui_oauth_apple 1.2.18 [firebase_auth firebase_ui_oauth flutter] - firebase_ui_oauth_google 1.3.0 [firebase_auth firebase_ui_oauth flutter google_sign_in] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math web sky_engine] - flutter_adaptive_scaffold 0.1.8 [flutter] - flutter_bloc 8.1.4 [bloc flutter provider] - flutter_dialogs 3.0.0 [flutter] - flutter_image_compress 2.1.0 [flutter flutter_image_compress_platform_interface flutter_image_compress_common flutter_image_compress_web flutter_image_compress_macos] - flutter_local_notifications 16.3.2 [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 web] - flutter_svg 2.0.9 [flutter vector_graphics vector_graphics_codec vector_graphics_compiler] - flutter_timezone 1.0.8 [flutter_web_plugins flutter js] - font_awesome_flutter 10.7.0 [flutter] - go_router 13.2.0 [collection flutter flutter_web_plugins logging meta] - google_sign_in 6.2.1 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - image_picker 1.0.7 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_linux image_picker_macos image_picker_platform_interface image_picker_windows] - intl 0.18.1 [clock meta path] - json_annotation 4.8.1 [meta] - json_theme 6.4.0 [flutter json_class json_schema json_theme_annotation logging meta] - omni_datetime_picker 1.0.9 [flutter] - path_provider 2.1.2 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - qr_code_scanner 1.0.1 [js flutter flutter_web_plugins] - rflutter_alert 2.0.7 [flutter] - shared_preferences 2.2.2 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - syncfusion_flutter_barcodes 23.2.7 [flutter syncfusion_flutter_core] - timezone 0.9.2 [path] - uuid 4.3.3 [crypto sprintf meta fixnum] dev dependencies: - build_runner 2.4.8 [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] - cloud_firestore_odm_generator 1.0.0-dev.83 [analyzer build build_config cloud_firestore_odm collection freezed_annotation graphs json_annotation meta recase source_gen source_helper] - flutter_launcher_icons 0.13.1 [args checked_yaml cli_util image json_annotation path yaml] - flutter_lints 3.0.1 [lints] - flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math async boolean_selector characters collection material_color_utilities meta source_span stream_channel string_scanner term_glyph web] - json_serializable 6.7.1 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper] transitive dependencies: - _fe_analyzer_shared 64.0.0 [meta] - _flutterfire_internals 1.3.21 [collection firebase_core firebase_core_platform_interface flutter meta] - analyzer 6.2.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.4.9 [crypto path pointycastle] - args 2.4.2 - asn1lib 1.5.0 - async 2.11.0 [collection meta] - boolean_selector 2.1.1 [source_span string_scanner] - build 2.4.1 [analyzer async convert crypto glob logging meta package_config 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.2 [analyzer async build collection convert crypto graphs logging package_config path pool pub_semver stream_transform yaml] - build_runner_core 7.2.11 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta package_config path pool timing watcher yaml] - built_collection 5.1.1 - built_value 8.8.1 [built_collection collection fixnum meta] - cached_network_image_platform_interface 4.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.1.1 [cached_network_image_platform_interface flutter flutter_cache_manager] - camera_android 0.10.8+15 [camera_platform_interface flutter flutter_plugin_android_lifecycle stream_transform] - camera_avfoundation 0.9.13+8 [camera_platform_interface flutter stream_transform] - camera_platform_interface 2.7.0 [cross_file flutter plugin_platform_interface stream_transform] - camera_web 0.3.2+3 [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.1 [meta path] - clock 1.1.1 - cloud_firestore_platform_interface 6.1.5 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 3.10.4 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - code_builder 4.9.0 [built_collection built_value collection matcher meta] - collection 1.18.0 - convert 3.1.1 [typed_data] - cross_file 0.3.3+8 [meta web] - crypto 3.0.3 [typed_data] - dart_style 2.3.4 [analyzer args collection path pub_semver source_span] - dbus 0.7.10 [args ffi meta xml] - desktop_webview_auth 0.0.14 [crypto flutter http flutter_web_plugins plugin_platform_interface] - email_validator 2.1.17 - 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.1 [cross_file flutter http plugin_platform_interface] - file_selector_windows 0.9.3+1 [cross_file file_selector_platform_interface flutter] - firebase_analytics_platform_interface 3.9.5 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.5.5+17 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 7.1.4 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.9.4 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser js meta web] - firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.11.4 [firebase_core_platform_interface flutter flutter_web_plugins js meta web] - firebase_crashlytics_platform_interface 3.6.21 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_dynamic_links 5.4.8 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_dynamic_links_platform_interface 0.2.6+16 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_in_app_messaging_platform_interface 0.2.4+21 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.5.23 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.6.4 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta web] - firebase_storage_platform_interface 5.1.8 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.6.22 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta] - firebase_ui_localizations 1.10.2 [flutter flutter_localizations path] - firebase_ui_oauth 1.5.0 [desktop_webview_auth firebase_auth firebase_ui_auth firebase_ui_shared flutter_svg flutter] - firebase_ui_shared 1.4.1 [flutter] - fixnum 1.1.0 - flutter_cache_manager 3.3.1 [clock collection file flutter http path path_provider rxdart sqflite uuid] - flutter_image_compress_common 1.0.3 [flutter flutter_image_compress_platform_interface] - flutter_image_compress_macos 1.0.1 [flutter flutter_image_compress_platform_interface] - flutter_image_compress_platform_interface 1.0.3 [flutter plugin_platform_interface cross_file] - flutter_image_compress_web 0.1.3+2 [flutter flutter_web_plugins flutter_image_compress_platform_interface js] - 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.17 [flutter] - flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math web] - freezed_annotation 2.4.1 [collection json_annotation meta] - frontend_server_client 3.2.0 [async path] - glob 2.1.2 [async collection file path string_scanner] - google_identity_services_web 0.3.0+2 [meta web] - google_sign_in_android 6.1.20 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.7.1 [flutter google_sign_in_platform_interface] - google_sign_in_platform_interface 2.4.3 [flutter plugin_platform_interface] - google_sign_in_web 0.12.3+1 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http web] - graphs 2.3.1 [collection] - http 1.1.2 [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 4.1.3 [archive meta xml] - image_picker_android 0.8.9+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.9 [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] - io 1.0.4 [meta path string_scanner] - js 0.6.7 [meta] - json_class 3.0.0+8 [intl logging meta] - json_schema 5.1.3 [collection http logging rfc_6901 uri] - json_theme_annotation 1.0.3 - lints 3.0.0 - logging 1.2.0 - matcher 0.12.16 [async meta stack_trace term_glyph test_api] - material_color_utilities 0.5.0 [collection] - meta 1.10.0 - mime 1.0.4 - nested 1.0.0 [flutter] - octo_image 2.0.0 [flutter] - package_config 2.1.0 [path] - path 1.8.3 - path_parsing 1.0.1 [vector_math meta] - path_provider_android 2.2.1 [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] - petitparser 6.0.2 [meta] - platform 3.1.3 - plugin_platform_interface 2.1.7 [meta] - pointycastle 3.7.3 [collection convert js] - pool 1.5.1 [async stack_trace] - provider 6.1.1 [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] - recase 4.1.0 - rfc_6901 0.2.0 - rxdart 0.27.7 - shared_preferences_android 2.2.1 [flutter shared_preferences_platform_interface] - shared_preferences_foundation 2.3.4 [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.2 [flutter flutter_web_plugins shared_preferences_platform_interface web] - 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_web_socket 1.0.4 [shelf stream_channel web_socket_channel] - sky_engine 0.0.99 - source_gen 1.5.0 [analyzer async build dart_style glob path source_span yaml] - source_helper 1.3.4 [analyzer collection source_gen] - 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+2 [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] - syncfusion_flutter_core 23.2.7 [vector_math flutter] - synchronized 3.1.0 - term_glyph 1.2.1 - test_api 0.6.1 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph] - timing 1.0.1 [json_annotation] - typed_data 1.3.2 [collection] - uri 1.0.0 [matcher quiver] - vector_graphics 1.1.9+1 [flutter vector_graphics_codec] - vector_graphics_codec 1.1.9+1 - vector_graphics_compiler 1.1.9+1 [args meta path_parsing xml vector_graphics_codec path] - vector_math 2.1.4 - watcher 1.1.0 [async path] - web 0.3.0 - web_socket_channel 2.4.0 [async crypto stream_channel] - win32 5.1.1 [ffi] - xdg_directories 1.0.3 [meta path] - xml 6.5.0 [collection meta petitparser] - yaml 3.1.2 [collection source_span string_scanner] ```

darshankawar commented 6 months ago

@urbanmania Can you check if this is something you are also hitting in your case as well ?

urbanmania commented 6 months ago

Unfortunately that does not solve my issue. As I'm using access management down to the document in Firebase I need to query documents based on whether the user has access or not as Firebase does not limit the output based on the access, but my Firebase rules block based on access. Then I need to select the Name_order so that I can order alphabetically and I can't order by something that isn't requested.

But as I mentioned, this used to work, then stopped working for a while, was fixed but has again stopped working.

darshankawar commented 6 months ago

Thanks for the update. Can you provide us a runnable reproducible code sample that we can use to verify this further ?

urbanmania commented 6 months ago

ok, will take me a bit of time to set it up, give me a few days and I'll share some code

urbanmania commented 6 months ago

Ok, I've set up a test project that shows this error https://github.com/urbanmania/test_project

If you run it as is you will get the error.

If you comment out this line the error is gone (but also the access control) https://github.com/urbanmania/test_project/blob/0931902c0feb202212a792f9cffe33d74363cd85/lib/main_list_view.dart#L15

Johannes

darshankawar commented 6 months ago

Thanks for the repo. I cloned it and while running it, was able to replicate the error as below (verified on Android):

Screenshot 2024-02-22 at 4 22 37 PM
error log ``` ══║ EXCEPTION CAUGHT BY WIDGETS LIBRARY β•žβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• The following assertion was thrown building MainListView(dirty): You cannot use '!=' filters more than once. 'package:cloud_firestore/src/query.dart': Failed assertion: line 791 pos 16: '!hasNotEqualTo' The relevant error-causing widget was: MainListView MainListView:file:///Users/dhs/Documents/NCFlutter/test_project/lib/main.dart: 54:32 When the exception was thrown, this was the stack: #2 _JsonQuery.where (package:cloud_firestore/src/query.dart:791:16) #3 _WithConverterQuery.where (package:cloud_firestore/src/query.dart:1084:22) #4 _$ItemQuery.whereName (package:test_project/models/item.g.dart:663:56) #5 MainListView.build (package:test_project/main_list_view.dart:16:10) #6 StatelessElement.build (package:flutter/src/widgets/framework.dart:5550:49) #7 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5480:15) #8 Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7) #9 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5462:5) #10 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5456:5) #11 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4335:16) #12 Element.updateChild (package:flutter/src/widgets/framework.dart:3840:20) #13 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16) #14 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5643:11) #15 Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7) #16 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2904:19) #17 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:989:21) #18 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:448:5) #19 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1386:15) #20 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1311:9) #21 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1169:5) #22 _invoke (dart:ui/hooks.dart:312:13) #23 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:399:5) #24 _drawFrame (dart:ui/hooks.dart:283:31) (elided 2 frames from class _AssertionError) ════════════════════════════════════════════════════════════════════════════════ ════════════════════ D/AutofillManager(11602): setSaveUiState(1964267902): true D/EGL_emulation(11602): app_time_stats: avg=36.93ms min=3.20ms max=406.09ms count=24 D/AutofillManager(11602): setSaveUiState(1964267902): false W/AutofillManager(11602): setSaveUiState(1964267902, false) called on existing session 1964267902; cancelling it D/EGL_emulation(11602): app_time_stats: avg=4627.03ms min=4627.03ms max=4627.03ms count=1 ```
russellwheatley commented 6 months ago

This isn't a crash, this is an assertion that is being thrown. This one: https://github.com/firebase/flutterfire/blob/master/packages/cloud_firestore/cloud_firestore/lib/src/query.dart#L791

You cannot have 2 != filters on a query, we catch it early because you will get the same exception on the Firebase SDK.

The only thing I'm not sure about is how you have 2 != queries from your reproduction. You might want to ask the question on the Firestore ODM repo which generates the query you are making.

@darshankawar - are you able to transfer this issue to that repository?

https://github.com/FirebaseExtended/firestoreodm-flutter

darshankawar commented 6 months ago

@russellwheatley Hi,

No, since that repo is not part of the same org, I can't transfer it.

russellwheatley commented 6 months ago

Hey @urbanmania - sorry, you should open a new issue on the Firestore ODM with your reproduction if you wish to understand why this query causes this assertion exception πŸ™

https://github.com/FirebaseExtended/firestoreodm-flutter

urbanmania commented 6 months ago

Thanks for your help, will try and raise this in the Firestore repo.