I have installed cordova-plugin-firebase in an Ionic Cordova application and since I have added this plugin I notice the following error when I debug my app with Xcode
[Fabric] failed to download settings Error Domain=FABNetworkError Code=-5 "(null)" UserInfo={status_code=403, type=2, request_id=..., content_type=application/json; charset=utf-8}
I don't want to use Fabric/crashlytics in any case
How could I remove it without affecting the Cordova Firebase plugin?
What you describe seems to be a known issue with the latest version of Cordova Firebase plugin. This plugin uses Google Services dependency 4.1.0, but according to the GitHub issues section, this problem will be fixed in the next release by using version 4.2.0.
While waiting for the plugin update, are you using Cordova iOS 5.0 in your project? In that case, try to compile your app again downgrading Cordova iOS version to 4.5.5. Run:
ionic cordova platform remove ios --save
Then:
ionic cordova platform add ios#4.5.5 --save
Related
My apache cordova project runs on cordova 11.0.0, I successfully built my android APK and tested it which works fine , but when I tried adding firebase plugin via CLI "cordova plugin add cordova-plugin-firebase --save" the app runs in to error
C:\Users\user\Documents\mobile\idealgist>cordova plugin add cordova-plugin-firebase --save
Installing "cordova-plugin-firebase" for android
Error during processing of action! Attempting to revert...
Failed to install 'cordova-plugin-firebase': Error: Uh oh!
Cannot overwrite directory 'C:\Users\user\Documents\mobile\idealgist\platforms\android\app\src\main' with non-directory 'C:\Users\user\Documents\mobile\idealgist\plugins\cordova-plugin-firebase\src\android\google-services.json'.
at Object.checkPathsSync (C:\Users\user\Documents\mobile\idealgist\node_modules\fs-extra\lib\util\stat.js:84:13)
at Object.copySync (C:\Users\user\Documents\mobile\idealgist\node_modules\fs-extra\lib\copy\copy-sync.js:27:38)
at copyFile (C:\Users\user\Documents\mobile\idealgist\node_modules\cordova-android\lib\pluginHandlers.js:224:12)
at install (C:\Users\user\Documents\mobile\idealgist\node_modules\cordova-android\lib\pluginHandlers.js:62:13)
at ActionStack.process (C:\Users\user\Documents\mobile\idealgist\node_modules\cordova-common\src\ActionStack.js:56:25)
at PluginManager.doOperation (C:\Users\user\Documents\mobile\idealgist\node_modules\cordova-common\src\PluginManager.js:112:24)
at PluginManager.addPlugin (C:\Users\user\Documents\mobile\idealgist\node_modules\cordova-common\src\PluginManager.js:142:21)
at C:\Users\user\Documents\mobile\idealgist\node_modules\cordova-android\lib\Api.js:153:78
Uh oh!
Cannot overwrite directory 'C:\Users\user\Documents\mobile\idealgist\platforms\android\app\src\main' with non-directory 'C:\Users\user\Documents\mobile\idealgist\plugins\cordova-plugin-firebase\src\android\google-services.json'.
I'm using Expo v42.0.1 and trying to install Firebase v9.0.2 and am unable to do so.
Issue
From running expo install firebase, firebase version 8.2.3 is installed. When changing the package.json to use firebase version 9.0.2, I get an error when running the app:
"firebase" is added as a dependency in your project's package.json but it doesn't seem to be installed. Please run "yarn" or "npm install" to fix this issue.
What I've tried
Running yarn / npm install
Running expo install firebase#9.0.2 (which ends up just downloading 8.2.3)
Has anyone seen this before or know why it is happening? I believe it is because Expo v42 is not yet compatible with the modular version of firebase (v9).
You are correct.
Has anyone seen this before or know why it is happening? I believe it is because Expo v42 is not yet compatible with the modular version of firebase (v9).
But you can make it work with using it like this in you package.json:
"#firebase": "^9.0.2",
Discussion about this: "firebase" is added as a dependency in your project's package.json but it doesn't seem to be installed
I have used this solution in 2 projects. 1 works perfectly but in another I faced issued where version firebase#9.0.0-beta.7 works perfectly but in version firebase#9.0.2 everything but Firestore works
More about it here: Expo + firebase#9.0.1/9.0.0: #firebase/firestore:, Firestore (9.0.0): Could not reach Cloud Firestore backend
I recently ran in to this problem out of no where. Every thing was working perfectly fine before, but recently I am not able to subscribe to a topic. I cant see the topics name on the cloud messaging portal.
Tried calling FirebaseX.subscribe, but the FirebaseX plugin is not installed
common.js:279 Install the FirebaseX plugin: 'ionic cordova plugin add
cordova-plugin-firebasex'
The weird part is that I already have the plugin installed.
I ran the following commands.
ionic cordova plugin add cordova-plugin-firebasex
npm install #ionic-native/firebase-x
Here is a part of my cordova plugin list
cordova-plugin-firebasex 9.0.2-cli "Google Firebase Plugin"
cordova-plugin-googlemaps 2.7.0-20200330-2338 "cordova-plugin-googlemaps"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.1 "cordova-plugin-ionic-webview"
cordova-plugin-market 1.2.0 "Market"
cordova-plugin-nativestorage 2.3.2 "NativeStorage"
cordova-plugin-screen-orientation 3.0.2 "Screen Orientation"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-plugin-x-socialsharing 5.4.7 "SocialSharing"
cordova-promise-polyfill 0.0.2 "cordova-promise-polyfill"
Any one familiar with this situation?
The error message indicates the plugin is not available at runtime; this could be because the plugin failed to install into your project.
Remove and re-add the mobile platform, e.g.
ionic cordova platform rm ios --nosave && ionic cordova platform add ios --nosave --verbose
Then look for errors in the console output.
(If testing Android then substitute android for ios above).
did you get the error message "Plugin doesn't support this project's cordova version. cordova: 8.1.1, failed version requirement: >=9" while installing the plugin.
Supported Cordova Versions
cordova: >= 9
cordova-android: >= 8
cordova-ios: >= 5
It doesn't work when using live reload, i.e. when I use ionic cordova run android, but it does work when I use ionic cordova build android and get the apk file transferred on the phone. The apk file should be in /platforms/android/app/build/outputs/apk/debug.
You can then use adb install to transfer the file to your phone.
I want to add Firestore to Flutter app, and I have problems running it on iOS.
I already added this line to pubspec.yaml
cloud_firestore: ^0.6.3
Flutter is updated. Flutter doctor says that I have v0.3.1.
While compiling app for iOS simulator I got this build error
Xcode's output: ↳ /
Users/*********/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.2.3/ios/Classes/FirebaseCorePlugin.m:7:9:
fatal error: 'Firebase/Firebase.h' file not found
#import <Firebase/Firebase.h>
^~~~~~~~~~~~~~~~~~~~~
1 error generated
I also run pod update to make sure that it is not issue with cocoapods.
UPDATE
After another research I found that deleting #use_frameworks! from Podfile in iOS folder let's project to compile. But what should be done in case when this can't be deleted?
The update to this gives me enough information to diagnose (hopefully). Flutter wasn't very good at supporting #use_frameworks & swift, but that was fixed fairly recently (mid-april 2018). However, it may not have made it to the beta channel yet at time of writing.
What was going on when #use_frameworks was set previously is that it wasn't linking everything into the right libraries, and a cocoapods bug was stopping it from finding certain files. The newest version of everything uses dynamic linking but has static_framework=true in the podfile for dependencies with static dependencies so that everything they need actually get linked into the right place.
This is fixed & tested on the master branch/channel, but should probably have made it to the dev branch/channel by now.
Here's the steps to makes sure your environment will support the fix, from this other github issue:
make sure you have Cocoapods 1.5.0 installed (pod --version should
say >= 1.5.0)
change any dependencies you have on the firebase_xxx, google_sign_in, or cloud_firestore plugins to the newest versions
(look for changelog entries referring to Cocoapods 1.5.0)
change your ios/Podfile to the newest version on Flutter master branch
(https://github.com/flutter/flutter/tree/master/packages/flutter_tools/templates/cocoapods)
delete ios/Podfile.lock and ios/Pods
switch to Flutter master (or dev) branch using flutter channel <branch>
flutter clean ; flutter run
I am getting this error for import Firebase:
Could not build Objective-C module 'Firebase'
Xcode also complains about FirebaseAnalytics saying
'FirebaseAnalytics/FirebaseAnalytics.h' file not found.
My project used to build just fine until I updated to swift 4.
I am using the latest version of Firebase via Cocoapods version 1.4.0 beta 2.
I just had the same issue. What I had to do was:
Close Xcode
Restart Xcode and made sure I opened the .xcworkspace project file.
Ran a Build on the project.
After that I had no more Firebase error messages.
In Xcode,
Go to Product -> Scheme -> Select New Scheme. Then choose FirebaseCore as Target and Name. Now build the project and then change back to your app target. It works for me in Xcode 9.1
Link Binary with Libraries
Build Phases - under Link Binary With Libraries - this is where the magic happens:
It is very likely, your binary is not linked with the Firebase library - hence the header file cannot be found.
After updating to XCode 9.4 the problem resolved itself.