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.68k stars 3.97k forks source link

πŸ› [firebase auth ui] Firebase auth ui and go_router #10924

Closed launis closed 1 year ago

launis commented 1 year ago

Bug report

Firebase UI auth does not work well with go_router. Cancel buttons create error "You have popped the last page off of the stack, there are no pages left to show". The file ForgotPasswordScreen has Navigator.pop(context) and it does not return to previous screen.

Also now when using delete account in profile screen, that ends with error ChromeProxyService: Failed to evaluate expression 'util': InternalError: Expression evaluation in async frames is not supported. No frame with index 16. ChromeProxyService: Also sometimes the following error pops up Failed to evaluate expression 'TickerCanceled': InternalError: Expression evaluation in async frames is not supported. No frame with index 14

Also sometimes after user verification following errors occur ChromeProxyService: Failed to evaluate expression 'handler': InternalError: Expression evaluation in async frames is not supported. No frame with index 14.. ChromeProxyService: Failed to evaluate expression 'when': InternalError: Expression evaluation in async frames is not supported. No frame with index 14.

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to SignIn
  2. Select Forgotten password
  3. Select Go back
  4. See error or incorrect behavior

Expected behavior

Comes back to signin screen

Steps to reproduce the behavior:

  1. Go to SignIn
  2. Sign in
  3. In profile screen select delete account
  4. See error or incorrect behavior

Expected behavior

Deletes account and returns to signin screen

Sample project

https://github.com/launis/firebaseuiauth

Additional context

