SomnusLee
SomnusLee

Reputation: 431

Xcode 11 running on simulator failed with error Could not attach to pid

I find a weird issue, every time when I close my WiFi, then Xcode command+R running my project on simulator will be failed with error like:

Details
Could not attach to pid : “1682”
Domain: IDEDebugSessionErrorDomain
Code: 3
Failure Reason: Error 1

Error 1
Domain: IDEDebugSessionErrorDomain
Code: 3

and when I open Wi-Fi, and connect to Internet, run on simulator will be fine.

My Xcode version:Version 11.3.1 (11C504)

OS: macOS Catalina 10.15.3 (19D76)

I have googled and found some similar issue like this one [https://forums.developer.apple.com/thread/120282 ][1]

I tried all the solution I have googled, but none of them helped in any way.

Does anyone know how to solve this issue, or this is a bug of Xcode 11?

Thanks for any help!

Upvotes: 1

Views: 5380

Answers (3)

Amjad Tubasi
Amjad Tubasi

Reputation: 382

Xcode 11.3.1: Restarting the Xcode resolved the issue.

Upvotes: 1

Jobert
Jobert

Reputation: 1652

Try running on a different simulator. That worked for me.

After that, I tried running on the previous simulator where I encountered the issue and it worked normally again.

Upvotes: 1

AyAz
AyAz

Reputation: 2057

clear data and restart Xcode it works for me. change command tools

Upvotes: 1

Related Questions