Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cordova can't find ios-deploy on mac #332

Closed
newuser44 opened this issue Mar 27, 2018 · 17 comments
Closed

Cordova can't find ios-deploy on mac #332

newuser44 opened this issue Mar 27, 2018 · 17 comments

Comments

@newuser44
Copy link

@newuser44 newuser44 commented Mar 27, 2018

On a Mac OS Sierra.
New install of node.js but this time I told npm where to install the packages (~/.npm-packages)

Installed Cordova
Setup path to point to ~/npm-packages/bin

Try to run Cordova build ios --dev
I get an error I need to install iso-deploy

node:486) UnhandledPromiseRejectionWarning: ios-deploy was not found. Please download, build and install version 1.9.2 or greater from https://github.com/phonegap/ios-deploy into your path, or do 'npm install -g ios-deploy'

I follow that command npm install -g iso-deploy

It looks like it is installed.

** BUILD SUCCEEDED **

/Users/sbrothers/.npm-packages/bin/ios-deploy -> /Users/sbrothers/.npm-packages/lib/node_modules/ios-deploy/build/Release/ios-deploy

  • ios-deploy@1.9.2
    updated 1 package in 3.533s

Back to build with cordova build ios --dev
I get the same error.

(node:568) UnhandledPromiseRejectionWarning: ios-deploy was not found. Please download, build and install version 1.9.2 or greater from https://github.com/phonegap/ios-deploy into your path, or do 'npm install -g ios-deploy'

On the command line I can type ios-deploy

Expected behavior

cordova can find ios-deploy

Actual behavior.

cordova can not find ios-deploy. Is this because I have it installed in different folder?

System Specs

System Software Overview:

  System Version: macOS 10.12.6 (16G1036)
  Kernel Version: Darwin 16.7.0
  Boot Volume: Macintosh HD
  Boot Mode: Normal
  Computer Name: John’s MacBook Pro
  User Name: John Smith (sbrothers)
  Secure Virtual Memory: Enabled
  System Integrity Protection: Enabled
  Time since boot: 14 minutes

iOS-deploy -V
1.9.2

Xcode 9.2
Build version 9C40b

/Applications/Xcode.app/Contents/Developer

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

lldb-900.0.64
Swift-4.0

npm version
5.6.0

cordova version
8.0.0

@newuser44

This comment has been minimized.

Copy link
Author

@newuser44 newuser44 commented Mar 27, 2018

I also did try
npm install --unsafe-perm=true --allow-root -g ios-deploy
Did not see any change.

@newuser44

This comment has been minimized.

Copy link
Author

@newuser44 newuser44 commented Mar 28, 2018

Still not sure if this is a cordova problem or ios-deploy problem.

I boot up the mac, I go to the folder where the code is.
I type in cordova build ios --dev.
Sometimes I might get an error that I need to select the "Team" something in xcode.

I find the codeproj file in the ios platform.
I change the team code and I run the same cordova command again.
Everything works.

I then build in xcode to push to a phone.
Works fine.

When I go back to the command line try to now build for prod (or dev) I can error:
Error: ios-deploy was not found. Please download, build and install version 1.9.2 or greater...

Now I can't build but 1 min ago I could.
Sometimes if I reboot the Mac I was able to build dev again.

I did downgrade my cordova version to 7.0.1.
My npm version is now 5.8
I set up npm to have a local package (~/npm-packages).
I add that to the /etc/paths put it to the top.

Seems like something in xcode screws up the path to where cordova can't find ios-deploy anymore.

@newuser44

This comment has been minimized.

Copy link
Author

@newuser44 newuser44 commented Mar 28, 2018

I created a .bash_profile with the path to the npm-package. I'm able to build more consistently.

@ceeyang

This comment has been minimized.

Copy link

@ceeyang ceeyang commented Jun 26, 2018

I got this problem too, I am going crazy.

@ceeyang

This comment has been minimized.

Copy link

@ceeyang ceeyang commented Jul 2, 2018

If hint 'XPCServices doesn't exist, find the path and delete the XPCServices file'.

@shazron

This comment has been minimized.

Copy link

@shazron shazron commented Jul 24, 2018

Seems like a Cordova issue or a user environment issue since your terminal can find it. This is not a Cordova issue tracker -- closing

@shazron shazron closed this Jul 24, 2018
@chenqingze

This comment has been minimized.

Copy link

@chenqingze chenqingze commented Oct 17, 2018

the solution is here:

  • copy form https://www.npmjs.com/package/ios-deploy

