Shell_error : Exit status of command 'cordova platform add ios --nofetch' was 1 instead of 0

Hello,

I am building Android and iOS app with ionic V1 (On Windows). I had created android build from CLI and deployed on play store, now I am trying to build iOS IPA file from ionic pro account (https://ionicframework.com). I have committed my code to ionic. I have followed all the steps given to Build a Native Binary (https://ionicframework.com/docs/pro/package/).

Every time when I am trying to build package, It gets failed with following logs:

Running command: /Users/ionic/builds/project-1/hooks/after_prepare/010_add_platform_class.js /Users/ionic/builds/project-1
Error: spawn EACCES


+------+-----------------------+-------------+
|              fastlane summary              |
+------+-----------------------+-------------+
| Step | Action                | Time (in s) |
+------+-----------------------+-------------+
| 1    | default_platform      | 0           |
| 2    | build_summary         | 1           |
| 3    | download_www          | 4           |
| 4    | create_keychain       | 0           |
| 5    | download_certs        | 2           |
| 6    | import_certificate    | 0           |
| 7    | npm install --quiet   | 23          |
| đź’Ą   | cordova platform add  | 13          |
|      | ios --nofetch         |             |
| 9    | upload_logs           | 0           |
| 10   | shell command         | 0           |
| 11   | delete_keychain       | 0           |
+------+-----------------------+-------------+

[13:50:34]: fastlane finished with errors
[13:50:35]: Sending crash report...
[13:50:35]: The stack trace is sanitized so no personal information is sent.
[13:50:35]: To see what we are sending, look here: /Users/ionic/.fastlane/latest_crash.json
[13:50:35]: Learn more at https://github.com/fastlane/fastlane#crash-reporting
[13:50:35]: You can disable crash reporting by adding `opt_out_crash_reporting` at the top of your Fastfile

Looking for related GitHub issues on fastlane/fastlane...

\e[91mFailed to upload ipa to storage please retry your build.\e[0m
MAC Iteration 2048
MAC verified OK
PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2048
Certificate bag
PKCS7 Data
Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048
/Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane_core/lib/fastlane_core/ui/interface.rb:145:in `shell_error!': [!] Exit status of command 'cordova platform add ios --nofetch' was 1 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
Adding ios project...
Creating Cordova project for the iOS platform:
	Path: platforms/ios
	Package: com.lawtarazoo.app
	Name: Case Diary by Law Tarazoo
iOS project created with cordova-ios@4.5.4
Discovered plugin "cordova-plugin-inappbrowser" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-inappbrowser@^1.7.1" via npm
Installing "cordova-plugin-inappbrowser" for ios
Adding cordova-plugin-inappbrowser to package.json
Saved plugin info for "cordova-plugin-inappbrowser" to config.xml
Discovered plugin "cordova-plugin-device" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-device@^1.1.4" via npm
Installing "cordova-plugin-device" for ios
Adding cordova-plugin-device to package.json
Saved plugin info for "cordova-plugin-device" to config.xml
Discovered plugin "cordova-plugin-ionic-webview" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-ionic-webview@^1.1.11" via npm
Installing "cordova-plugin-ionic-webview" for ios
Adding cordova-plugin-ionic-webview to package.json
Saved plugin info for "cordova-plugin-ionic-webview" to config.xml
Discovered plugin "cordova-plugin-splashscreen" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-splashscreen@^4.0.3" via npm
Installing "cordova-plugin-splashscreen" for ios
Adding cordova-plugin-splashscreen to package.json
Saved plugin info for "cordova-plugin-splashscreen" to config.xml
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-whitelist@^1.3.1" via npm
Installing "cordova-plugin-whitelist" for ios
Adding cordova-plugin-whitelist to package.json
Saved plugin info for "cordova-plugin-whitelist" to config.xml
Discovered plugin "ionic-plugin-keyboard" in config.xml. Adding it to the project
Fetching plugin "ionic-plugin-keyboard@^2.2.1" via npm
Installing "ionic-plugin-keyboard" for ios
Adding ionic-plugin-keyboard to package.json
Saved plugin info for "ionic-plugin-keyboard" to config.xml
Discovered plugin "cordova-android-support-gradle-release" in config.xml. Adding it to the project
Fetching plugin "cordova-android-support-gradle-release" via npm
Installing "cordova-android-support-gradle-release" for ios
Adding cordova-android-support-gradle-release to package.json
Saved plugin info for "cordova-android-support-gradle-release" to config.xml
Discovered plugin "pushwoosh-cordova-plugin" in config.xml. Adding it to the project
Fetching plugin "pushwoosh-cordova-plugin@^7.1.0" via npm
Installing "pushwoosh-cordova-plugin" for ios
Adding pushwoosh-cordova-plugin to package.json
Saved plugin info for "pushwoosh-cordova-plugin" to config.xml
Discovered plugin "cordova-plugin-statusbar" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-statusbar@2.2.1" via npm
Installing "cordova-plugin-statusbar" for ios
Adding cordova-plugin-statusbar to package.json
Saved plugin info for "cordova-plugin-statusbar" to config.xml
Discovered plugin "cordova-sms-plugin" in config.xml. Adding it to the project
Fetching plugin "cordova-sms-plugin@~0.1.11" via npm
Installing "cordova-sms-plugin" for ios
Adding cordova-sms-plugin to package.json
Saved plugin info for "cordova-sms-plugin" to config.xml
Discovered plugin "cordova-plugin-contacts" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-contacts@^3.0.0" via npm
npm WARN deprecated cordova-plugin-contacts@3.0.1: This plugin has been deprecated
Installing "cordova-plugin-contacts" for ios
Adding cordova-plugin-contacts to package.json
Saved plugin info for "cordova-plugin-contacts" to config.xml
Discovered plugin "cordova-plugin-x-socialsharing" in config.xml. Adding it to the project
Fetching plugin "https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git" via git clone
Repository "https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git" checked out to git ref "master".
Installing "cordova-plugin-x-socialsharing" for ios
Fetching plugin "es6-promise-plugin@4.1.0" via npm
Installing "es6-promise-plugin" for ios
Adding cordova-plugin-x-socialsharing to package.json
Saved plugin info for "cordova-plugin-x-socialsharing" to config.xml
Discovered plugin "cordova-plugin-network-information" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-network-information@~2.0.1" via npm
Installing "cordova-plugin-network-information" for ios
Adding cordova-plugin-network-information to package.json
Saved plugin info for "cordova-plugin-network-information" to config.xml
Running command: /Users/ionic/builds/project-1/hooks/after_prepare/010_add_platform_class.js /Users/ionic/builds/project-1
Error: spawn EACCES

	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane_core/lib/fastlane_core/ui/ui.rb:16:in `method_missing'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/helper/sh_helper.rb:80:in `sh_control_output'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/helper/sh_helper.rb:16:in `sh_no_action'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/fast_file.rb:186:in `block in sh'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/fast_file.rb:185:in `sh'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/fast_file.rb:180:in `sh'
	from Fastfile:28:in `block (2 levels) in parsing_binding'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/lane.rb:33:in `call'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/lane.rb:33:in `call'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/command_line_handler.rb:34:in `handle'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/commands_generator.rb:107:in `block (2 levels) in run'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.5/lib/commander/command.rb:178:in `call'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.5/lib/commander/command.rb:178:in `call'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.5/lib/commander/command.rb:153:in `run'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.5/lib/commander/runner.rb:476:in `run_active_command'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:75:in `run!'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.5/lib/commander/delegates.rb:15:in `run!'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/commands_generator.rb:336:in `run'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/cli_tools_distributor.rb:94:in `take_off'
	from /Users/ionic/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/bin/fastlane:20:in `'
	from /Users/ionic/.fastlane/bin/bundle/bin/fastlane:22:in `load'
	from /Users/ionic/.fastlane/bin/bundle/bin/fastlane:22:in `
'
Running after script...
$ clean-up
Cleaning up files...
Successful clean up
ERROR: Job failed: Process exited with: 1. Reason was:  ()

My environment versions :

cli packages: 

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 7.1.0
    Gulp CLI  : CLI version 3.9.1 Local version 3.9.1

local packages:

    Cordova Platforms : android 6.3.0 ios 4.5.4
    Ionic Framework   : ionic1 1.3.3

System:

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

Misc:

    backend : pro

Please help me track the exact problem because I am not getting these errors and suggest me what I have to be done to create a build.

Thanks. :slight_smile: