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.44k stars 3.91k forks source link

[firebase_auth]: [firebase_auth/unknown-error] An internal error has occurred. (when calling signinwithemailandpassword on windows) #12725

Open Justus-M opened 2 weeks ago

Justus-M commented 2 weeks ago

Is there an existing issue for this?

Which plugins are affected?

Auth

Which platforms are affected?

Windows

Description

When logging in on windows using signInWithEmailAndPassword, some users face the following error: "[firebase_auth/unknown-error] An internal error has occurred."

This only seems to happen on corporate networks, so I imagine it has something to do with their system settings or the network configs, proxies, or certain requests being blocked.

One group of users had the issue on Windows 11 Enterprise, but I was able to run it successfully on the same OS. Another user had it on Windows 10 Pro, so I don't think it has anything to do with the version of windows.

The application does have an internet connection though, which I know because sentry and firestore are able to log these errors without any issues.

Unfortunately the error message is completely useless because it is so vague, and we have now lost 2 bigger customers because of this.

Reproducing the issue

I am not able to reproduce the issue as the common thread seems to be that the users are on corporate networks. I have tried using the same OS as one of the users who faced this error (windows 11 Enterprise), but was able to run it successfully. Firestore also seems to be working.

Here's what I know: Flutter 3.19.1 firebase_core: ^2.29.0 firebase_auth: ^4.19.1

OS is windows (one user on windows 11 enterprise and one on windows 10 pro)

Error occurs when running FirebaseAuth.instance.signInWithEmailAndPassword

I know the code is fine because it works fine for the vast majority of users, and the same users that have the error are able to log on with other devices/networks.

Firebase Core version

2.29.0

Flutter Version

3.19.1

Relevant Log Output

Error:
[firebase_auth/unknown-error] An internal error has occurred.

Stacktrace:
messages.pigeon.dart in FirebaseAuthHostApi.signInWithEmailAndPassword at line 1135 within firebase_auth_platform_interface
In App
Called from: <asynchronous suspension>
method_channel_firebase_auth.dart in MethodChannelFirebaseAuth.signInWithEmailAndPassword at line 333 within firebase_auth_platform_interface
In App
Called from: <asynchronous suspension>
firebase_auth.dart in FirebaseAuth.signInWithEmailAndPassword at line 613 within firebase_auth
In App
Called from: <asynchronous suspension>

Flutter dependencies

