Comments (7)
Hello @qwadrox,
Thank you for your report. Based on the comment here, it seems this issue stems from the underlying native plugin, and we might not be able to address it directly. Could you confirm if you have any issues related to or caused by this?
from flutterfire.
Hi @qwadrox
i am facing same issue my flutter version is 3.22.0 and firebase_core version is 3.0.0
Your workaround is not working for me.
Can someone please help, trying to figure it out from 2-3 days
the error i am getting is-
flutter: PlatformException(channel-error, Unable to establish connection on channel., null, null)
flutter: #0 FirebaseCoreHostApi.initializeCore (package:firebase_core_platform_interface/src/pigeon/messages.pigeon.dart:210:7)
#1 MethodChannelFirebase._initializeCore (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:29:44)
#2 MethodChannelFirebase.initializeApp (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:73:7)
#3 Firebase.initializeApp (package:firebase_core/src/firebase.dart:43:31)
#4 initialChecks (package:creatics_mobile/main.dart:108:3)
#5 main. (package:creatics_mobile/main.dart:75:11)
#6 main (package:creatics_mobile/main.dart:73:3)
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: [core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()
#0 MethodChannelFirebase.app (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:193:5)
#1 Firebase.app (package:firebase_core/src/firebase.dart:56:41)
#2 FirebaseCrashlytics.instance (package:firebase_crashlytics/src/firebase_crashlytics.dart:33:55)
#3 main. (package:creatics_mobile/main.dart:81:27)
#4 _RootZone.runBinary (dart:async/zone.dart:1666:54)
#5 runZonedGuarded. (dart:async/zone.dart:1798:18)
#6 _Zone._processUncaughtError (dart:async/zone.dart:1081:14)
#7 _CustomZone.handleUncaughtError (dart:async/zone.dart:1285:5)
from flutterfire.
Hi @qwadrox
i am facing same issue my flutter version is 3.22.0 and firebase_core version is 3.0.0
Your workaround is not working for me.
Can someone please help, trying to figure it out from 2-3 daysthe error i am getting is-
flutter: PlatformException(channel-error, Unable to establish connection on channel., null, null)
flutter: #0 FirebaseCoreHostApi.initializeCore (package:firebase_core_platform_interface/src/pigeon/messages.pigeon.dart:210:7)
#1 MethodChannelFirebase._initializeCore (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:29:44)
#2 MethodChannelFirebase.initializeApp (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:73:7)
#3 Firebase.initializeApp (package:firebase_core/src/firebase.dart:43:31)
#4 initialChecks (package:creatics_mobile/main.dart:108:3)
#5 main. (package:creatics_mobile/main.dart:75:11)
#6 main (package:creatics_mobile/main.dart:73:3)
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: [core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()
#0 MethodChannelFirebase.app (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:193:5)
#1 Firebase.app (package:firebase_core/src/firebase.dart:56:41)
#2 FirebaseCrashlytics.instance (package:firebase_crashlytics/src/firebase_crashlytics.dart:33:55)
#3 main. (package:creatics_mobile/main.dart:81:27)
#4 _RootZone.runBinary (dart:async/zone.dart:1666:54)
#5 runZonedGuarded. (dart:async/zone.dart:1798:18)
#6 _Zone._processUncaughtError (dart:async/zone.dart:1081:14)
#7 _CustomZone.handleUncaughtError (dart:async/zone.dart:1285:5)
Your issue is completely different than mine. I didn't have platform exception.
But this might help:
https://stackoverflow.com/questions/72880037/unhandled-exception-platformexceptionchannel-error-unable-to-establish-connec
https://stackoverflow.com/questions/72833245/calling-firebase-initializeapp-returns-unable-to-establish-connection-on-chan
from flutterfire.
Hello @qwadrox,
Thank you for your report. Based on the comment here, it seems this issue stems from the underlying native plugin, and we might not be able to address it directly. Could you confirm if you have any issues related to or caused by this?
@TarekkMA
I understand, but I think the documentation should be updated regarding this side effect since the official way to configure Firebase is through the FlutterFire CLI.
Another improvement would be to print a message indicating successful initialization when it happens from the Dart code.
from flutterfire.
@qwadrox - If you manually add the GoogleService-Info.plist to the Runner, you still don't need to manually update your AppDelegate.
This is enough:
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
this is probably why you're seeing that log in your console.
from flutterfire.
@qwadrox - If you manually add the GoogleService-Info.plist to the Runner, you still don't need to manually update your AppDelegate. This is enough:
await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, );this is probably why you're seeing that log in your console.
@russellwheatley
"If you manually add the GoogleService-Info.plist to the Runner" I've added it, but i have to still edit AppDelegate. I use a build script for that in my app.
In the repro sample I did add as well: https://github.com/qwadrox/my_catalog_app/blob/bug/firebase-core-not-being-initialized/ios/Runner/GoogleService-Info.plist
from flutterfire.
Sorry, I just realised what you were referring to. We check allApps
here: https://github.com/firebase/flutterfire/blob/master/packages/firebase_core/firebase_core/ios/Classes/FLTFirebaseCorePlugin.m#L46
Which outputs this log:https://github.com/firebase/firebase-ios-sdk/blob/f3ce673e624e67f39dd5462731a70277d0290595/FirebaseCore/Sources/FIRApp.m#L264
which is not an error, it is a warning that can be safely ignored. We literally configure the app in the next line: https://github.com/firebase/flutterfire/blob/master/packages/firebase_core/firebase_core/ios/Classes/FLTFirebaseCorePlugin.m#L47
from flutterfire.
Related Issues (20)
- [firebase_auth] linkWithCredential() throws email-already-in-use exception in flutter app
- Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ) intialize issue HOT 1
- [firebase_auth] authStateChanges() stream fires when read/write into firestore HOT 4
- π [firebase_massaging] Example flutter ios build is too old
- firebase_code: Duplicate Classes HOT 6
- Firebase Phone MFA not working with some numbers HOT 1
- [π] Old Doc doesn't have sum() and average() example for flutter. HOT 1
- [Firebase storage]: iOS only - Unable to establish connection to channel, happens in Workmanager or isolate only HOT 1
- [Firebase_auth]: <When I use signInWithEmailAndPassword without first using the createUserWithEmailAndPassword method, I get the error message [firebase_auth/channel-error] "dev.flutter.pigeon.firebase_auth_platform_interface.FirebaseAuthHostApi.signInWithEmailAndPassword".> HOT 11
- π [crashlytics][release] Information from recordFlutterFatalError shows up as 'Instance of 'DiagnosticsProperty<void>' HOT 1
- [firebase_app_check] App check token does not print on Android real devices HOT 6
- [firebase_auth]: [web] referencing FirebaseAuthException after running release version of app throws exception. HOT 2
- [firebase_messaging]: After turning off the device and turn back on, onBackgroundMessage is not fired on iOS. HOT 1
- [firebase_messaging]: After turning off the device and turn back on, onBackgroundMessage is not fired on iOS. HOT 3
- [firebase_core]: Cannot build app from version 3.0.0 HOT 4
- [FirebaseAuth]: Unhandled Exception: type 'List<Object?>' is not a subtype of type 'PigeonUserInfo' in type cast HOT 3
- [firebase_analytics]: `TypeError: Cannot convert undefined or null to object` when hot reload web application HOT 2
- [π] README files in `example` directories have outdated docs and links
- [firebase_analytics_web]: Error (Xcode): ../../../.pub-cache/hosted/pub.dev/firebase_core_web-2.17.3/lib/src/interop/utils/es6_interop.dart:18:12: Error: Type 'JSString' not found. HOT 1
- πAdding Firestore plugin to project Ios not Build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutterfire.