ionic-team / ionic-cli

The Ionic command-line interface
MIT License
2k stars 654 forks source link

Ionic Prod Build Failure: Error code 65 for command xcodebuild with args #3640

Closed tskweres closed 6 years ago

tskweres commented 6 years ago

I try to run:

ionic cordova build ios --device --prod --release

And the following error happens:

CordovaError: Promise rejected with non-error: 'Error code 65 for command: xcodebuild with args: -exportArchive,-archivePath,MyApp.xcarchive,-exportOptionsPlist,/Users/myuser/dev/MyApp-app/platforms/ios/exportOptions.plist,-exportPath,/Users/myuser/dev/MyApp-app/platforms/ios/build/device' at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15) at <anonymous> at process._tickCallback (internal/process/next_tick.js:118:7) [ERROR] An error occurred while running subprocess cordova. `Ionic:

ionic (Ionic CLI) : 4.1.2 (/usr/local/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.0

Cordova:

cordova (Cordova CLI) : 8.1.1 (cordova-lib@8.1.0) Cordova Platforms : ios 4.5.5 Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 19 other plugins)

System:

Android SDK Tools : 26.1.1 (/usr/local/share/android-sdk) ios-deploy : 1.9.2 NodeJS : v9.8.0 (/usr/local/bin/node) npm : 6.4.0 OS : macOS High Sierra Xcode : Xcode 10.0 Build version 10A255`

{ "name": "myapp", "version": "2.8.0", "author": "myapp", "homepage": "https://myapp.org/", "private": true, "scripts": { "clean": "ionic-app-scripts clean", "build": "ionic-app-scripts build", "lint": "ionic-app-scripts lint", "ionic:build": "ionic-app-scripts build", "ionic:serve": "ionic-app-scripts serve" }, "config": { "ionic_bundler": "webpack", "ionic_webpack": "./config/webpack.config.js" }, "dependencies": { "@angular/common": "4.4.3", "@angular/compiler": "4.4.3", "@angular/compiler-cli": "4.4.3", "@angular/core": "4.4.3", "@angular/forms": "4.4.3", "@angular/http": "4.4.3", "@angular/platform-browser": "4.4.3", "@angular/platform-browser-dynamic": "4.4.3", "@ionic-native/app-rate": "4.8.0", "@ionic-native/app-version": "4.8.0", "@ionic-native/camera": "4.8.0", "@ionic-native/clipboard": "4.8.0", "@ionic-native/core": "4.8.0", "@ionic-native/device": "4.8.0", "@ionic-native/google-analytics": "4.8.0", "@ionic-native/in-app-browser": "4.8.0", "@ionic-native/keyboard": "4.8.0", "@ionic-native/network": "4.8.0", "@ionic-native/onesignal": "4.8.0", "@ionic-native/screen-orientation": "4.8.0", "@ionic-native/social-sharing": "4.8.0", "@ionic-native/splash-screen": "4.8.0", "@ionic-native/status-bar": "4.8.0", "@ionic/storage": "^2.0.1", "angular2-highcharts": "^0.5.5", "angular2-uuid": "^1.1.1", "angular2-virtual-scroll": "^0.3.1", "base64-js": "^1.2.1", "cordova-browser": "~5.0.1", "cordova-clipboard": "^1.2.1", "cordova-ios": "4.5.5", "cordova-plugin-add-swift-support": "^1.7.2", "cordova-plugin-app-version": "^0.1.9", "cordova-plugin-apprate": "^1.4.0", "cordova-plugin-camera": "^4.0.3", "cordova-plugin-device": "^1.1.7", "cordova-plugin-dialogs": "^1.3.4", "cordova-plugin-globalization": "1.11.0", "cordova-plugin-google-analytics": "^1.8.6", "cordova-plugin-inappbrowser": "^1.7.2", "cordova-plugin-ionic-webview": "^1.2.1", "cordova-plugin-nativestorage": "^2.3.2", "cordova-plugin-network-information": "^1.3.4", "cordova-plugin-screen-orientation": "^3.0.1", "cordova-plugin-splashscreen": "^4.1.0", "cordova-plugin-statusbar": "^2.4.2", "cordova-plugin-whitelist": "^1.3.3", "cordova-plugin-x-socialsharing": "^5.4.1", "cordova-sqlite-storage": "^2.4.0", "countup.js": "^1.9.2", "es6-promise-plugin": "^4.1.0", "fast-safe-stringify": "^2.0.3", "flag-icon-css": "^2.8.0", "highcharts": "^5.0.14", "ionic-angular": "3.9.2", "ionic-plugin-keyboard": "^2.2.1", "ionicons": "3.0.0", "libphonenumber-js": "^1.2.15", "moment": "^2.19.1", "numeral": "^2.0.6", "onesignal-cordova-plugin": "^2.4.3", "rxjs": "5.4.3", "sw-toolbox": "3.6.0", "yargs-parser": "^8.0.0", "zone.js": "0.8.18" }, "devDependencies": { "@ionic/app-scripts": "3.2.0", "dezalgo": "~1.0", "typescript": "2.3.4", "webpack-obfuscator": "^0.12.0" }, "description": "My App.", "cordova": { "plugins": { "ionic-plugin-keyboard": {}, "cordova-plugin-app-version": {}, "cordova-plugin-splashscreen": {}, "cordova-plugin-network-information": {}, "cordova-plugin-whitelist": {}, "cordova-plugin-device": {}, "cordova-plugin-inappbrowser": {}, "cordova-plugin-screen-orientation": {}, "cordova-plugin-dialogs": {}, "cordova-plugin-add-swift-support": {}, "cordova-plugin-camera": {}, "cordova-plugin-ionic-webview": {}, "cordova-plugin-statusbar": {}, "cordova-clipboard": {}, "cordova-sqlite-storage": {}, "cordova-plugin-google-analytics": { "GMS_VERSION": "11.0.1" }, "cordova-plugin-apprate": {}, "cordova-plugin-globalization": {} }, "platforms": [ "browser", "ios" ] } }

