Ionic emulate ios fails: Timed out waiting for device to boot


#1
** BUILD SUCCEEDED **

No target specified for emulator. Deploying to iPhone-6 simulator
2015-04-07 18:15:27.375 ios-sim[39459:470874] stderrPath: /Users/Michael/todo/platforms/ios/cordova/console.log
2015-04-07 18:15:27.375 ios-sim[39459:470874] stdoutPath: /Users/Michael/todo/platforms/ios/cordova/console.log
Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 "Timed out waiting for device to boot" UserInfo=0x7fe67241c760 {NSLocalizedDescription=Timed out waiting for device to boot}
Error code 1 for command: ios-sim with args: launch,/Users/Michael/todo/platforms/ios/build/emulator/todo.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,--stderr,/Users/Michael/todo/platforms/ios/cordova/console.log,--stdout,/Users/Michael/todo/platforms/ios/cordova/console.log,--exit
Error: /Users/Michael/todo/platforms/ios/cordova/run: Command failed with exit code 2
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

This happens with ionic emulate ios cannot seem to figure out why or how to fix.

Running MacOS X


#2

Would you be able to provide the out put from ionic info?


#3

I have the exact same problem

OS: Mac OS X Yosemite
Node Version: v0.12.2
Cordova CLI: 4.3.0
Ionic Version: 1.0.0-rc.2
Ionic CLI Version: 1.3.19
Xcode version: Xcode 6.3 Build version 6D570
ios-sim version: 3.1.1
ios-deploy version: 1.5.0


#4

I actually seemd to get this fixed by running sudo chmod -R a+rwx /appfolder before adding iOS or Android to the project. Then it works fine.


#5

That didn’t work for me.


#6

Try to wipe out Emulators data maybe? Don’t know if this will work but usually when i get some issues with emulators i run this.

xcrun simctl list | grep -oh '[A-Z0-9]\{8\}-[A-Z0-9]\{4\}-[A-Z0-9]\{4\}-[A-Z0-9]\{4\}-[A-Z0-9]\{12\}' | xargs -I{} xcrun simctl erase {}

#7

Hello,

I am getting the same error. Here is me:

OS: Mac OS X Yosemite
Node Version: v0.12.2
Cordova CLI: 4.3.0
Ionic Version: 1.0.0-rc.3
Ionic CLI Version: 1.3.19
Xcode version: Xcode 6.2 Build version 6C131e
ios-sim version: 3.0.0
ios-deploy version: Not installed

@Spurlex that didn’t work for me too : (

@Endiss that give me a strange output.

Invalid device: 0831BD60-D730-4519-925D-BDE83F8D0979
Invalid device: 07D5161A-CA63-4C79-B954-003E90B2A0B0
Invalid device: 8E86F244-D80D-4074-915B-050527FA858E
Invalid device: 1CF6A5CA-4563-46C2-80F3-BE069F005493
Invalid device: 44AA2BA9-8681-456C-8D89-35907340A7FA
Invalid device: 43E71EE3-B861-47B5-B456-75D3547591CD
Invalid device: D4F2A99F-5DFD-417B-9D6D-E5E9A580DBCB
Invalid device: 96B65528-AFD4-4DDC-B154-550B4FC2AD08
Invalid device: 7190F811-AB25-41D4-B22B-8BE74BEE8E59
Invalid device: 4F9B65E3-4853-4648-90FE-B61A900F896A

Do you have any other suggestions?

Thanks in advance! : )


#8

For sure all your’s emulators are broken?
This command just wipe all cached data… but somehow it doesn’t recognize yours emulators;P


#9

I’m also having the same issue. It was working fine yesterday but for some reason only the ios emulator opens and the app doesn’t load now when trying a new project.


#10

One step further! I didn’t have ios-sim installed : )

npm update -g ios-sim

Anyways, it added two more lines:

2015-04-17 17:46:21.047 ios-sim[1690:16550] stderrPath: /Users/superkalo/Sites/myIonicAppTest/platforms/ios/cordova/console.log
2015-04-17 17:46:21.048 ios-sim[1690:16550] stdoutPath: /Users/superkalo/Sites/myIonicAppTest/platforms/ios/cordova/console.log

But the same error appears : (

Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 "Timed out waiting for device to boot"

I hope somebody helps! : )


#11

I’m having the same issues with emulate.

sudo ionic emulate android

Error:

/Users/haapsalutudengid/Desktop/ionicprojects/test/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
ERROR : No emulator images (avds) found.
1. Download desired System Image by running: /Users/haapsalutudengid/Library/Android/sdk/tools/android sdk
2. Create an AVD by running: /Users/haapsalutudengid/Library/Android/sdk/tools/android avd
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver

Error: /Users/haapsalutudengid/Desktop/ionicprojects/test/platforms/android/cordova/run: Command failed with exit code 1
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

sudo ionic emulate ios

Error:

** BUILD SUCCEEDED **

No target specified for emulator. Deploying to iPhone-6 simulator
2015-04-23 18:50:48.044 ios-sim[991:15409] stderrPath: /Users/haapsalutudengid/Desktop/ionicprojects/test/platforms/ios/cordova/console.log
2015-04-23 18:50:48.045 ios-sim[991:15409] stdoutPath: /Users/haapsalutudengid/Desktop/ionicprojects/test/platforms/ios/cordova/console.log
Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 "Timed out waiting for device to boot" UserInfo=0x7f8a7a51ba40 {NSLocalizedDescription=Timed out waiting for device to boot}
Error code 1 for command: ios-sim with args: launch,/Users/haapsalutudengid/Desktop/ionicprojects/test/platforms/ios/build/emulator/test.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,--stderr,/Users/haapsalutudengid/Desktop/ionicprojects/test/platforms/ios/cordova/console.log,--stdout,/Users/haapsalutudengid/Desktop/ionicprojects/test/platforms/ios/cordova/console.log,--exit
Error: /Users/haapsalutudengid/Desktop/ionicprojects/test/platforms/ios/cordova/run: Command failed with exit code 2
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

Ionic info:

OS: Mac OS X Yosemite
Node Version: v0.12.2
Cordova CLI: 5.0.0
Ionic Version: 1.0.0-rc.4
Ionic CLI Version: 1.3.20
Xcode version: Xcode 6.3.1 Build version 6D1002 
ios-sim version: 3.1.1 
ios-deploy version: 1.5.0 

Any suggestions?


#12

Same error here!

Any idea?


#13

I found a temporal solution which works!

Open following file using XCode:
ionic_folder/platforms/ios/YourAPP.xcodeproj

Then run it (product/run).

Note that you need to build ionic manually before each run.


#14

I had the same problem, but now it’s been fixed.
I figured out that the issue was occurred due to the permission issue.
So, I’ve given Read&Write permissions to the whole folders and files from the root including sub folders and files.
Now it runs without any error.

Thank you.


#15

I am not sure if this helps - but I have seemingly fixed the problem, I seemed to have some permissions issue even when using sudo

So i ran the following command :

sudo chown -R $(whoami) ~/Documents/mobileapps

mobileapps is the directory where I funnily enough store my mobile apps :slight_smile: But the ios-Simulator is now working and showing my blank app when I run the cordova emulate ios command


#16

I had the same problem and it was related to installing some npm packages with sudo. Problem was solved once I changed the ownership of .cordova and its subdirectories.

I applied @gkimpson answer to .cordova directory.

On Mac OS X:
cd /Users/ACTIVE_USER
sudo chown -R $(whoami) ./.cordova/*