flutterfire
flutterfire copied to clipboard
🐛 [cloud_firestore_web] The method 'FirebaseFirestoreWeb.runTransaction' has fewer named arguments than those of overridden method 'FirebaseFirestorePlatform.runTransaction'
Bug report
Im trying to build my flutter web app. These are the dependencies I'm using:
firebase_auth: 3.4.1
firebase_auth_platform_interface: 6.3.1
firebase_core: 1.19.1
firebase_core_web: 1.6.6
But the build is failing and I'm getting this error
../../development/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-2.6.9/lib/cloud_firestore_web.dart:101:14: Error: The method 'FirebaseFirestoreWeb.runTransaction' has fewer named arguments than those of overridden method 'FirebaseFirestorePlatform.runTransaction'.
Future<T?> runTransaction<T>(TransactionHandler<T> transactionHandler,
^
../../development/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_platform_interface-5.7.0/lib/src/platform_interface/platform_interface_firestore.dart:168:14: Context: This is the overridden method ('runTransaction').
Future<T?> runTransaction<T>(TransactionHandler<T> transactionHandler,
Flutter doctor
Click To Expand
[✓] Flutter (Channel stable, 2.10.0, on macOS 11.6 20G165 darwin-x64, locale en-GB)
• Flutter version 2.10.0 at /Users/hinnarutaba/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5f105a6ca7 (6 months ago), 2022-02-01 14:15:42 -0800
• Engine revision 776efd2034
• Dart version 2.16.0
• DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/hinnarutaba/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.1)
• 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 11.0.11+0-b60-7590822)
[✓] VS Code (version 1.67.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.40.0
[✓] Connected device (2 available)
• SM G935F (mobile) • ce011711628f4b2604 • android-arm64 • Android 8.0.0 (API 26)
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.134
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Same problem here : 🐛
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-2.6.19/lib/cloud_firestore_web.dart:101:14: Error: The method 'FirebaseFirestoreWeb.runTransaction' has fewer named arguments than those of overridden method 'FirebaseFirestorePlatform.runTransaction'.
Future<T?> runTransaction<T>(TransactionHandler<T> transactionHandler,
Error: The method 'FirebaseFirestoreWeb.runTransaction' doesn't have the named parameter 'maxAttempts' of overridden method 'FirebaseFirestorePlatform.runTransaction'.
Future<T?> runTransaction<T>(TransactionHandler<T> transactionHandler,
@rutaba1
Please upgrade all flutterfire plugins to latest versions, specially, cloud_firestore_web which has been upgraded and that should resolve the issue you are reporting: https://pub.dev/packages/cloud_firestore_web/changelog#281
@darshankawar I don't want to update my flutterfire plugins because of the persistence issue in the auth
what if i had updated the packages from old to new
cloud_firestore_web: ^2.8.1 cloud_firestore_platform_interface: ^5.7.0 firebase_core: ^1.20.0 firebase_core_web: ^1.7.1
and still got this error :
Error: Assertion failed:
options != null
"FirebaseOptions cannot be null when creating the default app."
at firebase_core_web.FirebaseCoreWeb.new.initializeApp (http://localhost:49827/packages/firebase_core_web/firebase_core_web.dart.lib.js:226:42)
at initializeApp.next (
it is unable to initialize the firebase now.....................
what if i had updated the packages from old to new
cloud_firestore_web: ^2.8.1 cloud_firestore_platform_interface: ^5.7.0 firebase_core: ^1.20.0 firebase_core_web: ^1.7.1
and still got this error :
Error: Assertion failed: options != null "FirebaseOptions cannot be null when creating the default app." at firebase_core_web.FirebaseCoreWeb.new.initializeApp (http://localhost:49827/packages/firebase_core_web/firebase_core_web.dart.lib.js:226:42) at initializeApp.next ()
it is unable to initialize the firebase now.....................
Passing in the options parameter in the Firebase.initializeApp() solves this issue. However the updated auth dependency will cause persistent login state issue
However the updated auth dependency will cause persistent login state issue
Same as https://github.com/firebase/flutterfire/issues/9228#issuecomment-1195466404
why this is marked as blocked on customer response?
Hey @rutaba1. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@rutaba1 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.