Getting a Firebase PlatformException channel-error in Flutter even though Firebase isn't the real problem? This video shows you exactly how to fix it.
The error points to Firebase, but the actual root cause is a conflict with the ffmpeg_kit package. Adding the right Proguard rules resolves the channel communication issue entirely — and in this video I walk you through how to fix it in under a few minutes.
THE EXCEPTION:::
I/flutter (22526): [IMPORTANT:flutter/shell/platform/android/android_context_vk_impeller.cc(62)] Using the Impeller rendering backend (Vulkan).
E/flutter (22526): [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.firebase_core_platform_interface.FirebaseCoreHostApi.initializeCore"., null, null)
E/flutter (22526): #0 FirebaseCoreHostApi.initializeCore (package:firebase_core_platform_interface/src/pigeon/messages.pigeon.dart:301)
E/flutter (22526): asynchronous suspension
E/flutter (22526): #1 MethodChannelFirebase.initializeCore (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:29)
E/flutter (22526): asynchronous suspension
E/flutter (22526): #2 MethodChannelFirebase.initializeApp (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:70)
E/flutter (22526): asynchronous suspension
E/flutter (22526): #3 Firebase.initializeApp (package:firebase_core/src/firebase.dart:78)
E/flutter (22526): asynchronous suspension
E/flutter (22526): #4 main (package:susu_box/main.dart:14)
E/flutter (22526): asynchronous suspension
The Solution (Paste this in your Proguard):
#ffmpeg_kit
-keep class com.arthenica.ffmpegkit.** { *; }
-keep class org.ffmpeg.** { *; }
-dontwarn com.arthenica.ffmpegkit.**
-dontwarn org.ffmpeg.**
-keep class com.antonkarpenko.ffmpegkit.** { *; }
Find me here 👇👇👇👇👇👇👇👇
GitHub: https://github.com/Funky-Mobile
TikTok: / nusetork
LinkedIn: / nusetor-setsofia-kojo
Instagram: / nusetork_
Credits:
Music track: Show Yourself by Orchestronika
Source: https://freetouse.com/music
Vlog Music for Video (Free Download)
THE FIX — Paste this in your Proguard file:::
#ffmpeg_kit
-keep class com.arthenica.ffmpegkit.** { *; }
-keep class org.ffmpeg.** { *; }
-dontwarn com.arthenica.ffmpegkit.**
-dontwarn org.ffmpeg.**
-keep class com.antonkarpenko.ffmpegkit.** { *; }
Note: Even though the error references Firebase, the conflict originates from ffmpeg_kit being stripped during release builds. These Proguard rules prevent that and restore the platform channel connection.
FIND ME HERE:::
GitHub: https://github.com/Funky-Mobile
TikTok: / nusetork
LinkedIn: / nusetor-setsofia-kojo
Instagram: / nusetork_
CREDITS:::
Music track: Show Yourself by Orchestronika
Source: https://freetouse.com/music
Vlog Music for Video (Free Download)