Ionic build ios plugin errors (exit code 65)


#1

I significantly refactored my app from a tabs view to a slide menu view (starting over with the slide menu seed and copying my code into it) and now I am running into the following errors when trying to run ‘ionic build ios’ from the command line:

The following build commands failed:
CompileC build/Fastpass\ Connection.build/Debug-iphonesimulator/Fastpass\ Connection.build/Objects-normal/i386/CDVStatusBar.o Fastpass\ Connection/Plugins/org.apache.cordova.statusbar/CDVStatusBar.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/Fastpass\ Connection.build/Debug-iphonesimulator/Fastpass\ Connection.build/Objects-normal/i386/CDVInAppBrowser.o Fastpass\ Connection/Plugins/org.apache.cordova.inappbrowser/CDVInAppBrowser.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/Fastpass\ Connection.build/Debug-iphonesimulator/Fastpass\ Connection.build/Objects-normal/i386/CDVCookies.o Fastpass\ Connection/Plugins/com.bez4pieci.cookies/CDVCookies.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(3 failures)
Error: /Users/jamesyothers/Projects/fastpass/dev/platforms/ios/cordova/build: Command failed with exit code 65
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)

These plugins are still in plugins directory. I’m not sure what the issue is. I would initially think the plug-ins are not installed but they all appear to be there. Any leads are appreciated. Thank you.


Error building on iOS
#2

Hmm, I’ve seen a few people have luck with deleting the json file in their plugins folder, or even removing the platforms all together and re-adding them.

What version of cordova do you have? This can happen sometimes when its older versions of cordova installed.


#3

Thanks @mhartington. I actually solved this problem by ensuring the plugins represented in the “plugins” directory are represented in the platforms/ios/projectName/Plugins directory. I had to reinstall one plugin and then for all other plugins, for which there were not directories in the ios plugins directory, I had to copy the files from the plugins/pluginName/src/ios directory into the platforms/ios/projectName/plugins/pluginName directory. Thanks again.


#4

Thank you @james1 - I was facing the exact same problem after pulling my project down on to a new Mac and your recommendation fixed my build. :slight_smile:


#5

@niallobrien that’s awesome! Glad to help.


#6

Oh man thank you I was having the same issues and it solved it right away :smile:


#7

I was having a similar issue after upgrading cordova and ionic versions.
Removing the ios.json file didn’t fix it, nor did removing and re-adding the platform. I had to uninstall and re-install the actual plugins, then remove and re-add the platform. All good now!

Many thanks


#8

Hmm, I’m still running into the same warning (below) after trying removing each and every plugin, re-adding them all, then removing both target platforms, then adding the platforms again, and I still get that error when I try building iOS. Any further debugging tips? I haven’t gotten into the nitty-gritty of cordova yet, so I don’t even know where to look next, but I’m probably just going to move to a phonegap build workflow anyway.

** BUILD FAILED **


The following build commands failed:
	CompileC build/[app name]\ App.build/Debug-iphonesimulator/[app name]\ App.build/Objects-normal/i386/main.o [app name]main.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: /Users/nfrye/Documents/GitHub/[project name]/platforms/ios/cordova/run: Command failed with exit code 65
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)

and plugins:

nfrye$ cordova plugins list
com.ionic.keyboard 1.0.3 "Keyboard"
nl.x-services.plugins.socialsharing 4.3.7 "SocialSharing"
org.apache.cordova.console 0.2.11 "Console"
org.apache.cordova.device 0.2.12 "Device"
org.apache.cordova.geolocation 0.3.10 "Geolocation"
org.apache.cordova.network-information 0.2.12 "Network Information"

#9

The problem kept happening when running “ionic build ios” even after removing and re-adding the plugins. Initially it seemed to fix it but then the same issue arose.

I found removing the SocialSharing plugin solved the build problem. This is not ideal, as I need the SocialSharing plugin when I come to submit my app, but until the issue is solved at least I can build the app and work on other things.


#10

I’ve tried removing ALL plugins, then removing and re-adding ios and android platforms (without re-adding plugins) and my build is still failing with that exit code 65. Cordova’s errors are entirely useless for somebody that isn’t an iOS dev, which if I’m not mistaken, is sort of the point of Cordova. Don’t know if a line is missing from a config file, or plugins aren’t matching up —no hints of what’s failing. I’m going to be using phonegap build exclusively now.


#11

Hi @premiumfrye - sounds like you’ve been hitting similar problems to me. What happens if you create fresh new ionic project with no plugins and run “ionic build ios” ?


#12

I just did :

ionic start myApp tabs
cd myApp
ionic platform add ios
ionic build ios

and it built no problem. Wondering what file permissions ionic/cordova ionic copies plugin files with.


#13

And…I think I found the most unsatisfying answer ever: must be a difference in file permissions from /Plugins and /Platforms/ios/[project name]/Plugins. I just tried building with ‘sudo’, and it worked. Suggest trying that


#14

I was having a similar problem. In my case, I had to make new folders for each of my plugins in platforms/ios/myApp/Plugins and then copy the .h and .m files from plugins/org.apache.cordova.whatever/src/ios/ to platforms/ios/myApp/Plugins/org.apache.cordova.whatever/.

This used to work for me on the same app, but I ran into problems recently. Not sure if it was caused by one of my recent plugins (which I kinda doubt) or by an update to Xcode tools, cordova, or ionic (seems more likely to me). It seems to be a problem with the build script, but my make-fu is weak so it would take me a while to track down. Meanwhile, copying the src/ files is working for now.


#15

This worked like a charm :smile:


#16

I deleted the plugin/ios folder and did “sudo ionic platform ios”, added the plugins again (not sure if it does anything) and it worked.


#17

ionic platform rm ios
ionic platform add ios
ionic emulate ios


#18

I have the same issue removing platforms folder and removing ios.json doesnt help in my case. I even removed all plugins but still build doesnt pass


#19

I fixed it with removing platform then editing the config.xml ( I changed the app name ) and then adding ios platform again.


#20

removing the platform and adding it back worked for me.

ionic platform remove ios
ionic platform add ios