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

🐛 [firebase_core_web] Expected a value of type 'String', but got one of type 'Null' #12237

Closed Patrick386 closed 4 months ago

Patrick386 commented 4 months ago

After upgrading to Flutter version 3.16.9, I'm encountering errors, and I'm unable to identify the cause.

cloud_firestore_platform_interface: ^6.1.0 firebase_core_platform_interface: ^5.0.0 firebase_storage: ^11.6.0

firebase_auth: ^4.16.0 firebase_ui_auth: ^1.12.1 firebase_auth_web: ^5.8.13

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:52720/FaxQR7KmzDc=/ws
Debug service listening on ws://127.0.0.1:52720/FaxQR7KmzDc=/ws
Debug service listening on ws://127.0.0.1:52720/FaxQR7KmzDc=/ws
Error: Expected a value of type 'String', but got one of type 'Null'
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:3       throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 127:3       castError
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 818:12  cast
dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 674:17                as
dart-sdk/lib/_internal/js_shared/lib/js_util_patch.dart 81:5                      getProperty
packages/firebase_core_web/firebase_core_web.dart 35:26                           _createFromJsOptions
packages/firebase_core_web/firebase_core_web.dart 27:39                           _createFromJsApp
packages/firebase_core_web/src/firebase_core_web.dart 322:12                      initializeApp
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50                <fn>
dart-sdk/lib/async/zone.dart 1661:54                                              runUnary
dart-sdk/lib/async/future_impl.dart 162:18                                        handleValue
dart-sdk/lib/async/future_impl.dart 846:44                                        handleValueCallback
dart-sdk/lib/async/future_impl.dart 875:13                                        _propagateToListeners
dart-sdk/lib/async/future_impl.dart 647:5                                         [_completeWithValue]
dart-sdk/lib/async/future.dart 529:22                                             <fn>
dart-sdk/lib/async/zone.dart 1661:54                                              runUnary
dart-sdk/lib/async/future_impl.dart 162:18                                        handleValue
dart-sdk/lib/async/future_impl.dart 846:44                                        handleValueCallback
dart-sdk/lib/async/future_impl.dart 875:13                                        _propagateToListeners
dart-sdk/lib/async/future_impl.dart 464:9                                         callback
dart-sdk/lib/async/schedule_microtask.dart 40:11                                  _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5                                   _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:7                <fn>
Screenshot 2024-01-31 at 11 14 11 PM

Flutter doctor

[✓] Flutter (Channel stable, 3.16.9, on macOS 13.6.1 22G313 darwin-arm64, locale en-KR)
    • Flutter version 3.16.9 on channel stable at /Users/patrick386/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 41456452f2 (6 days ago), 2024-01-25 10:06:23 -0800
    • Engine revision f40e976bed
    • Dart version 3.2.6
    • DevTools version 2.28.5

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/patrick386/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.5)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 77.1.3
    • Dart plugin version 232.10286

[✓] VS Code (version 1.75.1)
    • VS Code at /Users/patrick386/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] VS Code (version 1.71.1)
    • VS Code at /Users/patrick386/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (3 available)
    • iPhone X (mobile) • 45C8ED4F-3398-4DD0-99DB-6A62EFE80F20 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
    • macOS (desktop)   • macos                                • darwin-arm64   • macOS 13.6.1 22G313 darwin-arm64
    • Chrome (web)      • chrome                               • web-javascript • Google Chrome 121.0.6167.85
    ! Error: Failed to prepare the device for development. Please unlock and reconnect the device. (code 806)

[✓] Network resources
    • All expected network resources are available.
supratim1609 commented 4 months ago

It seems like you might have missed a value in the initialization of firebase to your app, check your initialize.app function once

Patrick386 commented 4 months ago

It seems like you might have missed a value in the initialization of firebase to your app, check your initialize.app function once

This app was working fine until the upgrade. I haven't made any changes related to initialization, and all values are properly set. Thank you.

yarmel commented 4 months ago

I just upgraded dependencies and encountered the same errors. Any ideas on how to fix this?

[i] [Firebase] api & services initialization
Error: Expected a value of type 'String', but got one of type 'Null'
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:3       throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 127:3       castError
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 818:12  cast
dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 674:17                as
dart-sdk/lib/_internal/js_shared/lib/js_util_patch.dart 81:5                      getProperty
packages/firebase_core_web/firebase_core_web.dart 35:26                           _createFromJsOptions
packages/firebase_core_web/firebase_core_web.dart 27:39                           _createFromJsApp
packages/firebase_core_web/src/firebase_core_web.dart 322:12                      initializeApp
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50                <fn>
dart-sdk/lib/async/zone.dart 1661:54                                              runUnary
dart-sdk/lib/async/future_impl.dart 162:18                                        handleValue
dart-sdk/lib/async/future_impl.dart 846:44                                        handleValueCallback
dart-sdk/lib/async/future_impl.dart 875:13                                        _propagateToListeners
dart-sdk/lib/async/future_impl.dart 647:5                                         [_completeWithValue]
dart-sdk/lib/async/future.dart 529:22                                             <fn>
dart-sdk/lib/async/zone.dart 1661:54                                              runUnary
dart-sdk/lib/async/future_impl.dart 162:18                                        handleValue
dart-sdk/lib/async/future_impl.dart 846:44                                        handleValueCallback
dart-sdk/lib/async/future_impl.dart 875:13                                        _propagateToListeners
dart-sdk/lib/async/future_impl.dart 464:9                                         callback
dart-sdk/lib/async/schedule_microtask.dart 40:11                                  _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5                                   _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:7                <fn>
Lyokone commented 4 months ago

Thanks for reporting I'm having a look

ifuterman commented 4 months ago

I have the same issue on the web. I tried to downgrade the Flutter version - this not helped

FedeRotoli commented 4 months ago

I have the same issue

Spitzbua commented 4 months ago

+1

walsha2 commented 4 months ago

Workaround

The issue is attributed to something in firebase_core_web 2.11.0. Likely the js_interop migration. It looks like this is already being addressed in https://github.com/firebase/flutterfire/pull/12239

FEAT(firestore,web): migrate web to js_interop to be compatible with WASM ([#12169](https://github.com/firebase/flutterfire/issues/12169)). ([57ebd529](https://github.com/firebase/flutterfire/commit/57ebd529de5def2bab1557a1bd9967ee4267c08a))
FEAT(auth,web): migrate web to js_interop to be compatible with WASM ([#12145](https://github.com/firebase/flutterfire/issues/12145)). ([8d2df7a1](https://github.com/firebase/flutterfire/commit/8d2df7a1b2198797e9c95c45efaf21b4e5bfe766))
FEAT(core,web): migrate web to js_interop to be compatible with WASM ([#12031](https://github.com/firebase/flutterfire/issues/12031)). ([96f79d21](https://github.com/firebase/flutterfire/commit/96f79d21f51712769f33a601e4564b90d4a60a33))

In the meantime, here is a workaround solution until this gets resolved. You need to explicitly pin firebase_core_web via a dependency override to the previous version.

pubspec.yaml

dependency_overrides:
  firebase_core_web: 2.10.0
ifuterman commented 4 months ago

Workaround

The issue looks to be attributed to something in the firebase_core_web 2.11.0. Likely the js_interop migration. It looks like this is already being addressed in #12239

FEAT(firestore,web): migrate web to js_interop to be compatible with WASM ([#12169](https://github.com/firebase/flutterfire/issues/12169)). ([57ebd529](https://github.com/firebase/flutterfire/commit/57ebd529de5def2bab1557a1bd9967ee4267c08a))
FEAT(auth,web): migrate web to js_interop to be compatible with WASM ([#12145](https://github.com/firebase/flutterfire/issues/12145)). ([8d2df7a1](https://github.com/firebase/flutterfire/commit/8d2df7a1b2198797e9c95c45efaf21b4e5bfe766))
FEAT(core,web): migrate web to js_interop to be compatible with WASM ([#12031](https://github.com/firebase/flutterfire/issues/12031)). ([96f79d21](https://github.com/firebase/flutterfire/commit/96f79d21f51712769f33a601e4564b90d4a60a33))

In the meantime, here is a workaround solution until this gets resolved. You need to explicitly pin firebase_core_web via a dependency override.

pubspec.yaml

dependency_overrides:
  firebase_core_web: 2.10.0

It works for me!!!

wantroba commented 4 months ago

Same here

orwir commented 4 months ago

Faced the same problem.

In the error message you can find this:

packages/firebase_core_web/firebase_core_web.dart 35:26                           _createFromJsOptions

firebase_core_web.dart 35

If you don't have Realtime Database configured parameter databaseURL will be ommited in the firebase_config.dart. So quick solution would just adding it.

... = FirebaseOptions(
    ...
    databaseURL: '',
  );
Hidd33n commented 4 months ago

Hello, does anyone know what could be causing this? I tried to do what was mentioned above, but nothing. I created projects from scratch again to install FlutterFire, and everything seems okay, but when I run it, it gives me that error.

he

ekremkenter commented 4 months ago

Hello, does anyone know what could be causing this? I tried to do what was mentioned above, but nothing. I created projects from scratch again to install FlutterFire, and everything seems okay, but when I run it, it gives me that error.

he

As mentioned in comments above, there is two alternative solutions.

Either override firebase_core_web dependency like this

dependency_overrides:
  firebase_core_web: 2.10.0

Or

Faced the same problem.

In the error message you can find this:

packages/firebase_core_web/firebase_core_web.dart 35:26                           _createFromJsOptions

firebase_core_web.dart 35

If you don't have Realtime Database configured parameter databaseURL will be ommited in the firebase_config.dart. So quick solution would just adding it.

... = FirebaseOptions(
    ...
    databaseURL: '',
  );
yarmel commented 4 months ago

Faced the same problem.

In the error message you can find this:

packages/firebase_core_web/firebase_core_web.dart 35:26                           _createFromJsOptions

firebase_core_web.dart 35

If you don't have Realtime Database configured parameter databaseURL will be ommited in the firebase_config.dart. So quick solution would just adding it.

... = FirebaseOptions(
    ...
    databaseURL: '',
  );

Not working, in my case. Received much more errors :)

FedeRotoli commented 4 months ago

dependency_overrides: firebase_core_web: 2.10.0

Not working both solutions. The first one throws me error about type 'AppJsImpl'.

muezz commented 4 months ago

I tried both methods. With the dependency override workaround I got some more unrelated weird errors. The other workaround with the databaseUrl as an empty string prevents the error but our Firebase (Google) auth stops working.

isrgold commented 4 months ago
dependency_overrides:
  firebase_core_web: 2.10.0
  firebase_auth_web: 5.8.13
  cloud_firestore_web: 3.9.0

worked for me. or you can rollback to firebase_core: 2.24.2

yarmel commented 4 months ago
dependency_overrides:
  firebase_core_web: 2.10.0
  firebase_auth_web: 5.8.13
  cloud_firestore_web: 3.9.0

worked for me. or you can rollback to firebase_core: 2.24.2

It's like an avalanche, one thing leads to another, doesn't work for me. Now throws errors in firebase_messaging_web-3.6.0/lib/src/interop/messaging.dart

../../../../../.pub-cache/hosted/pub.dev/firebase_messaging_web-3.6.0/lib/src/interop/messaging.dart:87:42: Error: 'JSError' isn't a type.
      final errorWrapper = allowInterop((JSError e) {
                                         ^^^^^^^
../../../../../.pub-cache/hosted/pub.dev/firebase_messaging_web-3.6.0/lib/src/interop/messaging.dart:94:59: Error: Type 'invalid-type' is not a valid type for external `dart:js_interop` APIs. The only valid types are: @staticInterop types, JS types from `dart:js_interop`, void, bool, num, double, int, String, and any extension type that erases to one of these types.
Use one of the valid types instead.
              next: nextWrapper.toJS, error: errorWrapper.toJS));
                                                          ^
../../../../../.pub-cache/hosted/pub.dev/firebase_messaging_web-3.6.0/lib/src/interop/messaging_interop.dart:17:26: Error: Type 'AppJsImpl?' is not a valid type for external `dart:js_interop` APIs. The only valid types are: @staticInterop types, JS types from `dart:js_interop`, void, bool, num, double, int, String, and any extension type that erases to one of these types.
 - 'AppJsImpl' is from 'package:firebase_core_web/src/interop/app_interop.dart' ('../../../../../.pub-cache/hosted/pub.dev/firebase_core_web-2.10.0/lib/src/interop/app_interop.dart').
Use one of the valid types instead.
external MessagingJsImpl getMessaging([AppJsImpl? app]);
                         ^
Failed to compile application.
FedeRotoli commented 4 months ago

Not resolved in the update 2.25.1

isrgold commented 4 months ago

Not resolved in the update 2.25.1

not working for me either

Lyokone commented 4 months ago

I'm not seeing any issue on my side with the fix. Do you care to give me a sample project? Thanks

isrgold commented 4 months ago

I'm not seeing any issue on my side with the fix. Do you care to give me a sample project? Thanks

https://github.com/isrgold/issue12237

simplest example

darshankawar commented 4 months ago

https://github.com/isrgold/issue12237

I tried with this but was unable to replicate the originally reported error. I ran using latest stable 3.16.9.

Moreover, tried running auth and core plugin examples with different combinations of dependencies as mentioned in above comments running on web, although I didn't again see the originally reported error. I came across errors as mentioned in other issues filed today pointing to web.

https://github.com/firebase/flutterfire/issues/12242 https://github.com/firebase/flutterfire/issues/12238 https://github.com/firebase/flutterfire/issues/12235 https://github.com/firebase/flutterfire/issues/12248

/cc @Lyokone

SergeyLomow commented 4 months ago

Не решено в обновлении 2.25.1

Same (( 😥😥

SergeyLomow commented 4 months ago
dependency_overrides:
  firebase_core_web: 2.10.0
  firebase_auth_web: 5.8.13
  cloud_firestore_web: 3.9.0

работал у меня. или вы можете вернуться к firebase_core: 2.24.2

it works in debug mode, but it doesn't work in release. The application starts, but shows a white screen

SergeyLomow commented 4 months ago

I see that I have closed the issue. Does it work now? What should I do to fix it?

wantroba commented 4 months ago

@SergeyLomow I'm still having the same issue. Here is the versions of the plugins that I'm usying: firebase_core_platform_interface: ^5.0.0 firebase_core_web: ^2.11.2 firebase_core: ^2.25.2 firebase_analytics: ^10.8.3 firebase_crashlytics: ^3.4.12 firebase_messaging: ^14.7.13 cloud_firestore: ^4.15.2 firebase_auth: ^4.17.2 cloud_functions: ^4.6.3


[√] Flutter (Channel stable, 3.16.9, on Microsoft Windows [versÆo 10.0.22621.3007], locale pt-BR) • Flutter version 3.16.9 on channel stable at C:\Users\wantr\Dev\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 41456452f2 (7 days ago), 2024-01-25 10:06:23 -0800 • Engine revision f40e976bed • Dart version 3.2.6 • DevTools version 2.28.5

SergeyLomow commented 4 months ago

@SergeyLomow I'm still having the same issue. Here is the versions of the plugins that I'm usying: firebase_core_platform_interface: ^5.0.0 firebase_core_web: ^2.11.2 firebase_core: ^2.25.2 firebase_analytics: ^10.8.3 firebase_crashlytics: ^3.4.12 firebase_messaging: ^14.7.13 cloud_firestore: ^4.15.2 firebase_auth: ^4.17.2 cloud_functions: ^4.6.3

[√] Flutter (Channel stable, 3.16.9, on Microsoft Windows [versÆo 10.0.22621.3007], locale pt-BR) • Flutter version 3.16.9 on channel stable at C:\Users\wantr\Dev\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 41456452f2 (7 days ago), 2024-01-25 10:06:23 -0800 • Engine revision f40e976bed • Dart version 3.2.6 • DevTools version 2.28.5

Does it work for you in the release version?

SergeyLomow commented 4 months ago

@SergeyLomow I'm still having the same issue. Here is the versions of the plugins that I'm usying: firebase_core_platform_interface: ^5.0.0 firebase_core_web: ^2.11.2 firebase_core: ^2.25.2 firebase_analytics: ^10.8.3 firebase_crashlytics: ^3.4.12 firebase_messaging: ^14.7.13 cloud_firestore: ^4.15.2 firebase_auth: ^4.17.2 cloud_functions: ^4.6.3

[√] Flutter (Channel stable, 3.16.9, on Microsoft Windows [versÆo 10.0.22621.3007], locale pt-BR) • Flutter version 3.16.9 on channel stable at C:\Users\wantr\Dev\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 41456452f2 (7 days ago), 2024-01-25 10:06:23 -0800 • Engine revision f40e976bed • Dart version 3.2.6 • DevTools version 2.28.5

And are these plugins listed in dependency_overrides?

FedeRotoli commented 4 months ago

Not resolved in the update 2.25.2

yarmel commented 4 months ago

Not resolved in the update 2.25.2

Add empty databaseURL: '',

SergeyLomow commented 4 months ago

Not resolved in the update 2.25.2

Add empty databaseURL: '',

Does not work in the release version, white screen

yarmel commented 4 months ago

After adding an empty databaseURL option I can start the app on the web, but now I get another error

Expected a value of type 'DateTime?', but got one of type 'LegacyJavaScriptObject'
SergeyLomow commented 4 months ago

@SergeyLomow I'm still having the same issue. Here is the versions of the plugins that I'm usying: firebase_core_platform_interface: ^5.0.0 firebase_core_web: ^2.11.2 firebase_core: ^2.25.2 firebase_analytics: ^10.8.3 firebase_crashlytics: ^3.4.12 firebase_messaging: ^14.7.13 cloud_firestore: ^4.15.2 firebase_auth: ^4.17.2 cloud_functions: ^4.6.3 [√] Flutter (Channel stable, 3.16.9, on Microsoft Windows [versÆo 10.0.22621.3007], locale pt-BR) • Flutter version 3.16.9 on channel stable at C:\Users\wantr\Dev\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 41456452f2 (7 days ago), 2024-01-25 10:06:23 -0800 • Engine revision f40e976bed • Dart version 3.2.6 • DevTools version 2.28.5

Add databaseURL

static const FirebaseOptions web = FirebaseOptions(
    ...
    databaseURL: '',
  );

my pubspec.yaml

  # -> Firebase
firebase_core: ^2.25.1
firebase_auth: ^4.17.2
firebase_storage: ^11.6.2
firebase_remote_config: ^4.3.11
firebase_messaging: ^14.7.12
firebase_crashlytics: ^3.4.12
firebase_analytics: ^10.8.3
cloud_functions: ^4.6.3
cloud_firestore: ^4.15.1

I did it, it works in debug mode

SergeyLomow commented 4 months ago

After adding an empty databaseURL option I can start the app on the web, but now I get another error

Expected a value of type 'DateTime?', but got one of type 'LegacyJavaScriptObject'

have you tried running in release??

SergeyLomow commented 4 months ago

I'm sorry, it looks like I started it incorrectly. I did it like this, flutter run -d chrome --release Works. I'm trying to roll it out to firebase hosting right now

TheBigOx commented 4 months ago
... = FirebaseOptions(
    ...
    databaseURL: '',
  );

This worked for me.. Good job.!

FedeRotoli commented 4 months ago

... = FirebaseOptions( ... databaseURL: '', );

This work for me only in release mode. In debug i have the same error as before.

mariaangelesjs commented 4 months ago
... = FirebaseOptions(
    ...
    databaseURL: '',
  );

This worked for me.. Good job.!

This worked for me too!!!!!!! Adding the override that was suggested at the start did more wrong than good. Such a fast fix after a day and a half of research!

plugeit commented 4 months ago

is it working when you build a apk?

plugeit commented 4 months ago

try building apk it will not work

mariaangelesjs commented 4 months ago

normal firebase web hosting deploy is working, but haven't checked apk yet. Don't want to freak out more for today ahaha

Sadik101 commented 4 months ago

just go all in:

databaseURL:'',
measurementId:'',
trackingId:'',
deepLinkURLScheme:'',
androidClientId:'',
iosClientId:'',
iosBundleId:'',
appGroupId: '',
Patrick386 commented 4 months ago

Error: Web

 static const FirebaseOptions web = FirebaseOptions(
    apiKey: 'AIzaSxxxxxxxxxxxxxxxxxxxxxxxY',
    authDomain: 'xxxxxxxx386.firebaseapp.com',
    projectId: 'xxxxxxxxxx386',
    storageBucket: 'xxxxxxxxxxxxxxxx.appspot.com',
    measurementId: 'G-Vxxxxxxxxxxx',
    appId: '1:637854794218:web:984cxxxxxxxxxxxxxxxxxxxxx',
    messagingSenderId: '637xxxxxxxxxx',
    );

It requires filling unnecessary parts for it to work on the web app. That seems to be the cause. More precisely, if 'databaseURL' is null, an error occurs.

 static const FirebaseOptions web = FirebaseOptions(
    apiKey: 'AIzaSxxxxxxxxxxxxxxxxxxxxxxxY',
    authDomain: 'xxxxxxxx386.firebaseapp.com',
    projectId: 'xxxxxxxxxx386',
    storageBucket: 'xxxxxxxxxxxxxxxx.appspot.com',
    measurementId: 'G-Vxxxxxxxxxxx',
    appId: '1:xxxxxxxxx:web:984cxxxxxxxxxxxxxxxxxxxxx',
    messagingSenderId: '637xxxxxxxxxx',

    /// Add
    databaseURL:'',
    trackingId:'',
    deepLinkURLScheme:'',
    androidClientId:'',
    iosClientId:'',
    iosBundleId:'',
    appGroupId: '',
  );

image

infiniteAppsUG commented 4 months ago

This is what worked for me now, without the overrides it doesnt. I am testing on Chrome only:

dependencies:
  flutter:
    sdk: flutter
  firebase_core: ^2.25.2
  cloud_firestore: ^4.15.2

dependency_overrides:
  firebase_core_web: 2.10.0
  firebase_auth_web: 5.8.13
  cloud_firestore_web: 3.9.0
ANMOL-S-B commented 4 months ago

It seems like you might have missed a value in the initialization of firebase to your app, check your initialize.app function once

This app was working fine until the upgrade. I haven't made any changes related to initialization, and all values are properly set. Thank you.

Did the issue get solved ? if yes how did you solve

Hidd33n commented 4 months ago

Esto es lo que funcionó para mí ahora, sin las anulaciones que no tiene. Estoy probando solo en Chrome:

dependencies:
  flutter:
    sdk: flutter
  firebase_core: ^2.25.2
  cloud_firestore: ^4.15.2

dependency_overrides:
  firebase_core_web: 2.10.0
  firebase_auth_web: 5.8.13
  cloud_firestore_web: 3.9.0

The problem had disappeared on its own for me, but I think it reappeared when I reimported Cloud Firestore. However, with this solution, it worked perfectly the first time around

EricPHassey commented 3 months ago

I'm still having the issue. None of the mentioned above fixes resolved it for me.

Benadfem commented 3 months ago

good day programmers. please i have this error when i tried running my project through the web after flutter upgrade.

Error: The argument type 'JSPromise Function(dynamic)' can't be assigned to the parameter type 'PromiseJsImpl Function(TransactionJsImpl)'.

can anyone help me out with a solution