Failed to install 'cordova-plugin-firebase-authentication': undefined - ios

I am trying to build iOS from ionic 4. But getting stuck due to below error
Using cordova-fetch for cordova-ios#^5.0.0
Adding ios project...
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: com.bombaydesigncentre.bloodbuddies
Name: Blood Buddies
iOS project created with cordova-ios#5.0.1
Installing "call-number" for ios
Installing "cordova-open-native-settings" for ios
Installing "cordova-plugin-androidx" for ios
Installing "cordova-plugin-androidx-adapter" for ios
Installing "cordova-plugin-contacts" for ios
Installing "cordova-plugin-device" for ios
Installing "cordova-plugin-firebase" for ios
Installing "cordova-plugin-firebase-authentication" for ios
Failed to install 'cordova-plugin-firebase-authentication': undefined CordovaError: Promise rejected with non-error: '/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:439:in `help!\': \u001b[31m[!] You cannot run CocoaPods as root.\u001b[39m (CLAide::Help)\n\n\u001b[4mUsage:\u001b[24m\n\n $ \u001b[32mpod\u001b[39m \u001b[32mCOMMAND\u001b[39m\n\n CocoaPods, the Cocoa library package manager.\n\n\u001b[4mCommands:\u001b[24m\n\n \u001b[32m+ cache\u001b[39m Manipulate the CocoaPods cache\n \u001b[32m+ env\u001b[39m Display pod environment\n \u001b[32m+ init\u001b[39m Generate a Podfile for the current directory\n \u001b[32m+ install\u001b[39m Install project dependencies according to versions from a\n Podfile.lock\n \u001b[32m+ ipc\u001b[39m Inter-process communication\n \u001b[32m+ lib\u001b[39m Develop pods\n \u001b[32m+ list\u001b[39m List pods\n \u001b[32m+ outdated\u001b[39m Show outdated project dependencies\n \u001b[32m+ repo\u001b[39m Manage spec-repositories\n \u001b[32m+ setup\u001b[39m Setup the CocoaPods environment\n \u001b[32m+ spec\u001b[39m Manage pod specs\n \u001b[32m+ update\u001b[39m Update outdated project dependencies and create new Podfile.lock\n\n\u001b[4mOptions:\u001b[24m\n\n \u001b[34m--silent\u001b[39m Show nothing\n \u001b[34m--version\u001b[39m Show the version of the tool\n \u001b[34m--verbose\u001b[39m Show more debugging information\n \u001b[34m--no-ansi\u001b[39m Show output without ANSI codes\n \u001b[34m--help\u001b[39m Show help banner of specified command\n\tfrom /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/command.rb:47:in `run\'\n\tfrom /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/bin/pod:55:in `<top (required)>\'\n\tfrom /usr/local/bin/pod:22:in `load\'\n\tfrom /usr/local/bin/pod:22:in `<main>\'\n'
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:29:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
[ERROR] An error occurred while running subprocess cordova.
It is failing while installing cordova-plugin-firebase-authentication
I have tried multiple things like changing the permissions, changing the user of /usr/local/lib/node_modules/cordova but no luck.
Here is the list of plugins used:
cordova-open-native-settings 1.5.2 "Native settings"
cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
cordova-plugin-contacts 3.0.1 "Contacts"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-firebase 2.0.5 "Google Firebase Plugin"
cordova-plugin-firebase-authentication 3.0.0 "cordova-plugin-firebase-authentication"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.2 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-support-android-plugin 1.0.1 "cordova-support-android-plugin"
cordova-support-google-services 1.3.2 "cordova-support-google-services"
cordova.plugins.diagnostic 5.0.1 "Diagnostic"
onesignal-cordova-plugin 2.7.0 "OneSignal Push Notifications"

So, after doing couple of changes I found the issue was due to the npm package.
We were getting this error on NodeJs 10.17.0. So, we downgraded NodeJs to 10.14.2
Seems like the firebase authentication plugin might have conflict with NodeJs 10.17.0
So, the final configuaration which worked was
cordova-plugin-firebase-authentication 3.0.0 NodeJs 10.14.2
npm 6.4.1 cordova cli 9.0.0

Related

Ionic v1 Cordova "prefs:root=" non-public URL scheme ios app rejection

My app for iOS got rejected with the following error:
Guideline 2.5.1 - Performance - Software Requirements
Your app uses the "prefs:root=" non-public URL scheme, which is a private entity. The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change.
I have seen several issues opened on this subject for the native iOS app but not Cordova or Ionic. Is there a way to resolve this in Cordova? Ironically, the build that got reject has only a minor change that shows a number with 3 decimals instead of 2. Everything else is the same. Yet, it got rejected.
Below is the list of all the plugins I have:
card.io.cordova.mobilesdk 2.1.0 "CardIO"
cordova-android-support-gradle-release 0.0.2 "cordova-android-support-gradle-release"
cordova-plugin-actionsheet 2.3.3 "ActionSheet"
cordova-plugin-app-event 1.2.1 "Application Events"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-datepicker 0.9.3 "DatePicker"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-dialogs 1.3.3 "Notification"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-transfer 1.6.3 "File Transfer"
cordova-plugin-google-analytics 1.8.3 "Google Universal Analytics Plugin"
cordova-plugin-googleplus 5.3.1 "Google SignIn"
cordova-plugin-inappbrowser 1.7.1 "InAppBrowser"
cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.4-dev "StatusBar"
cordova-plugin-touchid 0.4.0 "Touch ID"
cordova-plugin-vibration 2.1.5 "Vibration"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova-plugin-x-socialsharing 5.4.1 "SocialSharing"
cordova.plugins.diagnostic 3.7.1 "Diagnostic"
de.appplant.cordova.plugin.local-notification 0.8.5 "LocalNotification"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 7.0.0 "BarcodeScanner"
As #Paulw11 suggested -
Run grep -r -i 'prefs' ./* under the plugins directory
Find references to the prefs
Update the plugins.
No code changes required.
Rebuild it and submit the archive.
Note: You may have to update all the plugins. I would highly recommend making a backup of all the plugins before updating them.

Development team does not support the Associated Domains capability when signing code on iOs

I have a problem when I'm trying to sign the certificate for my ionic iOs platform. The error specifies like this:
I have no idea why the error occurs since my other ionic app project using the same development team works. I've looked in the everywhere but none solved the problem. Does it have anything to do with the plugins installed on my projects?
I'm using XCode 9 beta. Here's my ionic info:
global packages:
#ionic/cli-utils : 1.4.0
Ionic CLI : 3.4.0
local packages:
#ionic/cli-plugin-ionic1 : 2.0.1
Ionic Framework : ionic1 1.3.3
System:
Node : v6.11.0
OS : macOS Sierra
Xcode : Xcode 9.0 Build version 9M136h
ios-deploy : not installed
ios-sim : not installed
npm : 3.10.10
Here the list plugins installed on my project:
com.telerik.plugins.nativepagetransitions 0.6.5 "Native Page Transitions"
cordova-plugin-app-preferences 0.99.3 "AppPreferences"
cordova-plugin-clipboard2 0.1.0 "Clipboard"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.0.7 "Console"
cordova-plugin-crosswalk-webview 2.3.0 "Crosswalk WebView Engine"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-transfer 1.6.3 "File Transfer"
cordova-plugin-inappbrowser 1.7.1 "InAppBrowser"
cordova-plugin-network-information 1.3.3 "Network Information"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova-plugin-x-socialsharing 5.1.8 "SocialSharing"
cordova-plugin-x-toast 2.6.0 "Toast"
cordova-sqlite-storage 2.0.4 "Cordova sqlite storage plugin"
es6-promise-plugin 4.1.0 "Promise"
ionic-plugin-deeplinks 1.0.15 "Ionic Deeplink Plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"
Make sure your email is enrolled in Apple's $99/year Developer Program.
When someone sends you the developer invite from Apple Developer Portal (now in iTunes Connect): https://itunesconnect.apple.com/access/users
Make sure they check this little box for you to access certificates and profiles: (If they did not, they can go back to the invite and add this permission anytime.)
Nevermind, turns out the ionic-plugin-deeplinks caused the error. I had no idea why, I uninstalled the plugin and then the error resolved.
first of all, take a look into xcode and check if your signing is setup correctly. Furthermore, check under 'capabilities' if there are any actions required, in my case, I had to toggle the push option manually to add the correct entitlements.
You can also have a look at this thread to get any further information...

ionic app runs on iOS 10.1 emulator perfectly, but errors when deployed to a device

I have an ionic application that i have been deploying to google play and itunes store successfully. All the current functionality works great on all android devices tested.
For iOS, I am able to see all the functionality working great using
ionic emulate ios --target="iPhone-6-Plus"
(Or any target, really!)
When I build an ipa following the normal steps on https://ionicframework.com/docs/guide/publishing.html ... and upload the ipa to testobject.com and I cannot get the same successes.
For iOS platform 8.0, 8.1, and 8.2 the app will load, but some functionality doesn't work.
For iOS platform 8.3 - 10.1 the app either loads a blank white page, or a red page with an error stack I cannot read.
What are the normal debugging steps for this type of scenario? Like i said i can build to an emulator just fine...
Here is my plugin list.
kirbsah$ ionic plugins list
cordova-plugin-actionsheet 2.3.1 "ActionSheet"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-camera 2.3.0 "Camera"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.0.4 "Console"
cordova-plugin-device 1.1.3 "Device"
cordova-plugin-splashscreen 4.0.0 "Splashscreen"
cordova-plugin-statusbar 2.2.0 "StatusBar"
cordova-plugin-whitelist 1.3.0 "Whitelist"
cordova-plugin-x-socialsharing 5.1.3 "SocialSharing"
ionic-plugin-deploy 0.6.5 "IonicDeploy"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-push 1.8.1 "PushPlugin"
Here is my ionic information
Your system information:
Cordova CLI: 6.4.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 1.2.4
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
ios-deploy version: 1.9.0
ios-sim version: 5.0.12
OS: Mac OS X Sierra
Node Version: v7.0.0
Xcode version: Xcode 8.1 Build version 8B62
Any help or direction appreciated. I would assume the problem is somewhere in my xcode build process... but i'm just following documentation.

How to resolve this error in xcode?

I am building a Cordova Application in XCode, but I am getting the following error :-
CDVLocation.m 'Cordova/NSArray+Comparisons.h' file not found
cordova platform
Installed platforms: android 5.1.1, ios 4.0.1
Available platforms: amazon-fireos, blackberry10, browser, firefoxos, osx, webos
Mac-de-binov:icooltaxi binov$ cordova plugin
cl.rmd.cordova.dialoggps 0.0.2 "DialogGPS"
com.cordova.plugins.sms 0.1.9 "Cordova SMS Plugin"
cordova-plugin-whitelist 1.2.1 "Whitelist"
in.girish.datagram 0.1.0 "UDP Plugin"
org.apache.cordova.device 0.3.0 "Device"
org.apache.cordova.geolocation 0.3.12 "Geolocation"
org.apache.cordova.splashscreen 1.0.0 "Splashscreen"
How can I fix this issue?

module com.pushwoosh.plugins.pushwoosh.PushNotification not found

I recently rebuilt my iOS platform in my ionic/cordova project. In that process I somehow broke my push functionality. Before this it worked beautifully.
Now, when I launch the app to a device in Xcode:
In Xcode debugger I see all the normal pushwoosh API calls happening as the app is loading but without the APP ID, so they're all failing.
The important thing here is that the plugin is being loaded seems to be trying to work
Right after those errors in the console, I get this one, which I can only see when I attach a safari console debugger to the app running on the phone:
module com.pushwoosh.plugins.pushwoosh.PushNotification not found
The app just goes to a white screen, and I am pretty sure it's because of that error - when I test the app out in a browser (where cordova is not loaded), it runs fine.
I set my APP ID right from the start of the app with this:
var pushNotification = cordova.require("com.pushwoosh.plugins.pushwoosh.PushNotification");
pushNotification.onDeviceReady({
pw_appid: PW_APPID
});
I have uninstalled and reinstalled the plugin several times. I have removed and then added the platform as well. In this process I tried updating my cordova-ios to 4.1.0 but that introduced a whole new set of headaches, so I reverted back to cordova-ios 3.8.0
What other troubleshooting can I do to see what is going on?
Here's some other diagnostics....
RocketHQ:rr-app-newest laphona$ ionic -v
1.7.14
RocketHQ:rr-app-newest laphona$ cordova -v
6.0.0
RocketHQ:rr-app-newest laphona$ cordova plugin list
com.cordova.plugins.sms 0.1.9 "Cordova SMS Plugin"
com.unarin.cordova.beacon 3.4.0 "Proximity Beacon Plugin"
cordova-plugin-app-event 1.2.0 "Application Events"
cordova-plugin-bluetooth-serial 0.4.5 "Bluetooth Serial"
cordova-plugin-calendar 4.4.7 "Calendar"
cordova-plugin-camera 2.1.1 "Camera"
cordova-plugin-console 1.0.2 "Console"
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-file 4.1.1 "File"
cordova-plugin-file-transfer 1.5.0 "File Transfer"
cordova-plugin-freshdesk-mobihelp 1.1.0 "Mobihelp Plugin for Phonegap"
cordova-plugin-geolocation 2.1.0 "Geolocation"
cordova-plugin-google-analytics 0.8.1 "Google Universal Analytics Plugin"
cordova-plugin-inappbrowser 1.3.0 "InAppBrowser"
cordova-plugin-network-information 1.2.0 "Network Information"
cordova-plugin-splashscreen 3.2.1 "Splashscreen"
cordova-plugin-whitelist 1.2.1 "Whitelist"
cordova-sqlite-storage 0.8.4-dev "Cordova sqlite storage plugin (core version)"
cordova.plugins.diagnostic 2.3.13 "Diagnostic"
de.appplant.cordova.plugin.local-notification 0.8.4 "LocalNotification"
ionic-plugin-keyboard 2.0.1 "Keyboard"
org.nypr.cordova.hockeyappplugin 0.1.0 "Device"
org.nypr.cordova.nslogger-cocoalumberjack-connector-plugin 0.1.0 "Device"
pushwoosh-cordova-plugin 4.2.2
I just found out from the cordova pushwoosh authors:
To support latest version of Cordova and Ionic we had to rename plugin
id to
var pushNotification =
cordova.require("pushwoosh-cordova-plugin.PushNotification");
It's reflected in the docs.

Resources