19

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:

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Yuki
  • 255
  • 1
  • 2
  • 9
  • Does this answer your question? [Error: Member not found: 'FirebaseAppPlatform.verifyExtends'](https://stackoverflow.com/questions/74226250/error-member-not-found-firebaseappplatform-verifyextends) – krishnaacharyaa Jan 17 '23 at 11:38

5 Answers5

34

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

20

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!

nahoang
  • 2,400
  • 1
  • 18
  • 22
5

Run "flutter pub upgrade --major-versions"

Crucialjun
  • 193
  • 1
  • 8
1

run this flutter pub upgrade --major-versions than run this flutter upgrade

Eray Hamurlu
  • 657
  • 7
  • 9
0

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