Error when doing 'ionic run ios'


#1

I get this error when doing ionic run ios:
Copying /Users/.../platforms/ios/build/tcsetpgrp failed: Operation not supported on socket
But if I click run in xcode after a ionic build ios it works just fine. Any ideas? I’ve tried to delete my ios platform and rebuild it.

Also, if I do ionic run ios does that do both the build and run command?


Error message every time while install ionic app to ios
#2

Are you trying to target an actual device or emulator?


#3

an actual device (this post must be more than 20 chars)


#4

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


#5

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


#6

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?


#7

(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?


#8

Can you try with the cordova command?

cordova run ios

#9

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/.../secret.app

------ 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/fruitstrap_.py", line 16, in connect_command
    event = lldb.SBEvent()
  File "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/__init__.py", line 3389, in __init__
    def __init__(self, *args): 
KeyboardInterrupt
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/.../secret.app"
Current executable set to '/Users/.../secret.app' (armv7).
(lldb)      script fruitstrap_device_app="/private/var/mobile/Applications/52FDC205-392F-4521-91FE-3AD5E5BB229D/secret.app"
(lldb)      script fruitstrap_connect_url="connect://127.0.0.1:12345"
(lldb)      command script import "/tmp/fruitstrap_.py"
(lldb)      command script add -f fruitstrap_.connect_command connect
(lldb)      command script add -s asynchronous -f fruitstrap_.run_command run
(lldb)      connect
(lldb)      run

#10

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/MyAwesomeApp.app/www/views/uploadPhoto.html to device
[ 52%] CreatingStagingDirectory
[ 57%] ExtractingPackage
[ 60%] InspectingPackage
[ 60%] TakingInstallLock
[ 65%] PreflightingApplication
[ 65%] InstallingEmbeddedProfile
[ 70%] Ve
tcsetpgrp failed: Operation not supported on socket
(lldb)


#11

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


#12

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


#13

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.


#14

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

(lldb)


#15

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


#16

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.


#17

having the same problem btw, you are not alone.


#18

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: https://github.com/phonegap/ios-deploy/issues/19

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


#19

@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.


#20

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