TimeoutError: Timed out waiting for connection to DTServiceHub after 15.0 seconds.

Getting this error when trying to preview an app on various devices. It's occurring when I select iPhone 13 and iPhone 11, but my previews work fine for iPod 7th Gen and iPhone 12. It's possible that this is because I have used those preview options in the past however.

I've generated a report from the error, however the .zip is 400mb and it won't let me attach it to the post.

I found a workaround for my problem - I downloaded the latest version of xcode from this page https://developer.apple.com/download/applications/, and it works well with preview. The version from AppStore still doesn't work, but that doesn't matter to me now.

I was having the “TimeoutError: Timed out waiting for connection to DTServiceHub after 15.0 seconds.” Often. Have searched online for a solution but could find. How ever, I have done the following and have solved. After that, I have a hypothesis why it happened:

  1. I use OneDrive. I turned it on and waited it to completely sync the files
  2. I had created a new single file, with the initial “Hello, world!”. Don’t change anything! The preview wont work yet.
  3. Run the application like it is ready. Wait the iPhone simulator initialize for complete, and the app shows the “Hello, world!”.
  4. Close the app on simulator
  5. Close the simulator
  6. Close the Xcode
  7. Restart the Mac

It should work!

In my case I was re-thinking what have I done since the last time the Xcode´s Preview was working. Turns out I have tried to run the app simulation on simulator and it was taking too long and I just closed the simulator without it has been completely on. My hypothesis is that, closing it down wrongly maybe had messed up with some Xcode configurations and when I turned on and off correctly this time it has been fixed.

Now I can use my previews normally!

Hope it helps!

TimeoutError: Timed out waiting for connection to DTServiceHub after 15.0 seconds.
 
 
Q