114

I get this error:

Member not found: 'FirebaseAppPlatform.verifyExtends'. FirebaseAppPlatform.verifyExtends(_delegate);

flutter clean
flutter pub get
pod install
Alex Mamo
  • 130,605
  • 17
  • 163
  • 193
Rafael Pedrosa
  • 1,173
  • 2
  • 2
  • 3
  • Do you think its tied to a certain date . This error appeared suddenly without making any code changes – Jay Shenawy Oct 30 '22 at 23:18
  • @JayShenawy, its not a specific date. There was a breaking change introduced in an patch update. If you use `^` for any dependency in `pubspec.yaml` (eg. `^4.5.1`), this means that the dependency will auto update to any patch/minor version available. This is why, without changing any code, this error suddenly appeared – mrgnhnt96 Nov 01 '22 at 15:20
  • Check my answer here. https://stackoverflow.com/a/74580648/5501242 – nahoang Nov 26 '22 at 08:12

21 Answers21

141

If you need to maintain the current dependency version, you can add the dependency override to your root pubspec.yaml to fix this too.
If you use multiple local packages in your project, this makes it so you don't have to update all your pubspec.yaml files

dependency_overrides:
  firebase_core_platform_interface: 4.5.1

As of 10/6/22, there was an update with breaking changes. So you can run the following script to update your dependencies their next major versions.

flutter pub upgrade --major-versions

After adding this, run the following commands to update the iOS project's pods

cd ios && pod deintegrate
rm -f Podfile.lock
flutter packages get
pod install --repo-update
Hack-R
  • 22,422
  • 14
  • 75
  • 131
mrgnhnt96
  • 3,562
  • 1
  • 17
  • 36
66

I had the same problem. Some of my plugins were running on older outdated packages and there has been a major version upgrade as mentioned by others. When running flutter pub upgrade, it only upgrades to the latest minor version. To fix this, I did the following:

flutter pub upgrade --major-versions

to upgrade to the latest supported major-versions. After that, everything worked great!

Please be aware that this may introduce some breaking changes in your code. But here at least, you may be able to fix your code to run on the latest library packages and run your app.

anand1st
  • 1,086
  • 10
  • 16
23

firebase_core_platform_interface: 4.5.1

Try adding this package in pubspec.yaml to force install 4.5.1,

4.5.2 has major changes, which was being automatically downloaded by firebase_core

Rakesh R
  • 695
  • 7
  • 18
16

I think this solved my futterfire-induced morning problem: Hard 4.5.1 dependency... /pubspec.yaml ->

  firebase_core_platform_interface: 4.5.1
  firebase_messaging: ^13.0.4 # will satisfy your firebase core things that depend on ^4.5.1

Github ref: https://github.com/firebase/flutterfire/issues/9806#issuecomment-1294003289

Praharsh Bhatt
  • 556
  • 5
  • 24
11

A breaking changes was done,few hours ago.Try this works.For more info see github issue: https://github.com/firebase/flutterfire/issues/9806

firebase_core_platform_interface: 4.5.1
firebase_messaging: ^13.0.4 # will satisfy your firebase core things that depend on ^4.5.1
Thusitha Deepal
  • 1,392
  • 12
  • 19
10

I could be wrong about this solution, but there was a bug introduced in some firebase packages because breaking changes were added to a minor/patch. The quick fix for me was to specify the exact version of the firebase_core_platform_interface in my pubspec.yaml:

firebase_core_platform_interface: 4.5.1

After flutter clean this satisfied my packages relying on firebase_core_platform_interface "^4.5.1" and prevented introducing the breaking changes by utilizing 4.5.2 (in this case verifyExtends being renamed verify? whoops).

Plywood
  • 891
  • 1
  • 7
  • 16
8

When it comes to errors that sound like this:

Member not found: 'FirebaseAppPlatform.verifyExtends'

Then indeed the issue is related to using older versions of the firebase_core_platform_interface. By the time I'm answering this question, the latest version is 4.5.2:

firebase_core_platform_interface: 4.5.2

So the general recommendation is to always use the latest versions.

Where can you find the newer versions that are released?

In the official documentation that exists in the link below:

Where should you place it?

In the pubspec.yaml file.

How to update to the latest version by command line?

flutter pub upgrade --major-versions
Alex Mamo
  • 130,605
  • 17
  • 163
  • 193
6

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!

Gk Mohammad Emon
  • 6,084
  • 3
  • 42
  • 42
nahoang
  • 2,400
  • 1
  • 18
  • 22
6
flutter pub upgrade --major-versions
flutter run

So this error occurred because I was following an old course. I simply went and ran these two commands to solve the issue

Ayush_Raj
  • 61
  • 1
  • 3
6

I did get the same error. Problem seems to be with firebase packages, maybe bug or break in version. You can try any one of below:

// Try add this to dependencies section in pubspec.yaml file
firebase_core_platform_interface: 4.5.1

OR

// run this in terminal
flutter pub upgrade --major-versions

Please check this answer as well

Aashis Shrestha
  • 342
  • 5
  • 13
5

Update firebase_cli to latest version

For macOS

curl -sL firebase.tools | upgrade=true bash

Then activate firebase_cli globally

dart pub global activate flutterfire_cli

Then update flutterfire

flutterfire update

Then upgrade all flutter packages

flutter pub upgrade --major-versions

Also, stay on firebase_core: 2.1.1

Reference : https://github.com/firebase/flutterfire/issues/9806

Tushar Asodariya
  • 629
  • 2
  • 7
  • 20
1

I was facing the same problem while using

firebase_core: 2.1.0

But the problem is solved in

firebase_core: 2.2.0
1

Add in pubspc.yaml

firebase_core_platform_interface: ^4.5.1

enter image description here

Then go to pubspec.lock edit

firebase_core_platform_interface: ^4.5.2

To

firebase_core_platform_interface: ^4.5.1

enter image description here

Then

Write in terminal

flutter clean

Then

flutter pub get
1

Just add these to your dependencies:

firebase_core_platform_interface: 4.5.1

firebase_messaging: ^13.0.4

Then do:

flutter pub get

flutter pub upgrade

0

solve my problem updating my firebase dependenceses

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 21 '22 at 15:58
0

It happens because you have upgraded the flutter SDK but not the associated packages which are compatible with it. Go to "pub.dev" and update the versions in all the firebase products (e.g. firebase_core, firebase_auth, etc) to the latest available package. Just updating the "firebase_core_platform_interface" might not solve future problems in production.

bdthombre
  • 159
  • 8
0

Updating firebase packages to the latest versions solved this issue.

Muhammad Umair Saqib
  • 1,287
  • 1
  • 9
  • 20
0

Upgrade firebase_core, firebase_storage, cloud_firestore, firebase_auth etc. (firebase packages) one by one, by using the following command flutter pub upgrade [package_name]. Hopefully this helps.

Cleopas Mwape
  • 101
  • 1
  • 5
0

If none of the previous solutions works,

simply change the cache file [firebase_app.dart] like below,

FirebaseAppPlatform.verifyExtends(_var) to FirebaseAppPlatform.verify(_var)

It works like a charm, if didn't work for you then revert the change you made.

General Grievance
  • 4,555
  • 31
  • 31
  • 45
-1

Changing the compileSdkVersion to 33 solved the issue for me,

In the app/build.gradle

android {
    compileSdkVersion 33 
    ...
}
Tonny Bawembye
  • 496
  • 5
  • 16
-2

Keep it simple, just update the Firebase dependencies. If you have multiple firebase dependencies you can do as follows

firebase_crashlytics:
firebase_analytics:
firebase_core:

and then run

flutter clean
flutter pub get
mrgnhnt96
  • 3,562
  • 1
  • 17
  • 36
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 02 '22 at 18:48