Ionic Package: iOS Release Build Error in Package/Ionic Services


#1

I am trying to build my normal package using Ionic Cloud and getting this error for iOS (Android is fine):

Anyone know what this means?

The following build commands failed:
Check dependencies
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/package/workspace/apps-0faa2935-462/cordova/platforms/ios/cordova/build-release.xcconfig,-workspace,QueMesa.xcworkspace,-scheme,QueMesa,-configuration,Release,-destination,generic/platform=iOS,-archivePath,QueMesa.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/package/workspace/apps-0faa2935-462/cordova/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/package/workspace/apps-0faa2935-462/cordova/platforms/ios/build/sharedpch

cli packages: (C:\git\QueMesaMobile\node_modules)

@ionic/cli-utils  : 1.13.1
ionic (Ionic CLI) : 3.13.2

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.2.3 browser 4.1.0 ios 4.3.1
Ionic Framework    : ionic-angular 3.7.1

System:

Node : v6.10.0
npm  : 3.10.10
OS   : Windows 10

Misc:

backend : legacy

#2

Most likely there’s a conflict with one of your plugins, your Apple Certificate is not configured correctly, or your platform’s config.xml does not include a plugin that it should include.


#3

Try updating app-scripts to version 3.0.

Also, when I get error 65 for iOS it’s usually because I don’t have Xcode signing configured properly. Open up in Xcode and double check that the signing singatures are correct.


#4

Hmm - I had to downgrade back to app-scripts 2.1.4 because 3.0 did not recognise our Environment file (additional build actions). However I will try it anyway and see if that fixes it.


#5

Ok thanks - we’ve tried rolling back to an older version that did work and it is also failing strangely. The certificates haven’t changed since the last succesful build (2 weeks earlier) but I will double check.

I noticed some plugins for iOS have changed in one of the new Ionic releases - I will investigate - at this point not having much luck narrowing down the problem.


#6

Error code 65 is a blanket error and can be caused by many things.
Do you get any other meaningful output before that?


#7

It’s really odd. I went back to my master branch to the last released version that was successful and delete the NodeModules folder and ran npm -i. It still fails (this built successfully 2 weeks ago). I repeated the test on a different computer with the same result.

This leads me to think it is either

  1. Ionic Cloud Package has changed since October 12 (last successful iOS Cloud build)
  2. One of my global dependacies has been updated.

I then updated Ionic Scripts, Ionic CLI and Cordova all to the latest so my Ionic Info file looks like this:
cli packages: (C:\git\QueMesaMobile\node_modules)
@ionic/cli-utils : 1.15.2
ionic (Ionic CLI) : 3.15.2

global packages:
cordova (Cordova CLI) : 7.1.0

local packages:
@ionic/app-scripts : 3.0.1
Cordova Platforms : android 6.2.3 browser 4.1.0 ios 4.3.1
Ionic Framework : ionic-angular 3.7.1

System:
Node : v6.10.0
npm : 3.10.10
OS : Windows 10

Environment Variables:
ANDROID_HOME : not set

Misc:
backend : legacy

With the same result…

Now I am going to try a brand new project to see if that works, and also change my current project to a new Cloud project.


#8

Updating is good, but is there any more output in the build log?


#9

