Cannot read property 'reject' of undefined

Hi,

I want to run my old ionic project but I have Cannot read property 'reject' of undefined error and I don’t know what to do ! I think to downgrade plugin version but wich plugin ?

there is my package.json =

{
  "name": "appName",
  "version": "1.2.6",
  "author": "Me",
  "homepage": "http://me.com",
  "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"
  },
  "dependencies": {
    "@angular/common": "5.0.3",
    "@angular/compiler": "5.0.3",
    "@angular/compiler-cli": "5.0.3",
    "@angular/core": "5.0.3",
    "@angular/forms": "5.0.3",
    "@angular/http": "5.0.3",
    "@angular/platform-browser": "5.0.3",
    "@angular/platform-browser-dynamic": "5.0.3",
    "@ionic-native/android-permissions": "^4.16.0",
    "@ionic-native/app-version": "^4.16.0",
    "@ionic-native/background-mode": "^4.20.0",
    "@ionic-native/camera": "^4.16.0",
    "@ionic-native/contacts": "^4.16.0",
    "@ionic-native/core": "4.4.0",
    "@ionic-native/file": "^4.16.0",
    "@ionic-native/file-chooser": "^4.16.0",
    "@ionic-native/file-path": "^4.16.0",
    "@ionic-native/file-picker": "^4.16.0",
    "@ionic-native/file-transfer": "^4.16.0",
    "@ionic-native/http": "^4.16.0",
    "@ionic-native/image-picker": "^4.16.0",
    "@ionic-native/in-app-browser": "^4.16.0",
    "@ionic-native/market": "^4.16.0",
    "@ionic-native/native-storage": "^4.16.0",
    "@ionic-native/network": "^4.16.0",
    "@ionic-native/photo-library": "^4.16.0",
    "@ionic-native/sms": "^4.16.0",
    "@ionic-native/splash-screen": "4.4.0",
    "@ionic-native/status-bar": "4.4.0",
    "@ionic/storage": "2.1.3",
    "com.synconset.imagepicker": "^2.1.10",
    "cordova-android": "6.3.0",
    "cordova-custom-config": "^5.0.2",
    "cordova-ios": "^5.0.1",
    "cordova-plugin-add-swift-support": "^1.7.2",
    "cordova-plugin-advanced-http": "~1.11.1",
    "cordova-plugin-android-permissions": "^1.0.0",
    "cordova-plugin-app-version": "^0.1.9",
    "cordova-plugin-background-mode": "0.7.2",
    "cordova-plugin-contacts": "^3.0.1",
    "cordova-plugin-device": "^2.0.1",
    "cordova-plugin-file": "^6.0.1",
    "cordova-plugin-file-transfer": "^1.7.1",
    "cordova-plugin-filechooser": "^1.0.1",
    "cordova-plugin-filepath": "^1.4.2",
    "cordova-plugin-filepicker": "^1.1.4",
    "cordova-plugin-inappbrowser": "^3.0.0",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^1.1.19",
    "cordova-plugin-market": "^1.2.0",
    "cordova-plugin-nativestorage": "^2.3.2",
    "cordova-plugin-network-information": "^2.0.1",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-telerik-imagepicker": "^2.2.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-sms-plugin": "^0.1.13",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "jquery": "^3.3.1",
    "market": "1.0.0",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "wifiwizard": "^0.2.11",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.8",
    "@types/node": "^10.12.1",
    "typescript": "2.4.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-network-information": {},
      "cordova-plugin-file": {},
      "cordova-plugin-filepath": {},
      "cordova-plugin-file-transfer": {},
      "cordova-plugin-nativestorage": {},
      "cordova-custom-config": {},
      "cordova-plugin-android-permissions": {},
      "cordova-plugin-market": {},
      "cordova-plugin-app-version": {},
      "com.synconset.imagepicker": {
        "PHOTO_LIBRARY_USAGE_DESCRIPTION": " "
      },
      "cordova-plugin-contacts": {},
      "cordova-plugin-filechooser": {},
      "cordova-plugin-filepicker": {},
      "cordova-plugin-advanced-http": {},
      "cordova-sms-plugin": {},
      "cordova-plugin-inappbrowser": {},
      "com.pylonproducts.wifiwizard": {}
    },
    "platforms": [
      "android"
    ]
  }
}

and there is the result of the command =

ionic cordova run ios
> ionic-app-scripts build --target cordova --platform ios
[10:28:47]  ionic-app-scripts 3.1.8 
[10:28:47]  build dev started ... 
[10:28:47]  clean started ... 
[10:28:47]  clean finished in 2 ms 
[10:28:47]  copy started ... 
[10:28:47]  deeplinks started ... 
[10:28:48]  deeplinks finished in 130 ms 
[10:28:48]  transpile started ... 
[10:28:51]  transpile finished in 3.03 s 
[10:28:51]  preprocess started ... 
[10:28:51]  preprocess finished in less than 1 ms 
[10:28:51]  webpack started ... 
[10:28:51]  copy finished in 3.28 s 
[10:28:55]  webpack finished in 4.09 s 
[10:28:55]  sass started ... 
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[10:28:56]  sass finished in 841 ms 
[10:28:56]  postprocess started ... 
[10:28:56]  postprocess finished in 7 ms 
[10:28:56]  lint started ... 
[10:28:56]  build dev finished in 8.18 s 
[10:28:58]  lint finished in 2.58 s 
> cordova run ios
Cannot read property 'reject' of undefined
[ERROR] An error occurred while running subprocess cordova.
        
        cordova run ios exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.

Please help me the reject var is in my rest provider to make requests
Thanks

share the piece of code please

I have exactly the same problem but with Ionic online packaging.

It worked very well in the past and a few days ago I changed something minor in the code and now it does not build anymore. Even reverting my change does not help.

@zubinraja
Since it worked in the past and now it’s broken, with the same exact code and settings, it cannot be related to the code. It must be some settings or plugins not playing well together with updated CLIs (NPM, Node, Ionic, …) at ionic but I did not find a solution until now.

Build log from Ionic:

[07:08:02]: ---------------------------
[07:08:02]: --- Step: build_pro_app ---
[07:08:02]: ---------------------------
[07:08:02]: Installing Dependencies
[07:08:02]: $ npm install --quiet --no-optional
[07:08:27]: ▸ > node-sass@4.11.0 install /Users/ionic/builds/project-0/node_modules/node-sass
[07:08:27]: ▸ > node scripts/install.js
[07:08:27]: ▸ Downloading binary from https://github.com/sass/node-sass/releases/download/v4.11.0/darwin-x64-64_binding.node
[07:08:29]: ▸ Download complete
[07:08:29]: ▸ Binary saved to /Users/ionic/builds/project-0/node_modules/node-sass/vendor/darwin-x64-64/binding.node
[07:08:29]: ▸ Caching binary to /Users/ionic/.npm/node-sass/4.11.0/darwin-x64-64_binding.node
[07:08:29]: ▸ > uglifyjs-webpack-plugin@0.4.6 postinstall /Users/ionic/builds/project-0/node_modules/uglifyjs-webpack-plugin
[07:08:29]: ▸ > node lib/post_install.js
[07:08:29]: ▸ > node-sass@4.11.0 postinstall /Users/ionic/builds/project-0/node_modules/node-sass
[07:08:29]: ▸ > node scripts/build.js
[07:08:29]: ▸ Binary found at /Users/ionic/builds/project-0/node_modules/node-sass/vendor/darwin-x64-64/binding.node
[07:08:29]: ▸ Testing binary
[07:08:29]: ▸ Binary is fine
[07:08:29]: ▸ > cordova.plugins.diagnostic@4.0.11 postinstall /Users/ionic/builds/project-0/node_modules/cordova.plugins.diagnostic
[07:08:29]: ▸ > node ./scripts/apply-modules.js
[07:08:30]: ▸ added 848 packages from 700 contributors and audited 7508 packages in 27.03s
[07:08:30]: ▸ found 7 vulnerabilities (2 low, 1 moderate, 4 high)
[07:08:30]: ▸ run `npm audit fix` to fix them, or `npm audit` for details
[07:08:30]: Build script detected..
[07:08:30]: $ npm run build
[07:08:31]: ▸ > paydesk@1.3.6 build /Users/ionic/builds/project-0
[07:08:31]: ▸ > ionic-app-scripts build
[07:08:32]: ▸
[07:08:32]  ionic-app-scripts 3.2.2
[07:08:32]: ▸
[07:08:32]  build dev started ...
[07:08:33]: ▸
[07:08:32]  clean started ...
[07:08:33]: ▸
[07:08:33]  clean finished in 2 ms
[07:08:33]: ▸
[07:08:33]  copy started ...
[07:08:33]: ▸
[07:08:33]  deeplinks started ...
[07:08:33]: ▸
[07:08:33]  deeplinks finished in 137 ms
[07:08:33]: ▸
[07:08:33]  transpile started ...
[07:08:38]: ▸
[07:08:38]  transpile finished in 4.90 s
[07:08:38]: ▸
[07:08:38]  preprocess started ...
[07:08:38]: ▸
[07:08:38]  preprocess finished in 1 ms
[07:08:38]: ▸
[07:08:38]  webpack started ...
[07:08:38]: ▸
[07:08:38]  copy finished in 5.22 s
[07:08:43]: ▸
[07:08:43]  webpack finished in 5.86 s
[07:08:43]: ▸
[07:08:43]  sass started ...
[07:08:45]: ▸
[07:08:45]  sass finished in 1.38 s
[07:08:45]: ▸
[07:08:45]  postprocess started ...
[07:08:45]: ▸
[07:08:45]  postprocess finished in 8 ms
[07:08:45]: ▸
[07:08:45]  lint started ...
[07:08:45]: ▸
[07:08:45]  build dev finished in 12.40 s
[07:08:49]: ▸
[07:08:49]  lint finished in 3.69 s
[07:08:49]: $ ionic info
[07:10:59]: ▸ Ionic:
[07:10:59]: ▸ ionic (Ionic CLI)  : 4.12.0 (/usr/local/lib/node_modules/ionic)
[07:10:59]: ▸ Ionic Framework    : ionic-angular 3.9.2
[07:10:59]: ▸ @ionic/app-scripts : 3.2.2
[07:10:59]: ▸ Cordova:
[07:10:59]: ▸ cordova (Cordova CLI) : 9.0.3 (cordova-lib@9.0.2)
[07:10:59]: ▸ Cordova Platforms     : none
[07:10:59]: ▸ Cordova Plugins       : no whitelisted plugins (0 plugins total)
[07:10:59]: ▸ System:
[07:10:59]: ▸ ios-sim : 8.0.1
[07:10:59]: ▸ NodeJS  : v10.15.0 (/usr/local/Cellar/node@10/10.15.0/bin/node)
[07:10:59]: ▸ npm     : 6.4.1
[07:10:59]: ▸ OS      : macOS High Sierra
[07:10:59]: ▸ Xcode   : Xcode 10.1 Build version 10B61
[07:10:59]: Generating app manifest...
[07:10:59]: $ ionic deploy manifest
[07:11:00]: ----------------------------------
[07:11:00]: --- Step: add_cordova_to_index ---
[07:11:00]: ----------------------------------
[07:11:00]: codova.js already present in index.html: skipping
[07:11:00]: --------------------------------------
[07:11:00]: --- Step: cordova platform add ios ---
[07:11:00]: --------------------------------------
[07:11:00]: $ cordova platform add ios
[07:11:01]: ▸ Using cordova-fetch for cordova-ios@~5.0.1
[07:11:01]: ▸ Adding ios project...
[07:11:01]: ▸ Creating Cordova project for the iOS platform:
[07:11:01]: ▸ Path: platforms/ios
[07:11:01]: ▸ Package: ch.apnet.app.paydesk
[07:11:01]: ▸ Name: PayDesk
[07:11:01]: ▸ iOS project created with cordova-ios@5.0.1
[07:11:01]: ▸ Discovered saved plugin "cordova-custom-config". Adding it to the project
[07:11:02]: ▸ Installing "cordova-custom-config" for ios
[07:11:02]: ▸ Adding cordova-custom-config to package.json
[07:11:02]: ▸ Discovered saved plugin "cordova-plugin-device". Adding it to the project
[07:11:02]: ▸ Installing "cordova-plugin-device" for ios
[07:11:02]: ▸ Adding cordova-plugin-device to package.json
[07:11:02]: ▸ Discovered saved plugin "cordova-plugin-splashscreen". Adding it to the project
[07:11:02]: ▸ Installing "cordova-plugin-splashscreen" for ios
[07:11:02]: ▸ Adding cordova-plugin-splashscreen to package.json
[07:11:02]: ▸ Discovered saved plugin "cordova-plugin-statusbar". Adding it to the project
[07:11:02]: ▸ Installing "cordova-plugin-statusbar" for ios
[07:11:02]: ▸ Adding cordova-plugin-statusbar to package.json
[07:11:02]: ▸ Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project
[07:11:02]: ▸ Installing "cordova-plugin-whitelist" for ios
[07:11:03]: ▸ Adding cordova-plugin-whitelist to package.json
[07:11:03]: ▸ Discovered saved plugin "cordova-sqlite-storage". Adding it to the project
[07:11:03]: ▸ Installing "cordova-sqlite-storage" for ios
[07:11:03]: ▸ installing external dependencies via npm
[07:11:03]: ▸ for package name: cordova-sqlite-storage
[07:11:05]: ▸ npm install of external dependencies ok
[07:11:05]: ▸ Adding cordova-sqlite-storage to package.json
[07:11:05]: ▸ Discovered saved plugin "cordova-android-support-gradle-release". Adding it to the project
[07:11:05]: ▸ Installing "cordova-android-support-gradle-release" for ios
[07:11:05]: ▸ Adding cordova-android-support-gradle-release to package.json
[07:11:05]: ▸ Discovered saved plugin "ch.codeworx.cordova.plugin.barcodescanner.emdk". Adding it to the project
[07:11:16]: ▸ Installing "ch.codeworx.cordova.plugin.barcodescanner.emdk" for ios
[07:11:16]: ▸ Adding ch.codeworx.cordova.plugin.barcodescanner.emdk to package.json
[07:11:16]: ▸ Discovered saved plugin "cordova-plugin-bluetooth-serial". Adding it to the project
[07:11:16]: ▸ Installing "cordova-plugin-bluetooth-serial" for ios
[07:11:16]: ▸ Adding cordova-plugin-bluetooth-serial to package.json
[07:11:16]: ▸ Discovered saved plugin "phonegap-nfc". Adding it to the project
[07:11:16]: ▸ Installing "phonegap-nfc" for ios
[07:11:16]: ▸ Adding phonegap-nfc to package.json
[07:11:17]: ▸ Discovered saved plugin "cordova-plugin-ionic". Adding it to the project
[07:11:17]: ▸ Installing "cordova-plugin-ionic" for ios
[07:11:17]: ▸ Plugin dependency "cordova-plugin-splashscreen@5.0.2" already fetched, using that version.
[07:11:17]: ▸ Dependent plugin "cordova-plugin-splashscreen" already installed on ios.
[07:11:17]: ▸ Installing "cordova-plugin-ionic-webview" for ios
[07:11:18]: ▸ Installing "cordova-plugin-file" for ios
[07:11:18]: ▸ Installing "cordova-plugin-file-transfer" for ios
[07:11:18]: ▸ Plugin dependency "cordova-plugin-file@6.0.1" already fetched, using that version.
[07:11:18]: ▸ Dependent plugin "cordova-plugin-file" already installed on ios.
[07:11:18]: ▸ Adding cordova-plugin-ionic to package.json
[07:11:18]: ▸ Discovered saved plugin "phonegap-plugin-barcodescanner". Adding it to the project
[07:11:18]: ▸ Installing "phonegap-plugin-barcodescanner" for ios
[07:11:18]: ▸ Adding phonegap-plugin-barcodescanner to package.json
[07:11:18]: ▸ Discovered saved plugin "cordova.plugins.diagnostic". Adding it to the project
[07:11:18]: ▸ Installing "cordova.plugins.diagnostic" for ios
[07:11:19]: ▸ Adding cordova.plugins.diagnostic to package.json
[07:11:19]: ▸ Discovered saved plugin "cordova-plugin-ionic-keyboard". Adding it to the project
[07:11:19]: ▸ Installing "cordova-plugin-ionic-keyboard" for ios
[07:11:19]: ▸ Adding cordova-plugin-ionic-keyboard to package.json
[07:11:19]: ▸ Cannot read property 'reject' of undefined
[07:11:20]: -------------------------
[07:11:20]: --- Step: upload_logs ---
[07:11:20]: -------------------------
[07:11:20]: ---------------------------
[07:11:20]: --- Step: shell command ---
[07:11:20]: ---------------------------
[07:11:20]: -----------------------------
[07:11:20]: --- Step: delete_keychain ---
[07:11:20]: -----------------------------
[07:11:20]: Exit status of command 'cordova platform add ios' was 1 instead of 0.
Using cordova-fetch for cordova-ios@~5.0.1
Adding ios project...
Creating Cordova project for the iOS platform:
	Path: platforms/ios
	Package: ch.apnet.app.paydesk
	Name: PayDesk
