firebase / FirebaseUI-Flutter

Apache License 2.0
91 stars 79 forks source link

🐛 Incorrect Error Handling on iOS (Works on Android & Web) #267

Closed stephenriska123 closed 5 months ago

stephenriska123 commented 5 months ago

Is there an existing issue for this?

What plugin is this bug for?

Firebase UI Auth

What platform(s) does this bug affect?

iOS

List of dependencies used.

flutter pub deps -s list
  Dart SDK 3.2.6
Flutter SDK 3.16.9
gallant_gambit 0.1.0

dependencies:
- firebase_auth 4.16.0
  - firebase_auth_platform_interface ^7.0.9
  - firebase_auth_web ^5.8.13
  - firebase_core ^2.24.2
  - firebase_core_platform_interface ^5.0.0
  - flutter any
  - meta ^1.8.0
- firebase_core 2.24.2
  - firebase_core_platform_interface ^5.0.0
  - firebase_core_web ^2.10.0
  - flutter any
  - meta ^1.8.0
- firebase_ui_auth 1.12.1
  - email_validator ^2.1.17
  - firebase_auth ^4.15.3
  - firebase_core ^2.24.2
  - firebase_dynamic_links ^5.4.8
  - firebase_ui_localizations ^1.10.1
  - firebase_ui_oauth ^1.4.17
  - firebase_ui_shared ^1.4.1
  - flutter any
  - flutter_localizations any
  - meta ^1.10.0
- flutter 0.0.0
  - characters 1.3.0
  - collection 1.18.0
  - material_color_utilities 0.5.0
  - meta 1.10.0
  - vector_math 2.1.4
  - web 0.3.0
  - sky_engine any
- material_symbols_icons 4.2718.0
  - flutter any

dev dependencies:
- flutter_test 0.0.0
  - flutter any
  - test_api 0.6.1
  - matcher 0.12.16
  - path 1.8.3
  - fake_async 1.3.1
  - clock 1.1.1
  - stack_trace 1.11.1
  - vector_math 2.1.4
  - async 2.11.0
  - boolean_selector 2.1.1
  - characters 1.3.0
  - collection 1.18.0
  - material_color_utilities 0.5.0
  - meta 1.10.0
  - source_span 1.10.0
  - stream_channel 2.1.2
  - string_scanner 1.2.0
  - term_glyph 1.2.1
  - web 0.3.0
- flutter_lints 2.0.3
  - lints ^2.0.0

transitive dependencies:
- _flutterfire_internals 1.3.16
  - collection ^1.0.0
  - firebase_core ^2.24.2
  - firebase_core_platform_interface ^5.0.0
  - flutter any
  - meta ^1.8.0
- args 2.4.2
- async 2.11.0
  - collection ^1.15.0
  - meta ^1.1.7
- boolean_selector 2.1.1
  - source_span ^1.8.0
  - string_scanner ^1.1.0
- characters 1.3.0
- clock 1.1.1
- collection 1.18.0
- crypto 3.0.3
  - typed_data ^1.3.0
- desktop_webview_auth 0.0.15
  - crypto ^3.0.3
  - flutter any
  - http ^1.0.0
  - flutter_web_plugins any
  - plugin_platform_interface ^2.1.4
- email_validator 2.1.17
- fake_async 1.3.1
  - clock ^1.1.0
  - collection ^1.15.0
- firebase_auth_platform_interface 7.0.9
  - _flutterfire_internals ^1.3.16
  - collection ^1.16.0
  - firebase_core ^2.24.2
  - flutter any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- firebase_auth_web 5.8.13
  - firebase_auth_platform_interface ^7.0.9
  - firebase_core ^2.24.2
  - firebase_core_web ^2.10.0
  - flutter any
  - flutter_web_plugins any
  - http_parser ^4.0.0
  - js ^0.6.3
  - meta ^1.8.0
- firebase_core_platform_interface 5.0.0
  - collection ^1.0.0
  - flutter any
  - flutter_test any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- firebase_core_web 2.10.0
  - firebase_core_platform_interface ^5.0.0
  - flutter any
  - flutter_web_plugins any
  - js ^0.6.3
  - meta ^1.8.0
- firebase_dynamic_links 5.4.8
  - firebase_core ^2.24.2
  - firebase_core_platform_interface ^5.0.0
  - firebase_dynamic_links_platform_interface ^0.2.6+16
  - flutter any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- firebase_dynamic_links_platform_interface 0.2.6+16
  - _flutterfire_internals ^1.3.16
  - firebase_core ^2.24.2
  - flutter any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- firebase_ui_localizations 1.10.1
  - flutter any
  - flutter_localizations any
  - path ^1.8.3