OS X 10.11 El Capitan or greater
If you are not using a node version manager like nvm or n, you may have to do either of these three things below when under El Capitan:

Add the --unsafe-perm=true flag when installing ios-deploy
Add the --allow-root flag when installing ios-deploy
Ensure the nobody user has write access to /usr/local/lib/node_modules/ios-deploy/ios-deploy

@Sara--

This comment has been minimized.

Copy link

@Sara-- Sara-- commented Oct 28, 2018

For those who have the cordova files in an own cordova directory: What helped for me was the following:
run npm install -g ios-deploy --unsafe-perm=true in the root directory of the project,
run cd cordova/,
run cordova build ios

Another time I noticed, that I kept getting that error message. But when checking Xcode, the build was updated. So I could ignore the error.. Really strange.

Next to this problem I had another problem that helped me fix this problem: I could not update or uninstall or reinstall cordova. When I tried installing it, the logs showed me the path of its binary. When adding this path to my ~/.bash_profile (or bashrc or .profile) by adding the line "$PATH=$PATH:/Users/$USER/.npm-packages/lib/node_modules/cordova/bin" cordova worked and I also did not get this error message anymore. When you navigate to that path to node_modules, you can see ios-deploy is there too after your installation. So at least adding its path should help out.

@connorpgh

This comment has been minimized.

Copy link

@connorpgh connorpgh commented Nov 29, 2018

image

Help !!
Anyone know how to fix this
i'm running ionic cordova run ios

Error message !!

@Mdelaf

This comment has been minimized.

Copy link

@Mdelaf Mdelaf commented Feb 5, 2019

I am getting the same error:

CordovaError: Promise rejected with non-error: 'ios-deploy was not found. Please download, build and install version 1.9.2 or greater from https://github.com/phonegap/ios-deploy into your path, or do \'npm install -g ios-deploy\''
    at cli.catch.err (/Users/kunder/.nvm/versions/node/v10.4.1/lib/node_modules/cordova/bin/cordova:30:15)
    at process._tickCallback (internal/process/next_tick.js:68:7)
[ERROR] An error occurred while running subprocess cordova.
        
        cordova build ios --buildFlag=-UseModernBuildSystem=0 exited with exit code 1.

As @Sara-- mentioned, I just realized that XCode is actually being updated and the build succeed so the error can be ignored.

@blondie63

This comment has been minimized.

Copy link

@blondie63 blondie63 commented Feb 8, 2019

Hi, i've same error on mac with Xcode 10 and build is not generated: some help ?
Ionic:
ionic (Ionic CLI) : 4.10.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.3
@ionic/app-scripts : 3.2.2
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic 5.3.0, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 10 other plugins)

System:
Android SDK Tools : 26.1.1 (/Users/mauro/Library/Android/sdk/)
ios-sim : 7.0.0
NodeJS : v10.15.0 (/usr/local/bin/node)
npm : 6.7.0
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61

@Moseskhan

This comment has been minimized.

Copy link

@Moseskhan Moseskhan commented Apr 23, 2019

I got the same error after, I had run the code using the iphone simulator in xcode, so I guess its trying to do a run on the device, so all you have to do is change your build target to a generic ios device in xcode and restart xcode then
Otherwise you can run

npm install -g ios-deploy --unsafe-perm=true.
and run cordova build --ios --buildFlag="-UseModernBuildSystem=0"

@Sebschock

This comment has been minimized.

Copy link

@Sebschock Sebschock commented Nov 12, 2019

I experience this error if my phone is connected to my computer (via cable) when I am running the build command.

Simply unplugging the cable solved the problem.

@oplengs001

This comment has been minimized.

Copy link

@oplengs001 oplengs001 commented Nov 27, 2019

just unplugged the device

@jovanymezura

This comment has been minimized.

Copy link

@jovanymezura jovanymezura commented Dec 5, 2019

I experience this error if my phone is connected to my computer (via cable) when I am running the build command.

Simply unplugging the cable solved the problem.

You're right, problem it's weird but it works for me

@jpike88

This comment has been minimized.

Copy link

@jpike88 jpike88 commented Mar 13, 2020

I get unreasonably angry when this happens. This is like the third time I forgot this is a thing and here I am again.

@shazron

This comment has been minimized.

Copy link

@shazron shazron commented Mar 13, 2020

This is a cordova issue (the connected device thing), not an iOS-deploy one. Please file an issue in their issue tracker.

@ios-control ios-control locked as resolved and limited conversation to collaborators Mar 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.