Expand Flutter dependencies snippet
```yaml Dart SDK 3.3.0 Flutter SDK 3.19.1 query_composer 1.7.90+75 dependencies: - auto_animated 3.2.0 [flutter visibility_detector] - auto_updater 0.1.7 [flutter path] - cloud_firestore 4.16.1 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - code_text_field 1.1.1 [flutter linked_scroll_controller highlight flutter_highlight] - csv 5.1.1 - cupertino_icons 1.0.6 - data_table_2 2.5.11 [flutter async] - device_info_plus 9.1.2 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta win32 win32_registry] - easy_stepper 0.8.3 [flutter lottie] - file_picker 6.1.1 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32] - file_saver 0.2.11 [flutter flutter_web_plugins path_provider path_provider_windows path_provider_linux dio] - firebase_analytics 10.10.1 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 4.19.1 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.29.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_storage 11.7.1 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - flutalchemy 0.0.1 [flutter retry uuid] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_acrylic 1.1.3 [macos_window_utils flutter] - flutter_colorpicker 1.0.3 [flutter] - flutter_html 3.0.0-beta.2 [html csslib collection list_counter flutter] - flutter_native_splash 2.3.10 [args flutter flutter_web_plugins js html image meta path universal_io xml yaml ansicolor] - flutter_riverpod 2.4.10 [collection flutter meta riverpod state_notifier] - flutter_smart_dialog 4.9.6 [flutter] - flutter_spinkit 5.2.0 [flutter] - google_sign_in 6.2.1 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - google_sign_in_dartio 0.3.0 [flutter google_sign_in google_sign_in_platform_interface shared_preferences shared_preferences_foundation shared_preferences_linux url_launcher url_launcher_macos crypto http html_unescape] - googleapis 11.4.0 [_discoveryapis_commons http] - googleapis_auth 1.4.2 [args crypto google_identity_services_web http http_parser] - graphic 2.2.1 [collection flutter vector_math path_drawing] - hive 2.2.3 [meta crypto] - http 1.2.1 [async http_parser meta web] - intl 0.18.1 [clock meta path] - js 0.6.7 [meta] - loading_animation_widget 1.2.0+4 [flutter] - media_kit 1.1.10+1 [meta path image uri_parser collection synchronized uuid http safe_local_storage universal_platform js] - media_kit_libs_macos_video 1.1.4 [flutter plugin_platform_interface] - media_kit_libs_windows_video 1.0.9 [flutter] - media_kit_native_event_loop 1.0.8 [flutter] - media_kit_video 1.2.4 [flutter media_kit synchronized wakelock_plus screen_brightness volume_controller universal_platform plugin_platform_interface] - package_info_plus 4.2.0 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface win32] - path_provider 2.1.2 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - pluto_grid_plus 8.3.0 [flutter intl rxdart collection] - reorderables 0.6.0 [flutter] - sentry_flutter 7.16.1 [flutter flutter_web_plugins sentry package_info_plus meta ffi] - share_plus 7.2.2 [cross_file meta mime flutter flutter_web_plugins share_plus_platform_interface file url_launcher_web url_launcher_windows url_launcher_linux url_launcher_platform_interface ffi win32] - 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] - simple_gradient_text 1.3.0 [flutter] - sqlite3 2.4.0 [collection ffi js meta path] - stack_trace 1.11.1 [path] - super_tooltip 2.0.7 [flutter] - syncfusion_flutter_charts 23.2.7 [flutter intl vector_math syncfusion_flutter_core] - syncfusion_flutter_sliders 23.2.7 [flutter intl syncfusion_flutter_core] - universal_html 2.2.4 [async csslib charcode collection html meta source_span typed_data universal_io] - url_launcher 6.2.5 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] - visibility_detector 0.4.0+2 [flutter] - widgets_to_image 0.0.2 [flutter] - window_manager 0.3.8 [flutter path screen_retriever] dev dependencies: - flutter_launcher_icons 0.13.1 [args checked_yaml cli_util image json_annotation path yaml] - flutter_lints 2.0.3 [lints] - flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service] - integration_test 0.0.0 [flutter flutter_driver flutter_test path vm_service async boolean_selector characters clock collection fake_async file leak_tracker leak_tracker_flutter_testing leak_tracker_testing matcher material_color_utilities meta source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api vector_math webdriver] transitive dependencies: - _discoveryapis_commons 1.0.6 [http http_parser meta] - _flutterfire_internals 1.3.29 [collection firebase_core firebase_core_platform_interface flutter meta] - ansicolor 2.0.2 - archive 3.4.10 [crypto path pointycastle] - args 2.4.2 - async 2.11.0 [collection meta] - boolean_selector 2.1.1 [source_span string_scanner] - characters 1.3.0 - charcode 1.3.1 - 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.13 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 3.11.1 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins] - collection 1.18.0 - convert 3.1.1 [typed_data] - cross_file 0.3.4+1 [meta web] - crypto 3.0.3 [typed_data] - csslib 0.17.3 [source_span] - dbus 0.7.10 [args ffi meta xml] - device_info_plus_platform_interface 7.0.0 [flutter meta plugin_platform_interface] - dio 5.4.1 [async http_parser meta path] - fake_async 1.3.1 [clock collection] - ffi 2.1.2 - file 7.0.0 [meta path] - firebase_analytics_platform_interface 3.10.2 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.5.7+1 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins] - firebase_auth_platform_interface 7.2.2 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.11.1 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web] - firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.15.0 [firebase_core_platform_interface flutter flutter_web_plugins meta web] - firebase_storage_platform_interface 5.1.16 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.9.1 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http meta web] - flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver async boolean_selector characters clock collection leak_tracker leak_tracker_flutter_testing leak_tracker_testing matcher material_color_utilities platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api vector_math] - flutter_highlight 0.7.0 [flutter highlight] - flutter_plugin_android_lifecycle 2.0.17 [flutter] - flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math] - fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform] - google_identity_services_web 0.3.1+1 [meta web] - google_sign_in_android 6.1.21 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.7.4 [flutter google_sign_in_platform_interface] - google_sign_in_platform_interface 2.4.5 [flutter plugin_platform_interface] - google_sign_in_web 0.12.3+3 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http web] - highlight 0.7.0 [collection] - html 0.15.4 [csslib source_span] - html_unescape 2.0.0 - http_parser 4.0.2 [collection source_span string_scanner typed_data] - image 4.1.7 [archive meta xml] - json_annotation 4.8.1 [meta] - leak_tracker 10.0.0 [clock collection meta path vm_service] - leak_tracker_flutter_testing 2.0.1 [flutter leak_tracker leak_tracker_testing matcher meta] - leak_tracker_testing 2.0.1 [leak_tracker matcher meta] - linked_scroll_controller 0.2.0 [flutter] - lints 2.1.1 - list_counter 1.0.2 - lottie 2.7.0 [archive flutter path vector_math] - macos_window_utils 1.5.0 [flutter] - matcher 0.12.16+1 [async meta stack_trace term_glyph test_api] - material_color_utilities 0.8.0 [collection] - meta 1.11.0 - mime 1.0.5 - package_info_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - path 1.9.0 - path_drawing 1.0.1 [vector_math meta path_parsing flutter] - path_parsing 1.0.1 [vector_math meta] - path_provider_android 2.2.2 [flutter path_provider_platform_interface] - path_provider_foundation 2.3.2 [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.2 [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.4 - plugin_platform_interface 2.1.8 [meta] - pointycastle 3.7.4 [collection convert js] - process 5.0.2 [file path platform] - retry 3.1.2 - riverpod 2.5.0 [meta stack_trace state_notifier] - rxdart 0.27.7 - safe_local_storage 1.0.2 [path synchronized] - screen_brightness 0.2.2+1 [flutter screen_brightness_platform_interface screen_brightness_android screen_brightness_ios screen_brightness_macos screen_brightness_windows] - screen_brightness_android 0.1.0+2 [flutter screen_brightness_platform_interface] - screen_brightness_ios 0.1.0 [flutter screen_brightness_platform_interface] - screen_brightness_macos 0.1.0+1 [flutter screen_brightness_platform_interface] - screen_brightness_platform_interface 0.1.0 [flutter plugin_platform_interface] - screen_brightness_windows 0.1.3 [flutter screen_brightness_platform_interface] - screen_retriever 0.1.9 [flutter] - sentry 7.16.1 [http meta stack_trace uuid] - share_plus_platform_interface 3.3.1 [cross_file flutter meta mime plugin_platform_interface path_provider uuid] - shared_preferences_android 2.2.1 [flutter shared_preferences_platform_interface] - shared_preferences_foundation 2.3.5 [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.2 [flutter plugin_platform_interface] - shared_preferences_web 2.3.0 [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] - sky_engine 0.0.99 - source_span 1.10.0 [collection path term_glyph] - state_notifier 1.0.0 [meta] - stream_channel 2.1.2 [async] - string_scanner 1.2.0 [source_span] - sync_http 0.3.1 - syncfusion_flutter_core 23.2.7 [vector_math flutter] - synchronized 3.1.0+1 - 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] - typed_data 1.3.2 [collection] - universal_io 2.2.2 [collection meta typed_data] - universal_platform 1.0.0+1 - uri_parser 2.0.2 [path safe_local_storage] - url_launcher_android 6.3.0 [flutter url_launcher_platform_interface] - url_launcher_ios 6.2.5 [flutter url_launcher_platform_interface] - url_launcher_linux 3.1.1 [flutter url_launcher_platform_interface] - url_launcher_macos 3.1.0 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface] - url_launcher_web 2.3.0 [flutter flutter_web_plugins url_launcher_platform_interface web] - url_launcher_windows 3.1.1 [flutter url_launcher_platform_interface] - uuid 3.0.7 [crypto] - vector_math 2.1.4 - vm_service 13.0.0 - volume_controller 2.0.7 [flutter] - wakelock_plus 1.1.4 [flutter flutter_web_plugins meta wakelock_plus_platform_interface win32 dbus package_info_plus js] - wakelock_plus_platform_interface 1.1.0 [flutter plugin_platform_interface meta] - web 0.5.1 - webdriver 3.0.3 [matcher path stack_trace sync_http] - win32 5.2.0 [ffi] - win32_registry 1.1.2 [ffi win32] - xdg_directories 1.0.4 [meta path] - xml 6.5.0 [collection meta petitparser] - yaml 3.1.2 [collection source_span string_scanner] ```