iOS project created with cordova-ios@5.0.1
Discovered saved plugin "cordova-custom-config". Adding it to the project
Installing "cordova-custom-config" for ios
Adding cordova-custom-config to package.json
Discovered saved plugin "cordova-plugin-device". Adding it to the project
Installing "cordova-plugin-device" for ios
Adding cordova-plugin-device to package.json
Discovered saved plugin "cordova-plugin-splashscreen". Adding it to the project
Installing "cordova-plugin-splashscreen" for ios
Adding cordova-plugin-splashscreen to package.json
Discovered saved plugin "cordova-plugin-statusbar". Adding it to the project
Installing "cordova-plugin-statusbar" for ios
Adding cordova-plugin-statusbar to package.json
Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for ios
Adding cordova-plugin-whitelist to package.json
Discovered saved plugin "cordova-sqlite-storage". Adding it to the project
Installing "cordova-sqlite-storage" for ios
installing external dependencies via npm
for package name: cordova-sqlite-storage
npm install of external dependencies ok
Adding cordova-sqlite-storage to package.json
Discovered saved plugin "cordova-android-support-gradle-release". Adding it to the project
Installing "cordova-android-support-gradle-release" for ios
Adding cordova-android-support-gradle-release to package.json
Discovered saved plugin "ch.codeworx.cordova.plugin.barcodescanner.emdk". Adding it to the project
Installing "ch.codeworx.cordova.plugin.barcodescanner.emdk" for ios
Adding ch.codeworx.cordova.plugin.barcodescanner.emdk to package.json
Discovered saved plugin "cordova-plugin-bluetooth-serial". Adding it to the project
Installing "cordova-plugin-bluetooth-serial" for ios
Adding cordova-plugin-bluetooth-serial to package.json
Discovered saved plugin "phonegap-nfc". Adding it to the project
Installing "phonegap-nfc" for ios
Adding phonegap-nfc to package.json
Discovered saved plugin "cordova-plugin-ionic". Adding it to the project
Installing "cordova-plugin-ionic" for ios
Plugin dependency "cordova-plugin-splashscreen@5.0.2" already fetched, using that version.
Dependent plugin "cordova-plugin-splashscreen" already installed on ios.
Installing "cordova-plugin-ionic-webview" for ios
Installing "cordova-plugin-file" for ios
Installing "cordova-plugin-file-transfer" for ios
Plugin dependency "cordova-plugin-file@6.0.1" already fetched, using that version.
Dependent plugin "cordova-plugin-file" already installed on ios.
Adding cordova-plugin-ionic to package.json
Discovered saved plugin "phonegap-plugin-barcodescanner". Adding it to the project
Installing "phonegap-plugin-barcodescanner" for ios
Adding phonegap-plugin-barcodescanner to package.json
Discovered saved plugin "cordova.plugins.diagnostic". Adding it to the project
Installing "cordova.plugins.diagnostic" for ios
Adding cordova.plugins.diagnostic to package.json
Discovered saved plugin "cordova-plugin-ionic-keyboard". Adding it to the project
Installing "cordova-plugin-ionic-keyboard" for ios
Adding cordova-plugin-ionic-keyboard to package.json
Cannot read property 'reject' of undefined
+------+--------------------------+-------------+ | fastlane summary | +------+--------------------------+-------------+ | Step | Action | Time (in s) | +------+--------------------------+-------------+ | 1 | default_platform | 0 | | 2 | build_summary | 4 | | 3 | add_git_credentials | 0 | | 4 | modify_config_xml | 0 | | 5 | create_keychain | 0 | | 6 | download_certs | 1 | | 7 | import_certificate | 0 | | 8 | build_pro_app | 177 | | 9 | add_cordova_to_index | 0 | | 💥 | cordova platform add ios | 19 | | 11 | upload_logs | 0 | | 12 | shell command | 0 | | 13 | delete_keychain | 0 | +------+--------------------------+-------------+
[07:11:20]: fastlane finished with errors WARNING: Nokogiri was built against LibXML version 2.9.2, but has dynamically loaded 2.9.4 /Users/ionic/.fastlane/bin/bundle/bin/fastlane: [!] Exit status of command 'cordova platform add ios' was 1 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
Using cordova-fetch for cordova-ios@~5.0.1
Adding ios project...
Creating Cordova project for the iOS platform:
	Path: platforms/ios
	Package: ch.apnet.app.paydesk
	Name: PayDesk
iOS project created with cordova-ios@5.0.1
Discovered saved plugin "cordova-custom-config". Adding it to the project
Installing "cordova-custom-config" for ios
Adding cordova-custom-config to package.json
Discovered saved plugin "cordova-plugin-device". Adding it to the project
Installing "cordova-plugin-device" for ios
Adding cordova-plugin-device to package.json
Discovered saved plugin "cordova-plugin-splashscreen". Adding it to the project
Installing "cordova-plugin-splashscreen" for ios
Adding cordova-plugin-splashscreen to package.json
Discovered saved plugin "cordova-plugin-statusbar". Adding it to the project
Installing "cordova-plugin-statusbar" for ios
Adding cordova-plugin-statusbar to package.json
Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for ios
Adding cordova-plugin-whitelist to package.json
Discovered saved plugin "cordova-sqlite-storage". Adding it to the project
Installing "cordova-sqlite-storage" for ios
installing external dependencies via npm
for package name: cordova-sqlite-storage
npm install of external dependencies ok
Adding cordova-sqlite-storage to package.json
Discovered saved plugin "cordova-android-support-gradle-release". Adding it to the project
Installing "cordova-android-support-gradle-release" for ios
Adding cordova-android-support-gradle-release to package.json
Discovered saved plugin "ch.codeworx.cordova.plugin.barcodescanner.emdk". Adding it to the project
Installing "ch.codeworx.cordova.plugin.barcodescanner.emdk" for ios
Adding ch.codeworx.cordova.plugin.barcodescanner.emdk to package.json
Discovered saved plugin "cordova-plugin-bluetooth-serial". Adding it to the project
Installing "cordova-plugin-bluetooth-serial" for ios
Adding cordova-plugin-bluetooth-serial to package.json
Discovered saved plugin "phonegap-nfc". Adding it to the project
Installing "phonegap-nfc" for ios
Adding phonegap-nfc to package.json
Discovered saved plugin "cordova-plugin-ionic". Adding it to the project
Installing "cordova-plugin-ionic" for ios
Plugin dependency "cordova-plugin-splashscreen@5.0.2" already fetched, using that version.
Dependent plugin "cordova-plugin-splashscreen" already installed on ios.
Installing "cordova-plugin-ionic-webview" for ios
Installing "cordova-plugin-file" for ios
Installing "cordova-plugin-file-transfer" for ios
Plugin dependency "cordova-plugin-file@6.0.1" already fetched, using that version.
Dependent plugin "cordova-plugin-file" already installed on ios.
Adding cordova-plugin-ionic to package.json
Discovered saved plugin "phonegap-plugin-barcodescanner". Adding it to the project
Installing "phonegap-plugin-barcodescanner" for ios
Adding phonegap-plugin-barcodescanner to package.json
Discovered saved plugin "cordova.plugins.diagnostic". Adding it to the project
Installing "cordova.plugins.diagnostic" for ios
Adding cordova.plugins.diagnostic to package.json
Discovered saved plugin "cordova-plugin-ionic-keyboard". Adding it to the project
Installing "cordova-plugin-ionic-keyboard" for ios
Adding cordova-plugin-ionic-keyboard to package.json
Cannot read property 'reject' of undefined
\e[91mFailed to upload ipa to storage please retry your build.\e[0m Running after script... $ clean-up Cleaning up files... Successful clean up ERROR: Job failed: Process exited with: 1. Reason was:  ()

The error message is nearly the same as @remiAr had:

Exit status of command 'cordova platform add ios' was 1 instead of 0.
Using cordova-fetch for cordova-ios@~5.0.1
...
Cannot read property 'reject' of undefined

I think it is the same cause.

Just found it!
Had to update plugin “cordova-custom-config” to 5.1.0
See https://github.com/dpa99c/cordova-custom-config/issues/152

1 Like