xcode9 invalid connection

I installed the beta but cannot connect to any simulator. Starting a new project and then building fails.

Replies

I have the same issue. I just get an Xcode error dialog saying "Error returned in reply: Connection invalid. Software caused connection abort".

Nothing shows in the Xcode logs either.

Restart your Mac and Simulator should work as expected 🙂

Manually launching the simulator from Xcode menu > Open Developer Tool > Simulator fixed this for me

Cool I'll try that on MBPr (watching SotU on my Mac mini at the mo 😝)

I'm getting the same problem. Rebooting my Mac and launching the simulator from the Xcode menu haven't helped.

Adding another "Me Too" to this issue.


Rebooting does not resolve the issue.


Launching the Simulator manually shows an empty Simulator view, but the simulated device never launches. Any attempt to interact with it (such as rebooting or erase contents) I see a "Error returned in reply: Connection invalid" error dialog.

+1


Rebooting and launching does not help. Also quiting the simulator does not quit, it hangs on quit, then crashes.

I was able to fix this! I renamed XCode to XCode 8, quit the beta and relaunched.

This solved it for me as well! To be specific I renamed the App Store version of Xcode (v8) to "Xcode 8". This allowed Xcode 9's simulator to work.


Renaming "Xcode 8" back to "Xcode" doesn't work, so the renaming must remain. Seems like someone hard-coded a path in the simulator's code...


Thank you!

I'm at WWDC, and discussed this with an Apple Engineer in the Simulator lab.


In addition to renaming Xcode.app, this can also be fixed (temporarily) by using:


sudo xcode-select -s /Applications/Xcode-beta.app/


I've confirmed this works. However you'll probably want to switch it back when done:


sudo xcode-select -r (sets the default location, /Applications/Xcode.app)


I've filed a radar with this issue, #32663408. Please file a duplicate if this is something you'd like Apple to fix. Also an openradar at http://www.openradar.me/radar?id=4939404405637120if you're curious to read my filing.

Duplicate Radar 32834831 filed.


Restarting and the other solutions listed further above did not work. The renaming solution was the trick for me. I did not try the terminal approach as renaming was more straightforward to toggle.

Try this and let me know if it works:

Only run one Xcode at a time (Quit another Xcode, don't even let another Xcode running in background!).

I always quit Xcode (and Simulator, Instruments, and any other tools) when switching Xcode versions. Thus the problem occurs when only one version is running.