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]: Apple signInWithCredential throws invalid-credential when used with error.credential HOT 4
- FIREBASE_AUTH: CRASH ON WINDOWS WHEN USE sendEmailVerification() AND sendPasswordResetEmail(email)
- 👉FCM V1 👈_firebaseMessagingBackgroundHandler flutter_incoming_call sound not working and awesome_notifications incoming call sound not working ⚠⚠⚠⚠⚠ HOT 2
- firebase_dynamic_links: Frequent Crashes on Startup Due to Firebase Initialization Issue HOT 1
- [cloud_firestore]: missing increment updates when unstable internet connection HOT 4
- [📚] How to build and run the docs in localhost? HOT 1
- 🐛 [VectorStore] Dart SDK for Vector Store and vector search HOT 1
- [📚] Missing Windows information in "Add Firebase to your Flutter app" HOT 2
- [firebase_messaging]: getInitialMessage() doesn't work as expected on ios HOT 4
- firebase_core: Firebase won't initialize app on Flutter Web! HOT 3
- cloud_firestore: unsupported option '-G' for target 'x86_64-apple-ios10.0-simulator' HOT 3
- [storage] Cannot compile HOT 4
- include of non-modular header inside framework module 'firebase_messaging.FLTFirebaseMessagingPlugin' HOT 6
- [firebase_storage]: creationTimeMillis and updatedTimeMillis null on Windows platform HOT 2
- [firebase_core]: Using `demoProjectId` doesn't actually connect to demo project
- How to disable the recaptcha flow in firebase phone authentication (Flutter) HOT 11
- [firebase_analytics]: typing of event parameters to Map<String, Object>? is not working HOT 4
- [CLOUD_FIRESTORE]: Seconds are not considered on clause isGreaterThanOrEqualTo on Windows HOT 2
- [storage]: Unknown Error (Message too long) while uploading image on iOS HOT 4
- 🐛 [firebase_analytics] Add support for InitiateOnDeviceConversionMeasurement with hashed credentials
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.