imhoffd commented 6 years ago

@tskweres Can you show the error above the 'Error code 65' error? It should be a message about what's wrong.

hciyang commented 6 years ago

https://stackoverflow.com/questions/52385600/ionic-ios-build-fails-error-archive-not-found/52388081

tskweres commented 6 years ago

@hciyang i tried that fix, and got an error code 70 instead of 65 :/

Here is the entire error @dwieeb :

cordova build ios --release --device Building project: /Users/myuser/dev/myapp/platforms/ios/MyApp.xcworkspace Configuration: Release Platform: device User defaults from command line: IDEArchivePathOverride = /Users/myuser/dev/myapp/platforms/ios/MyApp.xcarchive

Build settings from command line: CONFIGURATION_BUILD_DIR = /Users/myuser/dev/my-app/platforms/ios/build/device SHARED_PRECOMPS_DIR = /Users/myuser/dev/my-app/platforms/ios/build/sharedpch

Build settings from configuration file '/Users/myuser/dev/my-app/platforms/ios/cordova/build-release.xcconfig': CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES CODE_SIGN_ENTITLEMENTS = $(PROJECT_DIR)/$(PROJECT_NAME)/Entitlements-$(CONFIGURATION).plist CODE_SIGN_IDENTITY = iPhone Distribution ENABLE_BITCODE = NO FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/OneSignal/iOS_SDK/OneSignalSDK/Framework" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/OneSignal" OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/OneSignal" OTHER_LDFLAGS = $(inherited) -ObjC -framework "OneSignal" -framework "SystemConfiguration" -framework "UIKit" -framework "UserNotifications" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h

error: archive not found at path '/Users/myuser/dev/my-app/platforms/ios/MyApp.xcarchive' EXPORT FAILED

CordovaError: Promise rejected with non-error: 'Error code 65 for command: xcodebuild with args: -exportArchive,-archivePath,MyApp.xcarchive,-exportOptionsPlist,/Users/myuser/dev/my-app/platforms/ios/exportOptions.plist,-exportPath,/Users/myuser/dev/my-app/platforms/ios/build/device' at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15) at at process._tickCallback (internal/process/next_tick.js:118:7) [ERROR] An error occurred while running subprocess cordova.

    cordova build ios --release --device exited with exit code 1.
imhoffd commented 6 years ago

Ah, so this is just the issue that Xcode 10 is not compatible with cordova-ios yet. Please see https://github.com/apache/cordova-ios/issues/407.

I will be closing this as it is not a bug report/feature request of the Ionic CLI.

ionitron-bot[bot] commented 6 years ago

Thanks for the issue! This issue appears to be a support request. We use this issue tracker exclusively for bug reports and feature requests. For support questions, please see our Support Page.

Thank you for using Ionic!