close

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

Hello Guys How are you all? Hope You all are fine. When I am calling Firebase.initializeApp() I am facing the following error: Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) in a flutter. So today Here I come with all possible solutions for this error.

We are providing you with all possible solutions to solve this error. let’s start this article without wasting your time.

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

When I am calling Firebase.initializeApp() I am facing following error.

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

How To Solve Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) Error?

  1. How To Solve Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) Error?

    To Solve Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) Error You Just need to Update All Firebase dependencies. First of all Check which dependencies are Outdated. To do so you can run this command: flutter pub outdated And then run this command for one-by-one firebase dependencies Just like this: flutter pub upgrade firebase_messaging And then run flutter clean: flutter clean and Now run pub get and then Your error must be solved.

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

    To Solve Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) Error You Just need to Update All Firebase dependencies. First of all Check which dependencies are Outdated. To do so you can run this command: flutter pub outdated And then run this command for one-by-one firebase dependencies Just like this: flutter pub upgrade firebase_messaging And then run flutter clean: flutter clean and Now run pub get and then Your error must be solved.

Solution 1: Update all Firebase dependencies 

You Just need to Update All Firebase dependencies. First of all Check which dependencies are Outdated. To do so you can run this command.

flutter pub outdated

And then run this command for one-by-one firebase dependencies Just like this.

flutter pub upgrade firebase_messaging

And then run flutter clean.

flutter clean

and Now run pub get and then Your error must be solved.

Conclusion

So, It’s All About This Error. I hope this tutorial helps you to Solve your error. Please Comment Below if You are stuck anywhere with my code. And please comment below on which solution worked for you. Thank You.

Also, Check Out the Below Tutorials

Leave a Comment