Error when doing 'ionic run ios'

Just curious do you have a developers certificate and provisioning profile set up for that device?

Yea I guess its set up correctly since it works if I start it from xcode

Hm, I just tried this on my computer and didn’t get any problems.

Did you have the emulator already opened?
Do you have ios-sim installed?
Was there a device connected already?

Just trying to figure out where this could happen. Could you specific tell me what your steps are and your process to get this error?

(soory missed your reply)
Nope, no emulator open.
yes, its installed.
there’s one device connected (ipad 2) when I do the run command.
I do this:

  1. ionic build ios
  2. when its done I do ionic run ios

maybe its something wrong on my side?

Can you try with the cordova command?

cordova run ios

cordova run ios does alot of things, then stops here. Nothing happens on the iPad. I could send you the project if you wanna check it out. Its no hurry :slight_smile:

[100%] Installed package /Users/.../

------ Debug phase ------
[  0%] Looking up developer disk image
[ 90%] Mounting developer disk image
[ 95%] Developer disk image already mounted
[100%] Connecting to remote debug server
(lldb) ^C^CTraceback (most recent call last):
  File "/private/tmp/", line 16, in connect_command
    event = lldb.SBEvent()
  File "/Applications/", line 3389, in __init__
    def __init__(self, *args): 
error: the platform is not currently connected
Executing commands in '/tmp/fruitstrap-lldb-prep-cmds-'.
(lldb)      platform select remote-ios --sysroot '/Users/Tobbe/Library/Developer/Xcode/iOS DeviceSupport/7.0.3 (11B511)/Symbols'
  Platform: remote-ios
 Connected: no
  SDK Path: "/Users/Tobbe/Library/Developer/Xcode/iOS DeviceSupport/7.0.3 (11B511)/Symbols"
(lldb)      target create "/Users/.../"
Current executable set to '/Users/.../' (armv7).
(lldb)      script fruitstrap_device_app="/private/var/mobile/Applications/52FDC205-392F-4521-91FE-3AD5E5BB229D/"
(lldb)      script fruitstrap_connect_url="connect://"
(lldb)      command script import "/tmp/"
(lldb)      command script add -f fruitstrap_.connect_command connect
(lldb)      command script add -s asynchronous -f fruitstrap_.run_command run
(lldb)      connect
(lldb)      run

The first time I ran “ionic run ios”, it was fine. Logging statements were output to the terminal window. However, upon running again, it keeps failing about 70% complete with this error:

tcsetpgrp failed: Operation not supported on socket

However, I get the new version of the app on the device. Very strange. I am deploying to an iPhone 5s.

Here is a snippet of the log:

[ 49%] Copying /Users/keithdmoore/dev/ehms_mobile/main/platforms/ios/build/device/ to device
[ 52%] CreatingStagingDirectory
[ 57%] ExtractingPackage
[ 60%] InspectingPackage
[ 60%] TakingInstallLock
[ 65%] PreflightingApplication
[ 65%] InstallingEmbeddedProfile
[ 70%] Ve
tcsetpgrp failed: Operation not supported on socket

Hey I sent you a DM, yeah I can take a look at it and figure out whats up

Thanks for looking into this. Deploying from Xcode works but its really nice to be able to deploy from the CLI.

I’m getting this error too, when deploying to a real device. It actually copies the app to the phone, I just get the error in the console.

1 Like

I just tried cordova run ios

It works better. It installs the app. However, it disconnects from the debugger.

------ Debug phase ------
[ 0%] Looking up developer disk image
[ 90%] Mounting developer disk image
[ 95%] Developer disk image already mounted
[100%] Connecting to remote debug server


Hey @keithdmoore and @mpj , totally forget to respond here after looking at @tobbe’s code. So I got tested it on my computer and was able to emulate, run, and deploy to my actual device.

I uninstalled the ionic CLI, cordova, ios-sim, and ios-deploy from my system then reinstalled for a fresh start and was running node v0.10.26

$ sudo npm uninstall cordova ionic ios-sim ios-deploy
$ sudo npm install cordova ionic ios-sim ios-deploy

This should get you the latest and greatest stuff. The run command will try to launch the app on an actual device, so make sure its all set up with certs and provisioning profiles.

Give this a try and let me know if it works

Didnt work for me. Same experience for both “ionic run ios” and “cordova run ios”. No worries. Just a nice to have really. Thanks for looking into it though.

1 Like

having the same problem btw, you are not alone.

1 Like

I’m also getting this. It is definitely an issue in Cordova/ios-deploy. There is an open issue which very well might be related:

For now, run from Xcode if you can :frowning:

@mhartington I’m assuming that you meant running those npm with a -g flag. Either way, I uninstalled and reinstalled but the problem still remains. node v0.10.26.

I’m not running with a proper provisioning profile, but using the one that Xcode sets up automatically along with the “use this device for development”. Might be related.

Doesn’t work with “cordova ios deploy” either.

I hate to do +1 replies, but yeah, me too. It stops consistently at 49% and gives this message:

[ 49%] Copying /<my home path>/Aptcsetpgrp failed: Operation not supported on socket(lldb) error: process launch failed: Locked

I found that typing “quit” at the lldb prompt causes hings to work better. This was after a reboot of my macbook pro as well. Now the only issue is that I have to do a cordova build ios and then deploy using xcode for the first time to get around a device path issue. Then I can just do cordova run ios without issue. Pretty happy to get that working at least. BTW… ionic run ios doesnt work though. Same issue as described above.

1 Like

UPDATE: I found that unplugging iPhone usb and reconnecting; solves the device path issue and ionic run ios now works as well.