Skip to content

🐛 [FIREBASE_CORE_WEB]/[FIREBASE_AUTH_WEB] The argument type 'Future<void> Function()' can't be assigned to the parameter type 'Future<void> Function(App)?' #10586

Closed
@phaylali

Description

@phaylali

Bug report

Debugging a flutter app on the web, that uses firebase_core_web fails to run

Steps to reproduce

Steps to reproduce the behavior:

firebase_core_web and firebase_firebase_auth_web
are usually conflicting with flutter_localizations since it is depending on intl 0.18 but those firebase packages reverted to intl: 0.17

there is a lot of problems with the latest releases

Expected behavior

to just work

Sample project

Providing a minimal example project which demonstrates the bug in isolation from your main App greatly enhances the chance of a timely fix.
Please link to the public repository URL.


Additional context

Launching lib\main.dart on Chrome in debug mode...
main.dart:1
: Error: The argument type 'Future<void> Function()' can't be assigned to the parameter type 'Future<void> Function(App)?'.
firebase_auth_web.dart:92
 - 'Future' is from 'dart:async'.
- 'App' is from 'package:firebase_core_web/src/interop/app.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/firebase_core_web-2.2.2/lib/src/interop/app.dart').
app.dart:1
    FirebaseCoreWeb.registerService('auth', () async {
                                            ^

Failed to compile application.
Exited (sigterm)

Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 3.9.0-1.0.pre.115, on Microsoft Windows [Version 10.0.22621.1344], locale en-GB)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.3)
[!] Android Studio (version 2021.2)
    X Unable to determine bundled Java version.
[√] Android Studio (version 2022.1)
[√] VS Code (version 1.76.1)
[√] Connected device (3 available)
[√] Network resources

! Doctor found issues in 1 category.
PS C:\Users\elfai\Documents\APPS\admin> flutter doctor -v 
[√] Flutter (Channel master, 3.9.0-1.0.pre.115, on Microsoft Windows [Version 10.0.22621.1344], locale en-GB)
    • Flutter version 3.9.0-1.0.pre.115 on channel master at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision eb3d317ea0 (2 days ago), 2023-03-08 16:52:05 -0800
    • Engine revision 098fd5884e
    • Dart version 3.0.0 (build 3.0.0-311.0.dev)
    • DevTools version 2.22.2

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at C:\Users\elfai\AppData\Local\Android\Sdk
    • Platform android-33, build-tools 33.0.2
    • Java binary at: C:\Users\elfai\.jdks\openjdk-19.0.2\bin\java
    • Java version OpenJDK Runtime Environment (build 19.0.2+7-44)
    • 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.3.3)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.3.32825.248
    • Windows 10 SDK version 10.0.19041.0

[!] Android Studio (version 2021.2)
    • 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
    X Unable to determine bundled Java version.
    • Try updating or re-installing Android Studio.

[√] Android Studio (version 2022.1)
    • Android Studio at C:\Users\elfai\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\221.6008.13.2211.9619390
    • Flutter plugin version 72.1.2
    • Dart plugin version 221.6096
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)

[√] VS Code (version 1.76.1)
    • VS Code at C:\Users\elfai\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.60.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22621.1344]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 111.0.5563.64
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 110.0.1587.63

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Flutter dependencies

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

Click To Expand

Dart SDK 3.0.0-311.0.dev
Flutter SDK 3.9.0-1.0.pre.115
admin 1.0.0+1

dependencies:
- cloud_firestore 4.4.4 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- country_flags 1.1.0 [flutter flutter_svg]
- equatable 2.0.5 [collection meta]
- firebase_auth 4.2.2 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 2.7.1 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_core_web 2.2.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- flex_color_scheme 7.0.0-dev.2 [flex_seed_scheme flutter meta]
- flutter 0.0.0 [characters collection js material_color_utilities meta vector_math sky_engine]
- flutter_date_pickers 0.4.1 [flutter intl flutter_localizations]
- flutter_localizations 0.0.0 [flutter intl characters clock collection js material_color_utilities meta path vector_math]
- flutter_riverpod 2.3.1 [collection flutter meta riverpod state_notifier]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- freezed 2.3.2 [analyzer build build_config collection meta source_gen freezed_annotation json_annotation]
- go_router 6.2.0 [collection flutter flutter_web_plugins logging meta]
- google_fonts 4.0.3 [flutter http path_provider crypto]
- hooks_riverpod 2.3.1 [collection flutter flutter_hooks flutter_riverpod riverpod state_notifier]
- intl 0.18.0 [clock meta path]
- pdf 3.9.0 [archive barcode bidi crypto image meta path_parsing vector_math xml]
- printing 5.10.1 [ffi flutter flutter_web_plugins http image js meta pdf plugin_platform_interface]
- share_plus 6.3.1 [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.0.18 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]       
- unicons 2.1.0 [flutter]

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 collection js matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]

transitive dependencies:
- _fe_analyzer_shared 55.0.0 [meta]
- _flutterfire_internals 1.0.17 [collection firebase_core firebase_core_platform_interface flutter meta]
- analyzer 5.7.1 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- archive 3.3.6 [crypto path pointycastle]
- args 2.4.0
- async 2.10.0 [collection meta]
- barcode 2.2.3 [meta qr]
- bidi 2.0.6
- 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]
- characters 1.3.0
- checked_yaml 2.0.2 [json_annotation source_span yaml]
- clock 1.1.1
- cloud_firestore_platform_interface 5.11.4 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 3.3.4 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js]
- collection 1.17.1
- convert 3.1.1 [typed_data]
- cross_file 0.3.3+4 [js meta]
- crypto 3.0.2 [typed_data]
- dart_style 2.2.5 [analyzer args path pub_semver source_span]
- fake_async 1.3.1 [clock collection]
- ffi 2.0.1
- file 6.1.4 [meta path]
- firebase_auth_platform_interface 6.11.12 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 5.2.2 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.5.3 [collection flutter flutter_test meta plugin_platform_interface]
- flex_seed_scheme 1.2.2 [flutter material_color_utilities meta]
- flutter_hooks 0.18.6 [flutter]
- flutter_svg 2.0.3 [flutter vector_graphics vector_graphics_codec vector_graphics_compiler]
- freezed_annotation 2.2.0 [collection json_annotation meta]
- glob 2.1.1 [async collection file path string_scanner]
- http 0.13.5 [async http_parser meta path]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- image 4.0.15 [archive meta xml]
- js 0.6.7 [meta]
- json_annotation 4.8.0 [meta]
- lints 2.0.1
- logging 1.1.1
- matcher 0.12.14 [meta stack_trace]
- material_color_utilities 0.2.0
- meta 1.9.0
- mime 1.0.4
- package_config 2.1.0 [path]
- path 1.8.3
- path_parsing 1.0.1 [vector_math meta]
- path_provider 2.0.13 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows]
- path_provider_android 2.0.24 [flutter path_provider_platform_interface]
- path_provider_foundation 2.1.3 [flutter path_provider_platform_interface]
- path_provider_linux 2.1.10 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_platform_interface 2.0.6 [flutter platform plugin_platform_interface]
- path_provider_windows 2.1.5 [ffi flutter path path_provider_platform_interface win32]
- petitparser 5.3.0 [meta]
- platform 3.1.0
- plugin_platform_interface 2.1.4 [meta]
- pointycastle 3.6.2 [collection convert js]
- process 4.2.4 [file path platform]
- pub_semver 2.1.3 [collection meta]
- pubspec_parse 1.2.2 [checked_yaml collection json_annotation pub_semver yaml]
- qr 3.0.1 [meta]
- riverpod 2.3.1 [collection meta stack_trace state_notifier]
- share_plus_platform_interface 3.2.0 [cross_file flutter meta mime plugin_platform_interface path_provider uuid]
- shared_preferences_android 2.0.17 [flutter shared_preferences_platform_interface]
- shared_preferences_foundation 2.1.5 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.1.5 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.1.1 [flutter plugin_platform_interface]
- shared_preferences_web 2.0.6 [flutter flutter_web_plugins shared_preferences_platform_interface]
- shared_preferences_windows 2.1.5 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- sky_engine 0.0.99
- source_gen 1.2.7 [analyzer async build dart_style glob path source_span yaml]
- 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]
- string_scanner 1.2.0 [source_span]
- term_glyph 1.2.1
- test_api 0.4.18 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- typed_data 1.3.1 [collection]
- url_launcher_linux 3.0.4 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.1.2 [flutter plugin_platform_interface]
- url_launcher_web 2.0.16 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.5 [flutter url_launcher_platform_interface]
- uuid 3.0.7 [crypto]
- vector_graphics 1.1.3 [flutter vector_graphics_codec]
- vector_graphics_codec 1.1.3
- vector_graphics_compiler 1.1.3 [args meta path_parsing xml vector_graphics_codec]
- vector_math 2.1.4
- watcher 1.0.2 [async path]
- win32 3.1.3 [ffi]
- xdg_directories 1.0.0 [meta path process]
- xml 6.2.2 [collection meta petitparser]
- yaml 3.1.1 [collection source_span string_scanner]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions