Closed graemep-nz closed 9 months ago
I can reproduce the issue using the plugin example code. See the recording below
https://github.com/firebase/flutterfire/assets/88313112/2a292241-5a0f-43e2-a3d6-61498d931f0e
As of firebase_ui_auth v1.9.1, this is no longer reproducible.
Bug report
When you sign in with username and email, the profile screen comes up. If the username field is blank (unassigned) the work "Name" is shown and the debug console shows Error: setState() or markNeedsBuild() called when widget tree was locked.
https://clipchamp.com/watch/MsVJLPKlSjE
Steps to reproduce
As above. Use the example app and firebase ui auth V1.4.2 (or 1.4.0) from pub dev This is readily reproducible, happens every single time and with multiple apps. Stack trace is attached.
Expected behavior
No error in the debug console.
Sample project
The example app from pub dev but not using pubspec_overrides.yaml as I had to run the app from outside pub cache so the relative pathnames didn't work.
Additional context
Console log stack trace
Click To Expand
``` Launching lib\main.dart on Chrome in debug mode... Waiting for connection from debug service on Chrome... This app is linked to the debug service: ws://127.0.0.1:51811/ Debug service listening on ws://127.0.0.1:51811/ Running with sound null safety Debug service listening on ws://127.0.0.1:51811/ [GSI_LOGGER-TOKEN_CLIENT]: Instantiated. Error: setState() or markNeedsBuild() called when widget tree was locked. C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49 throw_ packages/flutter/src/widgets/framework.dart 4636:9Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
``` flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.7.12, on Microsoft Windows [Version 10.0.22621.1702], locale en-NZ) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.1) [√] Android Studio (version 2022.2) [√] VS Code (version 1.78.2) [√] VS Code, 64-bit edition (version 1.77.3) [√] Connected device (3 available) [√] HTTP Host Availability • No issues found! ```Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
``` flutter pub deps -- --style=compact Dart SDK 2.19.6 Flutter SDK 3.7.12 firebase_ui_auth_example 1.0.0+1 dependencies: - cupertino_icons 1.0.5 - firebase_auth 4.6.2 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.13.1 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_ui_auth 1.4.2 [email_validator firebase_auth firebase_core firebase_dynamic_links firebase_ui_localizations firebase_ui_oauth firebase_ui_shared flutter flutter_localizations] - firebase_ui_localizations 1.5.0 [flutter flutter_localizations path] - firebase_ui_oauth 1.4.2 [desktop_webview_auth firebase_auth firebase_ui_auth firebase_ui_shared flutter_svg flutter] - firebase_ui_oauth_apple 1.2.2 [firebase_auth firebase_ui_oauth flutter] - firebase_ui_oauth_facebook 1.2.2 [firebase_auth firebase_ui_oauth flutter flutter_facebook_auth] - firebase_ui_oauth_google 1.2.2 [firebase_auth firebase_ui_oauth flutter google_sign_in] - firebase_ui_oauth_twitter 1.2.2 [flutter firebase_auth firebase_ui_oauth twitter_login] - flutter 0.0.0 [characters collection js material_color_utilities meta vector_math sky_engine] - flutter_localizations 0.0.0 [flutter intl characters clock collection js material_color_utilities meta path vector_math] dev dependencies: - drive 1.0.0-1.0.nullsafety.5 [test_api flutter_test flutter_driver stack_trace flutter] - firebase_ui_shared 1.3.0 [flutter] - flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver archive async boolean_selector characters clock collection crypto js 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 5.0.11 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web facebook_auth_desktop] - 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] - google_sign_in 6.1.3 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - http 0.13.6 [async http_parser meta] - integration_test 0.0.0 [flutter flutter_driver flutter_test path vm_service archive async boolean_selector characters clock collection crypto fake_async file js matcher material_color_utilities meta source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math webdriver] - mockito 5.4.0 [analyzer build code_builder collection dart_style matcher meta path source_gen test_api] - test 1.22.0 [analyzer async boolean_selector collection coverage http_multi_server io js node_preamble package_config path pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel typed_data web_socket_channel webkit_inspection_protocol yaml test_api test_core] - twitter_login 4.4.0 [crypto flutter http] transitive dependencies: - _fe_analyzer_shared 61.0.0 [meta] - _flutterfire_internals 1.3.2 [collection firebase_core firebase_core_platform_interface flutter meta] - analyzer 5.13.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.3.2 [crypto path] - args 2.4.1 - async 2.10.0 [collection meta] - boolean_selector 2.1.1 [source_span string_scanner] - build 2.4.0 [analyzer async convert crypto glob logging meta package_config path] - built_collection 5.1.1 - built_value 8.6.0 [built_collection collection fixnum meta] - characters 1.2.1 - clock 1.1.1 - code_builder 4.4.0 [built_collection built_value collection matcher meta] - collection 1.17.0 - convert 3.1.1 [typed_data] - coverage 1.6.3 [args logging package_config path source_maps stack_trace vm_service] - crypto 3.0.2 [typed_data] - 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 - facebook_auth_desktop 0.0.9 [flutter http flutter_secure_storage flutter_facebook_auth_platform_interface] - fake_async 1.3.1 [clock collection] - file 6.1.4 [meta path] - firebase_auth_platform_interface 6.15.2 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.5.2 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser js meta] - firebase_core_platform_interface 4.8.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.5.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_dynamic_links 5.3.2 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_dynamic_links_platform_interface 0.2.6+2 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - fixnum 1.1.0 - flutter_facebook_auth_platform_interface 4.1.1 [flutter plugin_platform_interface] - flutter_facebook_auth_web 4.1.1 [flutter flutter_web_plugins js flutter_facebook_auth_platform_interface] - flutter_secure_storage 8.0.0 [flutter flutter_secure_storage_linux flutter_secure_storage_macos flutter_secure_storage_platform_interface flutter_secure_storage_web flutter_secure_storage_windows meta] - flutter_secure_storage_linux 1.1.3 [flutter flutter_secure_storage_platform_interface] - flutter_secure_storage_macos 3.0.0 [flutter flutter_secure_storage_platform_interface] - flutter_secure_storage_platform_interface 1.0.1 [flutter plugin_platform_interface] - flutter_secure_storage_web 1.1.1 [flutter flutter_secure_storage_platform_interface flutter_web_plugins js] - flutter_secure_storage_windows 2.0.0 [flutter flutter_secure_storage_platform_interface] - flutter_svg 2.0.5 [flutter vector_graphics vector_graphics_codec vector_graphics_compiler] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - frontend_server_client 3.2.0 [async path] - fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform] - glob 2.1.2 [async collection file path string_scanner] - google_identity_services_web 0.2.1 [js meta] - google_sign_in_android 6.1.14 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.6.2 [flutter google_sign_in_platform_interface] - google_sign_in_platform_interface 2.4.1 [flutter plugin_platform_interface quiver] - google_sign_in_web 0.12.0+1 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http js] - http_multi_server 3.2.1 [async] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - intl 0.17.0 [clock path] - io 1.0.4 [meta path string_scanner] - js 0.6.5 [meta] - lints 2.0.1 - logging 1.2.0 - matcher 0.12.13 [meta stack_trace] - material_color_utilities 0.2.0 - meta 1.8.0 - mime 1.0.4 - node_preamble 2.0.2 - package_config 2.1.0 [path] - path 1.8.2 - path_parsing 1.0.1 [vector_math meta] - petitparser 5.1.0 [meta] - platform 3.1.0 - plugin_platform_interface 2.1.4 [meta] - pool 1.5.1 [async stack_trace] - process 4.2.4 [file path platform] - pub_semver 2.1.4 [collection meta] - quiver 3.2.1 [matcher] - shelf 1.4.1 [async collection http_parser path stack_trace stream_channel] - shelf_packages_handler 3.0.2 [path shelf shelf_static] - shelf_static 1.1.2 [convert http_parser mime path shelf] - shelf_web_socket 1.0.4 [shelf stream_channel web_socket_channel] - sky_engine 0.0.99 - source_gen 1.3.2 [analyzer async build dart_style glob path source_span yaml] - source_map_stack_trace 2.1.1 [path source_maps stack_trace] - source_maps 0.10.12 [source_span] - source_span 1.9.1 [collection path term_glyph] - stack_trace 1.11.0 [path] - stream_channel 2.1.1 [async] - string_scanner 1.2.0 [source_span] - sync_http 0.3.1 - 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] - test_core 0.4.20 [analyzer async args boolean_selector collection coverage frontend_server_client glob io meta package_config path pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api] - typed_data 1.3.1 [collection] - vector_graphics 1.1.5 [flutter vector_graphics_codec] - vector_graphics_codec 1.1.5 - vector_graphics_compiler 1.1.5 [args meta path_parsing xml vector_graphics_codec] - vector_math 2.1.4 - vm_service 9.4.0 - watcher 1.0.2 [async path] - web_socket_channel 2.4.0 [async crypto stream_channel] - webdriver 3.0.1 [archive matcher path stack_trace sync_http] - webkit_inspection_protocol 1.2.0 [logging] - xml 6.2.2 [collection meta petitparser] - yaml 3.1.2 [collection source_span string_scanner] PS C:\GP\project\bridge_app\ui-auth-example\example> ```stacktrace.txt