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.

Replies

Hi,

Sorry to hear you are having problems getting previews working. This sounds like an issue we are already tracking, but to be sure the next step will be to file a feedback with diagnostics. We will need the diagnostics Xcode Previews generates in order to make sure we understand the error the previews system is encountering.

  1. When you get an error in Xcode Previews, an error banner appears in the canvas
  2. Click the "Diagnostics" button in that banner
  3. In the sheet that appears, click "Generate Report" in the bottom left of the sheet
  4. Attach (or make from the folder) the resulting zip file to the bug (will be named something like previews-diagnostics-0123456789.zip)
  • I have made the .zip but it is over 400mb and I cannot upload it here - would it be fine for me to upload it elsewhere such as Google Drive or Mega?

    My previews have now stopped working entirely and I'm getting this error message in the 'diagnostics' window:

    MessageSendFailure: Message send failure for relaunch

    ==================================

    | HumanReadableNSError: Error launching Xcode Previews |   | com.apple.dt.xcodepreviews.service (0): |   | ================================== |   | | HumanReadableNSError: failed to launch preview shell: Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "The request to open "com.apple.dt.XcodePreviews" failed." UserInfo={NSLocalizedFailureReason=The request was denied by service delegate (SBMainWorkspace) for reason: Locked ("Unable to launch com.apple.dt.XcodePreviews foreground because the device is locked. see FBSOpenApplicationOptions.h for ways to do this")., BSErrorCodeDescription=RequestDenied, NSUnderlyingError=0x600000559fe0 {Error Domain=FBSOpenApplicationErrorDomain Code=7 "Unable to launch com.apple.dt.XcodePreviews foreground because the device is locked. see FBSOpenApplicationOptions.h for ways to do this." UserInfo={BSErrorCodeDescription=Locked, NSLocalizedFailureReason=Unable to launch com.apple.dt.XcodePreviews foreground because the device is locked. see FBSOpenApplicationOptions.h for ways to do this.}}, FBSOpenApplicationRequestID=0xd94e, NSLocalizedDescription=The request to open "com.apple.dt.XcodePreviews" failed.} | |   | | com.apple.dt.xcodepreviews.service (0):

  • Please create a new feedback at http://feedbackassistant.apple.com/ and add the diagnostics to that. Sample project to reproduce with is also always welcome, but not required!

  • I had this happen to several IMacs during class today any more information on this fix?

    TimeoutError: Timed out waiting for connection to DTSerrviceHub after 15.0 seconds

-snip-

Any updates?

i'm having the same issue, i just created a new project and the preview of the "Hello World!" is not working

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

  • Do me a favor open up activity monitor look and see if you are red or peaking on resources, what device are you running model year of iMac, RAM and processor speed. If I am having issues with 18.2 2017 iMac device with 16GB RAM and i7 processor I can imagine it runs worse for those with less resources.

  • It does seem as though its related to the hardware of older iMac models. I have a 2019 iMac with 8GB RAM and i5 processor with a Radeon 570X Pro. Still, my spec as well as your own i7 with 16GB RAM feels like it should be more than powerful enough to run an iPhone simulation. These machines are capable of far more resource intensive tasks.

  • I would agree with you. My issue is Monterrey with XCode 13.2 those two combined changed everything. Previous version of Xcode 13.1 and previous version BigSur did not have this issue. I understand that I5 processor and i7 with 8GB or 16GB run other programs but my 2017 IMac was a quad-core. I am certain you had no more power than quad core either. The latest iMac I brought in for testing ran Monterrey and Xcode 13.2 easy, smooth, fast no issues no lag time no TIMEOUT. I can't be certain if it was lack of memory, lack of video I do feel like the new 6 core and 8 core had something to do with the performance. If you want to continue on a cheaper route I would downgrade OS to bigSur and downgrade to Xcode 13.1 and add more RAM to your iMac all that can be done just tedious and come back with your results. I just upgraded 2017 model iMac to 32GB of RAM and will test it and post my results. Hope this helps.

Add a Comment

I am having the same error on a brand new install on MacBook Air 2018 1,6 ghz, i5 dual. 8G. after switching from iPod touch 7 to iPhone 11 and while the iPhone preview was preparing I realize that my Sophos antivirus was working like crazy. It took a while but the preview started working in iPhone 11. I went back to iPod touch 7 preview and it was still not working. Only some previews are problematics.

I haven't received any feedback related to this issue since February 2nd 2022, ID 9843208. I've provided a new diagnostics that was produced when using XCode 13.3 beta. Could I please get a response on the aforementioned feedback ID?

  • Please post iMac model, year and specs. If you are running low on resources that is the issue on TIMEOUT from my testing and trouble shooting this matter.

Add a Comment

Still no reply to feedback ID 9843208. This has been an ongoing issue for more than two months, as a paying Apple Developer program member I'd expect that the software and support I've subscribed to use would be working. This is quite disappointing and I'd really appreciate a response to the above feedback ID.

Hey guys, I had the same error, can you solve it by removing the comments that are on the first lines of code, leaving the UIKit import as the first line. follow my github: https://github.com/Brunostd

  • Hello can you post before and after picture? What comments are you talking about that we need to remove?

    thank you

Add a Comment

Interesting, but alas I tried that just now with no difference. I have not tried all the iPhone models so far 13 Pro, 11, and 8 Plus. All with the same result.

ME2