Good point! It’s a different error now - something has run out of space! It’s not my harddrive so I think it might be something on Ionic Package service? (this is the build output from https://apps.ionic.io/app/xyz/package, not from my command window)

Discovered plugin “cordova-plugin-google-analytics” in config.xml. Adding it to the project
shell.js: internal error
Error: ENOSPC: no space left on device, write
at Error (native)
at Object.fs.writeSync (fs.js:788:20)
at copyFileSync (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:34:8)
at cpdirSyncRecursive (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:82:9)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:180:9
at Array.forEach (native)
at Object._cp (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:157:11)
at Object.cp (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/common.js:186:23)
at copyPlugin (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:376:15)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:233:28

I see this has been raised before here: Ionic package build ios - Error: ENOSPC: no space left on device, write - I will contact Ionic Support as I am unable to release my product


#10

I was having this problem earlier. It seems to be failing at some other part of the process now,

** ARCHIVE FAILED **


The following build commands failed:
        Ld /Users/package/Library/Developer/Xcode/DerivedData/Sippin-apsqnitpryjqthcronpsavfjfxik/Build/Intermediates/ArchiveIntermediates/Sippin/IntermediateBuildFilesPath/Sippin.build/Debug-iphoneos/Sippin.build/Objects-normal/armv7/Sippin normal armv7
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/package/workspace/apps-8b589aec-396/cordova/platforms/ios/cordova/build-debug.xcconfig,-workspace,Sippin.xcworkspace,-scheme,Sippin,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,Sippin.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/package/workspace/apps-8b589aec-396/cordova/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/package/workspace/apps-8b589aec-396/cordova/platforms/ios/build/sharedpch

The package build seems to have been buggy all day.

I am led to believe this is a server-side issue because scrolling up in the logs shows the initial point of error:

ld: framework not found IOSurface for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

P.S. My last successful cloud build was on October 19.


#11

Update:

I just got a reply from Zack H. confirming that the ENOSPC error should no longer be occurring:

image


#12

Thanks, that got me past the server error.

Now my error is:
“Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

The problem is the GeoFence plugin on iOS. It was working fine on the 13th of October and before (the current live version of QueMesa.com uses GeoFencing in iOS. However I can’t get it to build now.

I have tried installing “cordova-plugin-add-swift-support” plugin and setting

    <preference name="UseLegacySwiftLanguageVersion" value="true" />
    <preference name="swift-version" value="2.3" />

but no joy.


#13

Rodney,

Yes, I am using a different geo-based plugin on iOS. I can’t get mine to build now either. I’m wondering if there has been something really strange with their build environment going on lately. My thoughts are that:

  1. Apple updated something between October 19 and Oct 27, and/or
  2. Ionic has not yet updated their package build services, or
  3. Ionic changed something with their package build services and failed to provide backwards compatibility for plugins not yet updated. The error I am getting inclines me to believe that it is the third option, as my error is related to this StackOverflow: https://stackoverflow.com/questions/44450673/framework-not-found-iosurface-for-architecture-arm64

That StackOverflow indicates that there is some framework missing from the build environment, as is supported by my error logs. Are you still having your issue?

Regards,
Ray


#14

Hi Ray,

Yes, we cannot release our product app due to this and cannot find a solution.

The last successful build for us October 12 (although we did not try an iOS build again until the 19th when it failed).
We’re going to try a few things today and I will report back.

We might need some assisitance from the Ionic Core Team on this.


#15

I’m in the same boat, Rodney. I cannot release some core updates due to this and since I am very sure it is on their backend, can do nothing about it. I don’t develop on a Mac so there is no way for me to build the iOS update.

I have had a ticket in with the Ionic Support Team for 4 days and have heard nothing back on this issue. This is very frustrating. Nor have I heard back from them (even to indicate they are working on it) besides the initial response that the ENOSPC error should be fixed.


#16

Ok, we’ve done some more fiddling and we think this is what has happened:

  1. The Ionic Cloud build was upgrade to use a newer version of Xcode which uses Swift 3 (around the 19th of October or a few days before)
  2. The GEOFencing plugin needs to use Xcode 8.2 which is compatible with Swift 2.3. It does not work with Swift 3
  3. Therefore the build returns errors saying that the GEOFencing plugin cannot be used

Possible Solutions:

  1. Use a flag to tell Ionic Package to use Xcode 8.2 so we can use the existing plugin as before
  2. Get the Cordova Plugin updated so that it works with Swift 3

I am appealing to the GeoFence creator to work on Point 2 but they obviously have their own time and schedules (I have no idea to update it to Swift 3)

I would really like some guidance from the Ionic Core Team if my observations are correct to understand if there solutions and the best way forward or not. Ie. Was something changed in the Ionic Cloud Build around the 19th of October, and if so, what was it? Thanks


#17

I’m coming to the same conclusion. I have spent the past few hours gruelingly updating all my packages and accounting for changes (I was a few versions behind, just in case that was the problem) to no avail. Still failing with cloud build, and we are dependent on using ionic package for our iOS builds.

The lack of transparency is definitely frustrating. For me, it seems like there is just a missing framework.

Check this out, in regards to my specific error:
https://mmmag.appsee.com/2014/09/22/xcode-new-link-frameworks-automatically-fix-framework-not-found-metal-for-architecture-armv7/

Also, I spoke with the developer of my plugin, and he says that the framework IS Swift 3 compatible. So Swift 3 is not the issue, but rather it seems that when using the ‘link frameworks automatically’ flag that is causing an issue.

Furthermore, the developer of my plugin says that IOSurface IS an IOS 11 API, so in my case their package build services are actually behind. Perhaps they are working on Xcode 8.3 and that is why it is working for neither of us. I am completely sure this is an issue with their build services though, and not our builds.


#18

I had the clever thought of setting<preference name="deployment-target" value="11.0" /> since IOSurface is an IOS 11 (and backdated to 10) API. However after setting this preference, we can see the SAME error setting up on the build environment.


#19

Here is another interesting piece on my error: https://www.telerik.com/forums/ios-build-failure-after-3-7-5

This is from a different build packaging company but at least I know why mine is failing. They must have updated or reverted something on or around that date to cause your build failure.

Cheers,
Ray


#20

Via slack, they compile with Xcode version 8.x
image

So there’s my issue. Hopefully it helps solve yours.