skip to Main Content

When I run my bitbucket pipeline for my project im getting an error during flutter test:

/root/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/lib/src/firebase_app.dart:18:25: Error: Member not found: 'FirebaseAppPlatform.verifyExtends'.
    FirebaseAppPlatform.verifyExtends(_delegate);
                        ^^^^^^^^^^^^^

When I run flutter test in my terminal I don’t have these issues.

My pipeline script is:

5

Answers


  1. Because there are some breaking change of firebase_core_platform_interface that do not comply with semantic versioning:
    https://github.com/firebase/flutterfire/issues/9806

    You need to overwrite this library:

    enter image description here

    Login or Signup to reply.
  2. Run "flutter pub upgrade –major-versions"

    Login or Signup to reply.
  3. Root cause

    You are update or installing only a subset of the Firebase plugins (firebase_core, firebase_analytics,…)

    Solution

    • Solution 1: (preferred) Updating to the latest version with flutterfire update check the docs here. But it is not easily because your project will have a lot of packages dependencies to each other like flutter version 2 or 3, so on. Anyway, it is long term solution.

    • Solution 2: (Fix to run)
      You can add to your pubspec.yaml

       dependency_overrides:
          firebase_core_platform_interface: 4.5.1
      
    • Solution 3: (Fix to run)
      Update dependencies with this below command line:

       flutter pub upgrade --major-versions
      

    Finally, Run the project again by following stuffs:

    flutter clean
    flutter pub get
    cd ios && rm -f Podfile.lock
    cd ios && pod install --repo-update
    flutter run
    

    That’s it!

    Login or Signup to reply.
  4. run this
    flutter pub upgrade –major-versions
    than run this
    flutter upgrade

    Login or Signup to reply.
  5. I changed my flutter version via flutter channel master. This changed automatically my pubspec.lock.
    In my case, restoring previous version of pubspec.lock solved the problem (pug get needed).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search