Skip to content

🐛 [flutterfire_ui] Non descriptive error codes leading to appstore rejection #8497

Closed
@stargazing-dino

Description

@stargazing-dino

Bug report

Describe the bug
I'm using the login and register page provided by flutterfire_ui but one thing that's been tripping me and the reviewers up is that if you already have an account and you try to sign in through the "register" page you'll get "an unknown error occurred" when in reality all you have to do is go to the "login" side instead because you already have an account.

The same error also occurs when you open an 3rd party auth dialog and cancel it. The operation should just be a regular "user cancelled" error but comes out as "an unkown error occurred".

Steps to reproduce

Steps to reproduce the behavior:

  1. Use RegisterScreen from flutterfire_ui
  2. Register an account
  3. Logout
  4. login on register screen

Expected behavior

I'd say the expected behavior could be two things. Maybe an error that says they already have an account, please login instead or to log the user in anyways.

Sample project


Additional context

I'd think it'd be great if the package handled auth exceptions more individually first, dealing with google sign in/android errors (like here) and ios error codes and the bunch and map each error code to a fixed surface firebase auth exception.


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, 2.10.5, on macOS 12.3.1 21E258 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.66.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!

Flutter dependencies

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

Click To Expand
Dart SDK 2.16.2
Flutter SDK 2.10.5
humoredly 1.0.6+29

dependencies:
- async_button_builder 2.2.0+1 [flutter freezed_annotation]
- auto_route 3.2.4 [flutter path collection meta universal_html]
- auto_size_text 3.0.0 [flutter]
- auto_size_text_field 1.0.1 [flutter]
- badges 2.0.2 [flutter]
- cloud_firestore 3.1.12 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- cloud_functions 3.2.12 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter]
- cupertino_icons 1.0.4
- device_preview 1.0.0 [flutter flutter_localizations provider device_frame freezed_annotation json_annotation shared_preferences]
- device_preview_screenshot 1.0.0 [device_preview flutter path]
- dio 4.0.6 [http_parser path]
- dotted_border 2.0.0+2 [flutter path_drawing]
- dotted_line 3.1.0 [flutter]
- expandable_text 2.3.0 [flutter]
- firebase_auth 3.3.14 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 1.14.1 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 2.6.2 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- flex_color_scheme 5.0.0-dev.3 [flutter material_color_utilities]
- flutter 0.0.0 [characters collection material_color_utilities meta typed_data vector_math sky_engine]
- flutter_hooks 0.18.3 [flutter]
- flutter_markdown 0.6.10 [flutter markdown meta path]
- flutter_slidable 1.2.0 [flutter]
- flutter_sticky_header 0.6.1 [flutter value_layout_builder]
- flutter_svg 1.0.3 [flutter meta path_drawing vector_math xml]
- flutterfire_ui 0.4.0+2 [cloud_firestore collection crypto desktop_webview_auth email_validator firebase_auth firebase_core firebase_database firebase_dynamic_links flutter flutter_facebook_auth flutter_localizations flutter_svg google_sign_in sign_in_with_apple twitter_login]
- font_awesome_flutter 10.1.0 [flutter]
- freezed_annotation 1.1.0 [collection json_annotation meta]
- fuzzywuzzy 0.1.7 [collection]
- google_fonts 2.3.1 [flutter http path_provider crypto]
- google_sign_in 5.3.0 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web]
- hooks_riverpod 2.0.0-dev.5 [collection flutter flutter_hooks flutter_riverpod riverpod state_notifier]
- in_app_purchase 3.0.2 [flutter in_app_purchase_android in_app_purchase_platform_interface in_app_purchase_storekit]
- json_annotation 4.4.0 [meta]
- just_the_tooltip 0.0.11+2 [flutter]
- kt_dart 0.10.0 [meta]
- number_display 3.0.0
- package_info_plus 1.4.2 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web]
- responsive_framework 0.1.7 [flutter collection]
- rich_text_controller 1.4.0 [flutter]
- rxdart 0.27.3
- sign_in_with_apple 3.3.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web]
- substring_highlight 1.0.33 [flutter]
- time_ago_provider 4.1.2
- tinycolor2 2.0.1 [flutter lint pigment]
- tuple 2.0.0 [quiver]
- upgrader 3.13.0 [flutter device_info_plus http os_detect package_info_plus shared_preferences url_launcher version xml html]
- url_launcher 6.0.20 [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.6 [crypto]

dev dependencies:
- auto_route_generator 3.2.3 [build source_gen analyzer path build_runner code_builder dart_style auto_route]
- build_runner 2.1.10 [args async analyzer 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]
- flutter_launcher_icons 0.9.2 [args image path yaml]
- flutter_lints 1.0.4 [lints]
- flutter_native_splash 2.1.6 [args flutter flutter_web_plugins image js lint meta path universal_io xml 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 typed_data]
- freezed 1.1.1 [analyzer build build_config collection meta source_gen freezed_annotation]
- integration_test 0.0.0 [flutter flutter_driver flutter_test path vm_service archive async boolean_selector characters charcode clock collection crypto fake_async file matcher material_color_utilities meta source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math webdriver]
- json_serializable 6.1.6 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper]

