jakub homola
jakub homola

Reputation: 21

Flutter - Firebase, Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)

I'm having an issue when I try to input some information from text fields to Firebase. I'm getting this error:

Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)

I tried to update my dependencies but they are all up to date. Did someone have the same problem and solved it?

Upvotes: 2

Views: 4174

Answers (1)

Saptadeep
Saptadeep

Reputation: 337

Try adding firebase_core_platform_interface dependency without a version to your app's pubspec.yaml file:

Like this:

dependencies:
  ........
  ........  
  firebase_core_platform_interface:

And then do a pub get after flutter clean from CLI/Terminal.

If it still doesn't work rename the file pubspec.lock to pubspec_ORG.lockand then:

Run all of these from CLI/Terminal:

flutter pub outdated

flutter upgrade outdated_package

flutter clean

flutter pub get

Hope this helps.

PS: Renaming the file pubspec.lock to pubspec_ORG.lock will help you revert to the original pubspec.lock` file in case you need to.

Upvotes: 2

Related Questions