Add any other context about the problem here.


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` PS C:\Users\risto\Documents\flutter\firebaseuiauth> flutter doctor -v [√] Flutter (Channel stable, 3.7.12, on Microsoft Windows [Version 10.0.22621.1635], locale fi-FI) β€’ Flutter version 3.7.12 on channel stable at C:\src\flutter β€’ Upstream repository https://github.com/flutter/flutter.git β€’ Framework revision 4d9e56e694 (3 weeks ago), 2023-04-17 21:47:46 -0400 β€’ Engine revision 1a65d409c7 β€’ Dart version 2.19.6 β€’ DevTools version 2.20.1 [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.1) β€’ Android SDK at C:\Users\risto\AppData\Local\Android\sdk β€’ Platform android-33, build-tools 33.0.1 β€’ Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java β€’ Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) β€’ All Android licenses accepted. [√] Chrome - develop for the web β€’ Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.5.5) β€’ Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community β€’ Visual Studio Community 2022 version 17.5.33627.172 β€’ Windows 10 SDK version 10.0.19041.0 [√] Android Studio (version 2021.3) β€’ Android Studio at C:\Program Files\Android\Android Studio β€’ 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 11.0.13+0-b1751.21-8125866) [√] VS Code (version 1.78.0) β€’ VS Code at C:\Users\risto\AppData\Local\Programs\Microsoft VS Code β€’ Flutter extension version 3.54.0 [√] Connected device (4 available) β€’ sdk gphone64 x86 64 (mobile) β€’ emulator-5554 β€’ android-x64 β€’ Android 13 (API 33) (emulator) β€’ Windows (desktop) β€’ windows β€’ windows-x64 β€’ Microsoft Windows [Version 10.0.22621.1635] β€’ Chrome (web) β€’ chrome β€’ web-javascript β€’ Google Chrome 113.0.5672.64 β€’ Edge (web) β€’ edge β€’ web-javascript β€’ Microsoft Edge 112.0.1722.68 [√] HTTP Host Availability β€’ All required HTTP hosts are available β€’ No issues found!

Flutter dependencies

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

Click To Expand ``` Dart SDK 2.19.6 Flutter SDK 3.7.12 firebaseui 1.0.0+1 dependencies: - cloud_firestore 4.6.0 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cupertino_icons 1.0.5 - firebase_auth 4.5.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.11.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_ui_auth 1.3.0 [email_validator firebase_auth firebase_core firebase_dynamic_links firebase_ui_localizations firebase_ui_oauth firebase_ui_shared flutter flutter_localizations flutter_svg] - firebase_ui_firestore 1.4.0 [cloud_firestore firebase_ui_localizations flutter] - flutter 0.0.0 [characters collection js material_color_utilities meta vector_math sky_engine] - flutter_adaptive_scaffold 0.1.3 [flutter] - flutter_riverpod 2.3.6 [collection flutter meta riverpod state_notifier] - freezed_annotation 2.2.0 [collection json_annotation meta] - go_router 7.0.0 [collection flutter flutter_web_plugins logging meta] - intl 0.17.0 [clock path] - riverpod_annotation 2.1.1 [meta riverpod] dev dependencies: - build_runner 2.3.3 [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_lints 2.0.1 [lints] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection js matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] - freezed 2.3.3 [analyzer build build_config collection meta source_gen freezed_annotation json_annotation] - go_router_builder 2.0.0 [analyzer async build build_config collection meta path path_to_regexp source_gen source_helper] - json_serializable 6.6.2 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper] - riverpod_generator 2.2.1 [analyzer build build_config collection crypto meta path riverpod_analyzer_utils riverpod_annotation source_gen] - riverpod_lint 1.3.1 [analyzer analyzer_plugin collection custom_lint_builder meta path riverpod riverpod_analyzer_utils source_span yaml] transitive dependencies: - _fe_analyzer_shared 58.0.0 [meta] - _flutterfire_internals 1.2.0 [collection firebase_core firebase_core_platform_interface flutter meta] - analyzer 5.10.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - analyzer_plugin 0.11.2 [analyzer collection dart_style pub_semver yaml] - args 2.4.1 - async 2.10.0 [collection meta] - boolean_selector 2.1.1 [source_span string_scanner] - build 2.3.1 [analyzer async convert crypto glob logging meta path] - build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml] - build_daemon 3.1.1 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.2.0 [analyzer async build collection crypto graphs logging path package_config pool pub_semver stream_transform yaml] - build_runner_core 7.2.7 [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.5.0 [built_collection collection fixnum meta] - characters 1.2.1 - checked_yaml 2.0.3 [json_annotation source_span yaml] - ci 0.1.0 - cli_util 0.4.0 [meta path] - clock 1.1.1 - cloud_firestore_platform_interface 5.13.0 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 3.4.3 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - code_builder 4.4.0 [built_collection built_value collection matcher meta] - collection 1.17.0 - convert 3.1.1 [typed_data] - crypto 3.0.3 [typed_data] - custom_lint 0.3.4 [analyzer analyzer_plugin args async ci cli_util collection freezed_annotation json_annotation meta package_config path pub_semver pubspec_parse rxdart uuid yaml] - custom_lint_builder 0.3.4 [analyzer analyzer_plugin collection custom_lint custom_lint_core glob hotreloader meta path pubspec_parse rxdart] - custom_lint_core 0.3.4 [analyzer analyzer_plugin collection custom_lint matcher meta path pubspec_parse source_span yaml] - dart_style 2.3.1 [analyzer args path pub_semver source_span] - desktop_webview_auth 0.0.12 [crypto flutter http flutter_web_plugins plugin_platform_interface] - email_validator 2.1.17 - fake_async 1.3.1 [clock collection] - file 6.1.4 [meta path] - firebase_auth_platform_interface 6.14.0 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.4.0 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.7.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.4.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_dynamic_links 5.2.0 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_dynamic_links_platform_interface 0.2.5 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_ui_localizations 1.4.0 [flutter flutter_localizations path] - firebase_ui_oauth 1.3.0 [desktop_webview_auth firebase_auth firebase_ui_auth firebase_ui_shared flutter_svg flutter] - firebase_ui_shared 1.2.0 [flutter] - fixnum 1.1.0 - flutter_localizations 0.0.0 [flutter intl characters clock collection js material_color_utilities meta path vector_math] - flutter_svg 1.1.6 [flutter meta path_drawing vector_math xml] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - frontend_server_client 3.2.0 [async path] - glob 2.1.1 [async collection file path string_scanner] - graphs 2.2.0 [collection] - hotreloader 3.0.6 [collection logging path stream_transform vm_service watcher] - http 0.13.6 [async http_parser meta] - http_multi_server 3.2.1 [async] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - io 1.0.4 [meta path string_scanner] - js 0.6.5 [meta] - json_annotation 4.8.1 [meta] - lints 2.0.1 - logging 1.1.1 - matcher 0.12.13 [meta stack_trace] - material_color_utilities 0.2.0 - meta 1.8.0 - mime 1.0.4 - package_config 2.1.0 [path] - path 1.8.2 - path_drawing 1.0.1 [vector_math meta path_parsing flutter] - path_parsing 1.0.1 [vector_math meta] - path_to_regexp 0.4.0 - petitparser 5.1.0 [meta] - plugin_platform_interface 2.1.4 [meta] - pool 1.5.1 [async stack_trace] - pub_semver 2.1.4 [collection meta] - pubspec_parse 1.2.3 [checked_yaml collection json_annotation pub_semver yaml] - riverpod 2.3.6 [meta stack_trace state_notifier] - riverpod_analyzer_utils 0.3.0 [analyzer collection crypto custom_lint_core freezed_annotation meta path source_span] - rxdart 0.27.7 - 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.3.0 [analyzer async build dart_style glob path source_span yaml] - source_helper 1.3.3 [analyzer collection source_gen] - source_span 1.9.1 [collection path term_glyph] - stack_trace 1.11.0 [path] - state_notifier 0.7.2+1 [meta] - stream_channel 2.1.1 [async] - stream_transform 2.1.0 - string_scanner 1.2.0 [source_span] - term_glyph 1.2.1 - test_api 0.4.16 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - timing 1.0.1 [json_annotation] - typed_data 1.3.1 [collection] - uuid 3.0.7 [crypto] - vector_math 2.1.4 - vm_service 11.5.0 - watcher 1.0.2 [async path] - web_socket_channel 2.4.0 [async crypto stream_channel] - xml 6.2.2 [collection meta petitparser] - yaml 3.1.2 [collection source_span string_scanner] ```

launis commented 1 year ago

[firebase auth ui] Error reported in console when verifying email address using web app firebase/FirebaseUI-Flutter#20 might report a similar issue

darshankawar commented 1 year ago

Firebase UI auth does not work well with go_router. Cancel buttons create error "You have popped the last page off of the stack, there are no pages left to show". The file ForgotPasswordScreen has Navigator.pop(context) and it does not return to previous screen.

Also now when using delete account in profile screen, that ends with error ChromeProxyService: Failed to evaluate expression 'util': InternalError: Expression evaluation in async frames is not supported. No frame with index 16. ChromeProxyService: Also sometimes the following error pops up Failed to evaluate expression 'TickerCanceled': InternalError: Expression evaluation in async frames is not supported. No frame with index 14

Also sometimes after user verification following errors occur ChromeProxyService: Failed to evaluate expression 'handler': InternalError: Expression evaluation in async frames is not supported. No frame with index 14.. ChromeProxyService: Failed to evaluate expression 'when': InternalError: Expression evaluation in async frames is not supported. No frame with index 14.

@launis These look like separate issues so I suggest you to file separate issue for these scenarios.

Coming back to your original issue, I looked at the repo you shared and it seems to have third party package implementation such as flutter_riverpod and others. In order to properly analyze and narrow down the behavior only to firebase_ui_auth and go_router, I suggest you to trim down code sample to minimal and without any third party packages to confirm that the behavior is specific to only these two plugin usage and implementation.

google-oss-bot commented 1 year ago

Hey @launis. 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!

diver2 commented 1 year ago

@darshankawar I know it is frustrating for you, but I've just run here with this error ChromeProxyService: Failed to evaluate expression 'xxxx': InternalError: Expression evaluation in async frames is not supported. No frame with index 63.. (many different 'xxxx' already popped up, it's a whack a mole, I change something, it pops somewhere else) I will try to create something narrow, but please, don't just kill the bug (nor here, nor in flutter). There is something, let's try to find out what. Best

google-oss-bot commented 1 year ago

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

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

darshankawar commented 1 year ago

@diver2 Can you take a look at https://github.com/flutter/flutter/issues/121798 and see if it helps in your case ?