Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [cloud_firestore_web] The method 'FirebaseFirestoreWeb.runTransaction' has fewer named arguments than those of overridden method 'FirebaseFirestorePlatform.runTransaction' #9221

Closed
rutaba1 opened this issue Jul 25, 2022 · 9 comments
Labels
closed-by-bot resolution: solution-provided A solution has been provided in the issue. Stale Issue with no recent activity type: bug Something isn't working

Comments

@rutaba1
Copy link

rutaba1 commented Jul 25, 2022

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!


@rutaba1 rutaba1 added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Jul 25, 2022
@SiddardhaD
Copy link

SiddardhaD commented Jul 26, 2022

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,


@darshankawar darshankawar added the triage Issue is currently being triaged. label Jul 26, 2022
@darshankawar
Copy link

@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 darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Jul 26, 2022
@rutaba1
Copy link
Author

rutaba1 commented Jul 26, 2022

@darshankawar I don't want to update my flutterfire plugins because of the persistence issue in the auth

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Jul 26, 2022
@SiddardhaD
Copy link

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.....................

@rutaba1
Copy link
Author

rutaba1 commented Jul 26, 2022

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

@darshankawar
Copy link

However the updated auth dependency will cause persistent login state issue

Same as #9228 (comment)

@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Jul 26, 2022
@ammaratef45
Copy link

why this is marked as blocked on customer response?

@google-oss-bot google-oss-bot added the Stale Issue with no recent activity label Aug 11, 2022
@google-oss-bot
Copy link

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!

@google-oss-bot
Copy link

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.

@darshankawar darshankawar added resolution: solution-provided A solution has been provided in the issue. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. triage Issue is currently being triaged. labels Aug 22, 2022
@firebase firebase locked and limited conversation to collaborators Sep 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
closed-by-bot resolution: solution-provided A solution has been provided in the issue. Stale Issue with no recent activity type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants