PlatformException(Unable establish connection channel) – Code Example

Total
0
Shares

Firebase throws error Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel) when there is misconfiguration of versions. As you can see that it threw PlatformException which means that the issue is arising on the platform. Generally it is occurring in Flutter.

Solution

You can solve this issue by following these steps –

1. Update all Firebase dependencies

flutter pub outdated
flutter pub upgrade firebase_{library of firebase}

2. If you got this error after pub update, then follow this

// Remove pubspec.lock file and then
flutter clean

3. Downgrade libraries

You may also downgrade libraries to the stable version where your programs were working fine.

Read more on this issue – Flutter Community