Additional context and comments

No response

Justus-M commented 2 weeks ago

UPDATE: I just got confirmation that it is network related. The same user was able to connect when using a VPN. It is Firebase Auth specific though, because Firestore and Sentry still work as mentioned.

alkseiPV commented 2 weeks ago

I get the same error, but the network is individual, not corporate. vpn does not help, the application has access to the Internet, other APIs are working fine flutter : 3.16.0, firebase_auth: ^4.19.4 firebase_core: ^2.29.0

Lyokone commented 1 week ago

Hello @Justus-M, thanks for reaching out, I couldn't reproduce the issue on our end with our example app. Could you provide a reproducible sample so I can have a look?

Justus-M commented 1 week ago

Hi @Lyokone, thanks for your reply!

Apologies if it wasn't clear from my post, but I am not able to provide a reproducible example as it only happens on certain networks (it was reported by 3 of my customers). There is nothing special about the code, it happens on any call of signInWithEmailAndPassword (and probably any other Firebase Auth network calls).

@alkseiPV is able to reproduce it since it happens on his network.

@Lyokone is there any troubleshooting or log checking/printing @alkseiPV can do to provide more valuable information?

Justus-M commented 1 week ago

@alkseiPV Do you know if you have the same issue building the app on macOS and then using it on the same network?

If you can get your hands on macOS and test this would help determine if the issue is with the C++ SDK (windows specific) or a more general issue.

alkseiPV commented 1 week ago

@Justus-M I didn't have time to wait, I went to another instrument, sorry

Justus-M commented 1 week ago

@alkseiPV Do you have a mac? It would be really helpful if you could take 5 minutes to test this. I could even pay

You can download my app and try to create an account with email and password https://www.blazesql.com/download

alkseiPV commented 1 week ago

@Justus-M I successfully registered and reached the moment of connecting the database. so the problem is in the Windows library. By the way, a nice interface

Justus-M commented 1 week ago

Thanks so much for taking the time @alkseiPV and for the nice feedback.

@Lyokone There you have it, it appears to be windows specific.

Justus-M commented 1 week ago

@Lyokone Additionally, one of my customers said their network engineer found the issue, and it was something related to a token related to the following URL being blocked: "securetoken.googleapis.com"

I hope that helps