- firebase_ui_oauth 1.4.17
  - desktop_webview_auth ^0.0.14
  - firebase_auth ^4.15.3
  - firebase_ui_auth ^1.12.1
  - firebase_ui_shared ^1.4.1
  - flutter_svg ^2.0.9
  - flutter any
- firebase_ui_shared 1.4.1
  - flutter any
- flutter_localizations 0.0.0
  - flutter any
  - intl 0.18.1
  - characters 1.3.0
  - clock 1.1.1
  - collection 1.18.0
  - material_color_utilities 0.5.0
  - meta 1.10.0
  - path 1.8.3
  - vector_math 2.1.4
  - web 0.3.0
- flutter_svg 2.0.9
  - flutter any
  - vector_graphics ^1.1.9+1
  - vector_graphics_codec ^1.1.9+1
  - vector_graphics_compiler ^1.1.9+1
- flutter_web_plugins 0.0.0
  - flutter any
  - characters 1.3.0
  - collection 1.18.0
  - material_color_utilities 0.5.0
  - meta 1.10.0
  - vector_math 2.1.4
  - web 0.3.0
- http 1.2.0
  - async ^2.5.0
  - http_parser ^4.0.0
  - meta ^1.3.0
  - web >=0.3.0 <0.5.0
- http_parser 4.0.2
  - collection ^1.15.0
  - source_span ^1.8.0
  - string_scanner ^1.1.0
  - typed_data ^1.3.0
- intl 0.18.1
  - clock ^1.1.0
  - meta ^1.0.2
  - path ^1.8.0
- js 0.6.7
  - meta ^1.7.0
- lints 2.1.1
- matcher 0.12.16
  - async ^2.10.0
  - meta ^1.8.0
  - stack_trace ^1.10.0
  - term_glyph ^1.2.0
  - test_api >=0.5.0 <0.7.0
- material_color_utilities 0.5.0
  - collection ^1.15.0
- meta 1.10.0
- path 1.8.3
- path_parsing 1.0.1
  - vector_math ^2.1.0
  - meta ^1.3.0
- petitparser 6.0.2
  - meta ^1.9.0
- plugin_platform_interface 2.1.8
  - meta ^1.3.0
- sky_engine 0.0.99
- source_span 1.10.0
  - collection ^1.15.0
  - path ^1.8.0
  - term_glyph ^1.2.0
- stack_trace 1.11.1
  - path ^1.8.0
- stream_channel 2.1.2
  - async ^2.5.0
- string_scanner 1.2.0
  - source_span ^1.8.0
- term_glyph 1.2.1
- test_api 0.6.1
  - async ^2.5.0
  - boolean_selector ^2.1.0
  - collection ^1.15.0
  - meta ^1.3.0
  - source_span ^1.8.0
  - stack_trace ^1.10.0
  - stream_channel ^2.1.0
  - string_scanner ^1.1.0
  - term_glyph ^1.2.0
- typed_data 1.3.2
  - collection ^1.15.0
- vector_graphics 1.1.9+2
  - flutter any
  - vector_graphics_codec 1.1.9+2
- vector_graphics_codec 1.1.9+2
- vector_graphics_compiler 1.1.9+2
  - args ^2.3.0
  - meta ^1.7.0
  - path_parsing ^1.0.1
  - xml ^6.3.0
  - vector_graphics_codec 1.1.9+2
  - path ^1.8.0
- vector_math 2.1.4
- web 0.3.0
- xml 6.5.0
  - collection ^1.18.0
  - meta ^1.9.0
  - petitparser ^6.0.0

Steps to reproduce

Screenshot 2024-01-30 at 3 22 31 PM Screenshot 2024-01-30 at 3 32 46 PM

Here you can see the expected error result when entering bad credentials (works on Android and web), but it doesn't seem the error is being handled properly for iOS. The code is essentially

SignInScreen(
    providers: [EmailAuthProvider()]
)

Expected Behavior

Error handled gracefully and shows a readable error to the user on the UI (see image)

Actual Behavior

Exception not handled gracefully and error output on the UI.

Additional Information

No response

danagbemava-nc commented 5 months ago

This is an issue with the underlying iOS sdk. It does not return a properly formatted message so the plugin can't parse it well. This is being tracked in https://github.com/firebase/flutterfire/issues/11903

Closing from here as duplicate.

Thank you