FirebaseExtended / flutterfire_desktop

An early-stage, experimental pure-Dart implementation of Firebase SDKs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› [firebase_auth_desktop] Build fails

fbede opened this issue Β· comments

commented

Bug report

Can't build on windows

Launching lib\main.dart on Windows in debug mode...
lib\main.dart:1
../../programming%20tools/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_desktop-1.0.1/lib/firebase_auth_desktop.dart(351,16): error GE5CFE876: The method 'FirebaseAuthDesktop.verifyPhoneNumber' has fewer named arguments than those of overridden method 'FirebaseAuthPlatform.verifyPhoneNumber'. [C:\Users\FAVOUR\Documents\GitHub\fun_app\build\windows\flutter\flutter_assemble.vcxproj]
../../programming%20tools/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_desktop-1.0.1/lib/firebase_auth_desktop.dart(351,16): error GE5CFE876: The method 'FirebaseAuthDesktop.verifyPhoneNumber' doesn't have the named parameter 'multiFactorInfo' of overridden method 'FirebaseAuthPlatform.verifyPhoneNumber'. [C:\Users\FAVOUR\Documents\GitHub\fun_app\build\windows\flutter\flutter_assemble.vcxproj]
../../programming%20tools/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_desktop-1.0.1/lib/src/recaptcha_verifier.dart(59,36): error GE5CFE876: The method 'RecaptchaVerifierFactoryDesktop.delegateFor' has fewer named arguments than those of overridden method 'RecaptchaVerifierFactoryPlatform.delegateFor'. [C:\Users\FAVOUR\Documents\GitHub\fun_app\build\windows\flutter\flutter_assemble.vcxproj]
../../programming%20tools/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_desktop-1.0.1/lib/src/recaptcha_verifier.dart(59,36): error GE5CFE876: The method 'RecaptchaVerifierFactoryDesktop.delegateFor' doesn't have the named parameter 'auth' of overridden method 'RecaptchaVerifierFactoryPlatform.delegateFor'. [C:\Users\FAVOUR\Documents\GitHub\fun_app\build\windows\flutter\flutter_assemble.vcxproj]
../../programming%20tools/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_desktop-1.0.1/lib/src/firebase_auth_user.dart(17,54): error G45C924B7: Too few positional arguments: 3 required, 2 given. [C:\Users\FAVOUR\Documents\GitHub\fun_app\build\windows\flutter\flutter_assemble.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(245,5): error MSB8066: Custom build for 'C:\Users\FAVOUR\Documents\GitHub\fun_app\build\windows\CMakeFiles\b215aa22c227f7e610022ec329374abb\flutter_windows.dll.rule;C:\Users\FAVOUR\Documents\GitHub\fun_app\build\windows\CMakeFiles\6e58bebfe170a209c95a4ee91da1240d\flutter_assemble.rule' exited with code 1. [C:\Users\FAVOUR\Documents\GitHub\fun_app\build\windows\flutter\flutter_assemble.vcxproj]
Exception: Build process failed.
Exited (sigterm)

Steps to reproduce

  1. Create a new project
  2. Add the following dependencies
  firebase_auth: ^3.5.0
  firebase_auth_desktop: ^1.0.1
  firebase_core: ^1.20.0
  firebase_core_desktop: ^1.0.1
  1. Build on Windows

Expected behavior

Compile without error

Additional context

I suspect the issue might be from compatibility with firebase_auth_platform_interface as it was updated 20hours ago from the time of writing this issue. Although I don't know if what I'm about to suggest is possible, try bundling the latest versions of all the dependencies this package uses into it before publishing to pub. This would prevent flutter from pulling the latest versions (that might have breaking changes) from pub.

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.0.3, on Microsoft Windows [Version 10.0.19044.1645], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6)
[√] Android Studio (version 2020.3)
[√] VS Code (version 1.69.2)
[√] Connected device (3 available)
[√] HTTP Host Availability

β€’ No issues found!

Flutter dependencies

Dart SDK 2.17.5
Flutter SDK 3.0.3
fun_app 1.0.0+1

dependencies:
- cupertino_icons 1.0.5
- firebase_auth 3.5.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_auth_desktop 1.0.1 [desktop_webview_auth firebase_auth firebase_auth_dart firebase_auth_platform_interface firebase_core firebase_core_dart flutter meta]
- firebase_core 1.20.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_core_desktop 1.0.1 [firebase_core_dart firebase_core_platform_interface flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]

dev dependencies:
- 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 charcode collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]

transitive dependencies:
- _discoveryapis_commons 1.0.3 [http http_parser meta]
- async 2.8.2 [collection meta]
- boolean_selector 2.1.0 [source_span string_scanner]
- characters 1.2.0
- charcode 1.3.1
- clock 1.1.0
- collection 1.16.0
- crypto 3.0.2 [typed_data]
- desktop_webview_auth 0.0.9 [crypto flutter http]
- fake_async 1.3.0 [clock collection]
- file 6.1.2 [meta path]
- firebase_auth_dart 1.0.1 [firebase_core_dart firebaseapis googleapis_auth http meta storagebox]
- firebase_auth_platform_interface 6.4.0 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 4.1.0 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]       
- firebase_core_dart 1.0.1 [collection meta]
- firebase_core_platform_interface 4.5.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 1.7.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebaseapis 0.1.2 [_discoveryapis_commons http]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- googleapis_auth 1.3.1 [crypto http http_parser]
- http 0.13.4 [async http_parser meta path]
- http_parser 4.0.1 [collection source_span string_scanner typed_data]
- intl 0.17.0 [clock path]
- js 0.6.4
- lints 2.0.0
- matcher 0.12.11 [stack_trace]
- material_color_utilities 0.1.4
- meta 1.7.0
- path 1.8.1
- platform 3.1.0
- plugin_platform_interface 2.1.2 [meta]
- process 4.2.4 [file path platform]
- sky_engine 0.0.99
- source_span 1.8.2 [collection path term_glyph]
- stack_trace 1.10.0 [path]
- storagebox 0.1.0+3 [collection meta path xdg_directories]
- stream_channel 2.1.0 [async]
- string_scanner 1.1.0 [charcode source_span]
- term_glyph 1.2.0
- test_api 0.4.9 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- typed_data 1.3.1 [collection]
- vector_math 2.1.2
- xdg_directories 0.2.0+1 [meta path process]

commented

Finally got it to start working...

This is what I used in my pubspec.yaml

  firebase_auth: '3.4.1'
  firebase_auth_desktop: ^1.0.1
  firebase_auth_platform_interface: '6.3.1'
  firebase_core: ^1.19.2
  firebase_core_desktop: ^1.0.1

Notice they are older versions. I think bundling the latest versions of firebase_auth, firebase_auth_platform_interface, firebase_auth_desktop that work together into one package should prevent this from happening in future.

bundling other packages like firebase_core, firebase_core_platform_interface, firebase_core_desktop together might also prevent this from happening with them...

Have any updates on this?
@pr-Mais

I am having the same problem on android. I needed to remove the desktop libraries to be able to build for android. I don't know exactly how plugins work, but is it even supposed to use the desktop code if I am building for android.
Should I create a new issue for this or is it a duplicate?

duplicate #96