transitive dependencies:
- _fe_analyzer_shared 38.0.0 [meta]
- analyzer 3.4.1 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- archive 3.1.6 [crypto path]
- args 2.3.0
- 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]
- build_config 1.0.0 [checked_yaml json_annotation path pubspec_parse yaml]
- build_daemon 3.1.0 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 2.0.8 [analyzer async build crypto graphs logging path package_config pool pub_semver stream_transform yaml]
- build_runner_core 7.2.3 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pool timing watcher yaml]
- built_collection 5.1.1
- built_value 8.2.0 [built_collection collection fixnum meta]
- characters 1.2.0
- charcode 1.3.1
- checked_yaml 2.0.1 [json_annotation source_span yaml]
- clock 1.1.0
- cloud_firestore_platform_interface 5.5.3 [collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 2.6.12 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js]
- cloud_functions_platform_interface 5.1.3 [firebase_core flutter meta plugin_platform_interface]
- cloud_functions_web 4.2.11 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- code_builder 4.1.0 [built_collection built_value collection matcher meta]
- collection 1.15.0
- convert 3.0.1 [typed_data]
- crypto 3.0.1 [collection typed_data]
- csslib 0.17.1 [source_span]
- dart_style 2.2.3 [analyzer args path pub_semver source_span]
- desktop_webview_auth 0.0.6 [crypto flutter http]
- device_frame 1.0.0 [freezed_annotation flutter]
- device_info_plus 3.2.3 [flutter device_info_plus_platform_interface device_info_plus_macos device_info_plus_linux device_info_plus_web device_info_plus_windows]
- 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]
- email_validator 2.0.1
- fake_async 1.2.0 [clock collection]
- ffi 1.1.2
- file 6.1.2 [meta path]
- firebase_auth_platform_interface 6.2.3 [firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 3.3.12 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.2.5 [collection flutter meta plugin_platform_interface]
- firebase_core_web 1.6.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_crashlytics_platform_interface 3.2.3 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_database 9.0.11 [firebase_core firebase_core_platform_interface firebase_database_platform_interface firebase_database_web flutter]
- firebase_database_platform_interface 0.2.1+3 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_database_web 0.2.0+10 [firebase_core firebase_core_web firebase_database_platform_interface flutter flutter_web_plugins js]
- firebase_dynamic_links 4.1.3 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface]
- firebase_dynamic_links_platform_interface 0.2.2+3 [firebase_core flutter meta plugin_platform_interface]
- fixnum 1.0.0
- flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver archive async boolean_selector characters charcode clock collection crypto matcher material_color_utilities platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math]
- flutter_facebook_auth 4.3.0 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web]
- flutter_facebook_auth_platform_interface 3.1.0 [flutter plugin_platform_interface]
- flutter_facebook_auth_web 3.1.0 [flutter flutter_web_plugins js flutter_facebook_auth_platform_interface]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path typed_data vector_math]
- flutter_riverpod 2.0.0-dev.5 [collection flutter meta riverpod state_notifier]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta typed_data vector_math]
- frontend_server_client 2.1.2 [async path]
- fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform]
- glob 2.0.2 [async collection file path string_scanner]
- google_sign_in_android 5.2.5 [flutter google_sign_in_platform_interface]
- google_sign_in_ios 5.2.5 [flutter google_sign_in_platform_interface]
- google_sign_in_platform_interface 2.1.2 [flutter quiver]
- google_sign_in_web 0.10.1 [flutter flutter_web_plugins google_sign_in_platform_interface js]
- graphs 2.1.0 [collection]
- html 0.15.0 [csslib source_span]
- http 0.13.4 [async http_parser meta path]
- http_multi_server 3.2.0 [async]
- http_parser 4.0.0 [charcode collection source_span string_scanner typed_data]
- image 3.1.3 [archive meta xml]
- in_app_purchase_android 0.2.2+2 [collection flutter in_app_purchase_platform_interface json_annotation]
- in_app_purchase_platform_interface 1.3.1 [flutter plugin_platform_interface]
- in_app_purchase_storekit 0.3.0+4 [collection flutter in_app_purchase_platform_interface json_annotation]
- intl 0.17.0 [clock path]
- io 1.0.3 [meta path string_scanner]
- js 0.6.3
- lint 1.8.2
- lints 1.0.1
- logging 1.0.2
- markdown 5.0.0 [args charcode meta]
- matcher 0.12.11 [stack_trace]
- material_color_utilities 0.1.3
- meta 1.7.0
- mime 1.0.1
- nested 1.0.0 [flutter]
- os_detect 2.0.0
- package_config 2.0.2 [path]
- package_info_plus_linux 1.0.5 [package_info_plus_platform_interface flutter path]
- package_info_plus_macos 1.3.0 [flutter]
- package_info_plus_platform_interface 1.0.2 [flutter meta plugin_platform_interface]
- package_info_plus_web 1.0.5 [flutter flutter_web_plugins http meta package_info_plus_platform_interface]
- package_info_plus_windows 1.0.5 [package_info_plus_platform_interface ffi flutter win32]
- path 1.8.0
- path_drawing 1.0.0 [vector_math meta path_parsing flutter]
- path_parsing 1.0.0 [vector_math meta]
- path_provider 2.0.9 [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.12 [flutter path_provider_platform_interface]
- path_provider_ios 2.0.8 [flutter path_provider_platform_interface]
- path_provider_linux 2.1.5 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_macos 2.0.5 [flutter path_provider_platform_interface]
- path_provider_platform_interface 2.0.3 [flutter platform plugin_platform_interface]
- path_provider_windows 2.0.5 [ffi flutter path path_provider_platform_interface win32]
- petitparser 4.4.0 [meta]
- pigment 1.0.4 [flutter]
- platform 3.1.0
- plugin_platform_interface 2.1.2 [meta]
- pool 1.5.0 [async stack_trace]
- process 4.2.4 [file path platform]
- provider 6.0.2 [collection flutter nested]
- pub_semver 2.1.1 [collection meta]
- pubspec_parse 1.2.0 [checked_yaml collection json_annotation pub_semver yaml]
- quiver 3.0.1+1 [matcher]
- riverpod 2.0.0-dev.5 [collection meta stack_trace state_notifier]
- shared_preferences 2.0.13 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- shared_preferences_android 2.0.11 [flutter shared_preferences_platform_interface]
- shared_preferences_ios 2.1.0 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.1.0 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_macos 2.0.3 [flutter shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.0.0 [flutter]
- shared_preferences_web 2.0.3 [flutter flutter_web_plugins shared_preferences_platform_interface]
- shared_preferences_windows 2.1.0 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- shelf 1.3.0 [async collection http_parser path stack_trace stream_channel]
- shelf_web_socket 1.0.1 [shelf stream_channel web_socket_channel]
- 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_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.1 [collection path term_glyph]
- stack_trace 1.10.0 [path]
- state_notifier 0.7.2+1 [meta]
- stream_channel 2.1.0 [async]
- stream_transform 2.0.0
- string_scanner 1.1.0 [charcode source_span]
- sync_http 0.3.0
- term_glyph 1.2.0
- test_api 0.4.8 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- timing 1.0.0 [json_annotation]
- twitter_login 4.2.2 [flutter crypto http]
- typed_data 1.3.0 [collection]
- universal_html 2.0.8 [async csslib charcode collection html meta source_span typed_data universal_io]
- universal_io 2.0.4 [collection crypto meta typed_data]
- url_launcher_android 6.0.15 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.0.15 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.0.0 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.0.0 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.0.5 [flutter plugin_platform_interface]
- url_launcher_web 2.0.9 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.0 [flutter url_launcher_platform_interface]
- value_layout_builder 0.3.1 [flutter]
- vector_math 2.1.1
- version 2.0.0
- vm_service 7.5.0
- watcher 1.0.1 [async path]
- web_socket_channel 2.1.0 [async crypto stream_channel]
- webdriver 3.0.0 [archive matcher path stack_trace sync_http]
- win32 2.5.1 [ffi]
- xdg_directories 0.2.0+1 [meta path process]
- xml 5.3.1 [collection meta petitparser]
- yaml 3.1.0 [collection source_span string_scanner]

Metadata

Metadata

Assignees

Labels

plugin: uiresolution: fixedA fix has been merged or is pending merge from a PR.type: bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions