ionic platform add ios failed with output 254 - ios

when i am trying to add platform ios in my code its shows below errors:-
Error: Failed to fetch platform cordova-ios#~4.4.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 254 Error output:
npm WARN #ionic-native/admob-free#3.4.4 requires a peer of #ionic-native/core#^3.1.0 but none is installed. You must install peer dependencies yourself.

Related

Error while compiling HAProxy from source

I got this error while trying to compile the HAProxy 2.2 with LUA version 5.3. I'm on trying to do it on CentOS7(arm64).
[root#08d17a479616 haproxy-2.2.22]# make TARGET=linux-glibc USE_PCRE=1 USE_PCRE_JIT=1 USE_OPENSSL=1 USE_ZLIB=1 USE_LINUX_TPROXY=1 USE_REGPARM=1 USE_LUA=1 USE_THREAD=1 USE_TFO=1
CC src/version.o
LD haproxy
/usr/bin/ld: cannot find -latomic
collect2: error: ld returned 1 exit status
More logs;
attempt to open //usr/aarch64-redhat-linux/lib64/libatomic.so failed
attempt to open //usr/aarch64-redhat-linux/lib64/libatomic.a failed
attempt to open //usr/lib64/libatomic.so failed
attempt to open //usr/lib64/libatomic.a failed
attempt to open //usr/local/lib64/libatomic.so failed
attempt to open //usr/local/lib64/libatomic.a failed
attempt to open //lib64/libatomic.so failed
attempt to open //lib64/libatomic.a failed
attempt to open //usr/aarch64-redhat-linux/lib/libatomic.so failed
attempt to open //usr/aarch64-redhat-linux/lib/libatomic.a failed
attempt to open //usr/local/lib/libatomic.so failed
attempt to open //usr/local/lib/libatomic.a failed
attempt to open //lib/libatomic.so failed
attempt to open //lib/libatomic.a failed
attempt to open //usr/lib/libatomic.so failed
attempt to open //usr/lib/libatomic.a failed
ld: cannot find -latomic
[root#08d17a479616 haproxy-2.2.22]#
What I've tried until now is to create a symlink to the libatomic.so with this
ln -s /usr/lib64/libatomic.so.1.2.0 /usr/lib/libatomic.so
And installed the missing GNU library from here with the steps outline in the article.
Install CentOS SCLo RH repository:yum install centos-release-scl-rh
Install devtoolset-7-libatomic-devel rpm package:
# yum install devtoolset-7-libatomic-devel
What should I do to resolve it ?
Fixed by installing this package and it goes through to a new error, which I've outlitned in this question.
New question: New questions
To apply the fix for CentOS7 arm, use this link and the instructions on how to install the package.
Package Link
Install systemd-devel rpm package: yum install systemd-devel

Getting error while trying to run ionic cordova build ios . Found multiple specifications for `FirebaseAuth (6.5.3)`:

Installing "cordova-plugin-firebase-authentication" for ios
Running command: pod install --verbose
[!] Found multiple specifications for FirebaseAuth (6.5.3):
/Users/vs/.cocoapods/repos/cocoapods/Specs/6/3/6/FirebaseAuth/6.5.3/FirebaseAuth.podspec.json
/Users/vs/.cocoapods/repos/trunk/Specs/6/3/6/FirebaseAuth/6.5.3/FirebaseAuth.podspec.json
[!] Found multiple specifications for FirebaseAuth (6.5.2):
/Users/vs/.cocoapods/repos/cocoapods/Specs/6/3/6/FirebaseAuth/6.5.2/FirebaseAuth.podspec.json
/Users/vs/.cocoapods/repos/trunk/Specs/6/3/6/FirebaseAuth/6.5.2/FirebaseAuth.podspec.json
[!] Found multiple specifications for FirebaseAuth (6.5.1):
/Users/vs/.cocoapods/repos/cocoapods/Specs/6/3/6/FirebaseAuth/6.5.1/FirebaseAuth.podspec.json
/Users/vs/.cocoapods/repos/trunk/Specs/6/3/6/FirebaseAuth/6.5.1/FirebaseAuth.podspec.json
Failed to install 'cordova-plugin-firebase-authentication': Error: pod: Command failed with exit code 1 Error output:
[!] Found multiple specifications for FirebaseAuth (6.5.3):
/Users/vs/.cocoapods/repos/cocoapods/Specs/6/3/6/FirebaseAuth/6.5.3/FirebaseAuth.podspec.json
/Users/vs/.cocoapods/repos/trunk/Specs/6/3/6/FirebaseAuth/6.5.3/FirebaseAuth.podspec.json
[!] Found multiple specifications for FirebaseAuth (6.5.2):
/Users/vs/.cocoapods/repos/cocoapods/Specs/6/3/6/FirebaseAuth/6.5.2/FirebaseAuth.podspec.json
/Users/vs/.cocoapods/repos/trunk/Specs/6/3/6/FirebaseAuth/6.5.2/FirebaseAuth.podspec.json
[!] Found multiple specifications for FirebaseAuth (6.5.1):
/Users/vs/.cocoapods/repos/cocoapods/Specs/6/3/6/FirebaseAuth/6.5.1/FirebaseAuth.podspec.json
/Users/vs/.cocoapods/repos/trunk/Specs/6/3/6/FirebaseAuth/6.5.1/FirebaseAuth.podspec.json
at ChildProcess.whenDone (/users/vs/documents/ionicprojects/tripper-app/node_modules/cordova-common/src/superspawn.js:135:23)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1021:16)
at Socket. (internal/child_process.js:443:11)
at Socket.emit (events.js:315:20)
at Pipe. (net.js:674:12)
[ERROR] An error occurred while running subprocess cordova.
cordova platform add ios exited with exit code 1.
pod repo remove master
This will delete all your repo what is not working or broken.

cordova-plugin-facebook4 - iOS build fails with error code 65, probably because of missing native dependencies

phonegap build ios fails with the following error message:
The following build commands failed:
CompileC /Users/user/Library/Developer/Xcode/DerivedData/MyApp-dtsdztgswtsnnubosnumqjssdpaj/Build/Intermediates.noindex/MyApp\ App.build/Debug-iphonesimulator/MyApp\ App.build/Objects-normal/x86_64/FacebookConnectPlugin.o /Applications/MAMP/htdocs/MyApp/platforms/ios/MyApp\ App/Plugins/cordova-plugin-facebook4/FacebookConnectPlugin.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Command finished with error code 65: xcodebuild -workspace,MyApp.xcworkspace,-scheme,MyApp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 11 Pro Max,build,CONFIGURATION_BUILD_DIR=/Applications/MAMP/htdocs/MyApp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Applications/MAMP/htdocs/MyApp/platforms/ios/build/sharedpch
(node:3817) UnhandledPromiseRejectionWarning: Error: xcodebuild: Command failed with exit code 65
at ChildProcess.whenDone (/Applications/MAMP/htdocs/MyApp/node_modules/cordova-common/src/superspawn.js:135:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:3817) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3817) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
These are my plugin versions:
phonegap cli: 8.0.0
cordova-ios: 5.0.1
phonegap-plugin-facebook4: 6.2.0
Additional Context
I managed to solve the issue by manually editing my Podfile and adding the following lines to it, then running cd platforms/ios && pod install:
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
After that, phonegap build ios completed succesfully.
Could it be that somehow native dependencies aren't being added?
It would be ideal not having to add these back every time I remove and re-add the platform, and adding them in a build hook sounds veeeeeeery hacky.
In my case i have permission related issue so that's why i give permission to ($user)/.cocoapods but not working
then i have delete that folder and then pod install command fire in ($app_folder)/platform/ios and
it will install all the files of facebook 'FBSDKCoreKit','FBSDKLoginKit','FBSDKShareKit' in to the ios platform
might it will help you too.
This means that you have an error on
App/Plugins/cordova-plugin-facebook4/FacebookConnectPlugin.m
if you go to xcode and check that file , you will see the missing classes. I think that you are using a SDK not supported by the plugin, so I recommend you to change to cordova-plugin-facebook-connect that support last facebook sdks (9.0.0)
https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect#readme

"ionic cordova platform add ios" Failed to fetch platform cordova-ios#0.0.1

When I run "ionic cordova platform add ios", that got the following error. How to fix it?
Exception: Using cordova-fetch for cordova-ios#0.0.1
Error: Failed to fetch platform cordova-ios#0.0.1
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for cordova-ios#0.0.1
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/thanhnguyen/.npm/_logs/2017-08-25T10_34_19_961Z-debug.log
The following command should resolve the issue:
cordova platform add ios#latest
Inside my package.json there was a ios:0.0.1 which I removed and got resolved.

Cordova build failed for ios after installing pushwoosh notifications plugin

We have done ios app using cordova.We used pushwoosh plugin to send push notifications.Recently we have updated pushwoosh plugin from version 3.6.5 to 6.2.2 (https://github.com/Pushwoosh/pushwoosh-phonegap-plugin). After installing new version we are not able to build project.
cordova plugin add pushwoosh-cordova-plugin#6.2.2
After installing
cordova build ios
We are getting below error
The following build commands failed:
CpResource www/plugins/com.pushwoosh.plugins.pushwoosh/www/PushNotification.js build/emulator/ITCPapyra.app/PushNotification.js
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/Users/apple/ITCPapyra/platforms/ios/cordova/build-debug.xcconfig,-project,ITCPapyra.xcodeproj,ARCHS=i386,-target,ITCPapyra,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/apple/ITCPapyra/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/apple/ITCPapyra/platforms/ios/build/sharedpch
ERROR building one of the platforms: Error: /Users/apple/ITCPapyra/platforms/ios/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /Users/apple/ITCPapyra/platforms/ios/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
We are using cordova version 5.2.0, node version 4.4.7 .Please help how to solve this issue and build our project success.
You may not have the required environment or OS to build this project
Which environment do you use?

Resources