Failed to start remote service on device

I am unable to get applications to run on a physical iPhone 11 device from xcode. They work fine when the target is a simulator.


I am using the inital myapp to test this for simplicity.


The apps are successfully loaded on the physical iPhone and can be manually run with no problem.

The following error is given when xCode tries to run them (perhaps a firewall issue?):


Failed to start remote service on device.

Domain: com.apple.dtdevicekit

Code: 811

Recovery Suggestion: Please check your connection to your device.

User Info: {

DVTRadarComponentKey = 261622;

}

--

The service is invalid.

Domain: com.apple.dt.MobileDeviceErrorDomain

Code: -402653150

User Info: {

DVTRadarComponentKey = 261622;

MobileDeviceErrorCode = "(0xE8000022)";

"com.apple.dtdevicekit.stacktrace" = (

0 DTDeviceKitBase 0x000000011d7c983d DTDKCreateNSErrorFromAMDErrorCode + 204

1 DTDeviceKitBase 0x000000011d7db171 __63-[DTDKRemoteDeviceConnection startFirstServiceOf:unlockKeybag:]_block_invoke + 564

2 DTDeviceKitBase 0x000000011d7da839 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_3 + 22

3 DTDeviceKitBase 0x000000011d7cbe04 __DTDKExecuteInSession_block_invoke_2 + 35

4 DTDeviceKitBase 0x000000011d7cb214 __DTDKExecuteWithConnection_block_invoke_2 + 473

5 DTDeviceKitBase 0x000000011d7cb012 __DTDKExecuteWithConnection_block_invoke + 106

6 libdispatch.dylib 0x00007fff6a85150e _dispatch_client_callout + 8

7 libdispatch.dylib 0x00007fff6a85d567 _dispatch_lane_barrier_sync_invoke_and_complete + 60

8 DVTFoundation 0x0000000103280584 DVTDispatchBarrierSync + 208

9 DVTFoundation 0x0000000103256edf -[DVTDispatchLock performLockedBlock:] + 64

10 DTDeviceKitBase 0x000000011d7caf13 DTDKExecuteWithConnection + 226

11 DTDeviceKitBase 0x000000011d7cbc6e DTDKExecuteInSession + 376

12 DTDeviceKitBase 0x000000011d7da67a __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_2 + 131

13 DVTFoundation 0x000000010327da10 __DVT_CALLING_CLIENT_BLOCK__ + 7

14 DVTFoundation 0x000000010327f652 __DVTDispatchAsync_block_invoke + 1194

15 libdispatch.dylib 0x00007fff6a850583 _dispatch_call_block_and_release + 12

16 libdispatch.dylib 0x00007fff6a85150e _dispatch_client_callout + 8

17 libdispatch.dylib 0x00007fff6a856ace _dispatch_lane_serial_drain + 597

18 libdispatch.dylib 0x00007fff6a857485 _dispatch_lane_invoke + 414

19 libdispatch.dylib 0x00007fff6a860a9e _dispatch_workloop_worker_thread + 598

20 libsystem_pthread.dylib 0x00007fff6aaab6fc _pthread_wqthread + 290

21 libsystem_pthread.dylib 0x00007fff6aaaa827 start_wqthread + 15

);

}

--

System Information


macOS Version 10.15.3 (Build 19D76)

Xcode 11.4 (16132.1)

Post not yet marked as solved Up vote post of wlawver Down vote post of wlawver
22k views

Replies

It turns out it was a firewall issue. I am using Little Snitch on my mac and it was interfering with the debug connection. After adjusting the rules the load was successful.

I get the same issue debugging from Xcode 11.4 to an iPad running iOS 13.3.1 and I am not running a firewall on my mac...

I had the same issue also with no firewall or anything. Rebooting the Mac and the Phone fixed this for me.

Yup, just rebooting the iPad worked for me.

Rebooting my iPhone worked for me.


Thank you!

iOS system time was changed by someone, so I reset it to auto-update and it works OK now.

It seems that incorrect system time cuases mobileprovision verification failure.

I ran into the same issue and do this step by step (100% 100%)


  1. Unpair the device in Xcode.
  2. Clean the project.
  3. Unplug and then restart iPhone.
  4. Quit Xcode.


reference:

https://forums.developer.apple.com/thread/45237

this does not work for me

this does not work for me.



Details

Failed to start remote service on device.
Domain: com.apple.dtdevicekit
Code: 811
Recovery Suggestion: Please check your connection to your device.
User Info: {
  DVTRadarComponentKey = 261622;
}
  • -

The service is invalid.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653150
User Info: {
  DVTRadarComponentKey = 261622;
  MobileDeviceErrorCode = "(0xE8000022)";
  "com.apple.dtdevicekit.stacktrace" = (
0  DTDeviceKitBase           0x0000000127ebb81a DTDKCreateNSErrorFromAMDErrorCode + 233
1  DTDeviceKitBase           0x0000000127ecd161 _63-[DTDKRemoteDeviceConnection startFirstServiceOf:unlockKeybag:]blockinvoke + 564
2  DTDeviceKitBase           0x0000000127ecc829
48-[DTDKRemoteDeviceConnection futureWithSession:]blockinvoke3 + 22
3  DTDeviceKitBase           0x0000000127ebddf9 _DTDKExecuteInSessionblockinvoke2 + 35
4  DTDeviceKitBase           0x0000000127ebd209 _DTDKExecuteWithConnectionblockinvoke2 + 473
5  DTDeviceKitBase           0x0000000127ebd007 _DTDKExecuteWithConnectionblockinvoke + 106
6  libdispatch.dylib          0x00007fff6dc9e658
dispatchclientcallout + 8
7  libdispatch.dylib          0x00007fff6dcaa6ec dispatchlanebarriersyncinvokeandcomplete + 60
8  DVTFoundation            0x000000010ed11148 DVTDispatchBarrierSync + 208
9  DVTFoundation            0x000000010ece7aa3 -[DVTDispatchLock performLockedBlock:] + 64
10 DTDeviceKitBase           0x0000000127ebcf08 DTDKExecuteWithConnection + 226
11 DTDeviceKitBase           0x0000000127ebdc63 DTDKExecuteInSession + 376
12 DTDeviceKitBase           0x0000000127ecc66a
48-[DTDKRemoteDeviceConnection futureWithSession:]blockinvoke2 + 131
13 DVTFoundation            0x000000010ed0e5d4 DVTCALLINGCLIENTBLOCK + 7
14 DVTFoundation            0x000000010ed10216
DVTDispatchAsyncblockinvoke + 1194
15 libdispatch.dylib          0x00007fff6dc9d6c4
dispatchcallblockandrelease + 12
16 libdispatch.dylib          0x00007fff6dc9e658 dispatchclientcallout + 8
17 libdispatch.dylib          0x00007fff6dca3c44
dispatchlaneserialdrain + 597
18 libdispatch.dylib          0x00007fff6dca4609
dispatchlaneinvoke + 414
19 libdispatch.dylib          0x00007fff6dcadc09 dispatchworkloopworkerthread + 596
20 libsystempthread.dylib       0x00007fff6def8a3d pthreadwqthread + 290
21 libsystem
pthread.dylib       0x00007fff6def7b77 start_wqthread + 15
);
}
  • -


System Information

macOS Version 10.15.6 (Build 19G73)
Xcode 11.6 (16141)
Hey, @wlawver

I believe you using iOS 12 Public beta.

Your device's configuration not compatible with Xcode version
you need to update the Xcode to 12 beta as well.
Why is it happened only on Xcode12 beta5?
I installed xcode 12.0 beta 5 and keep opened my older version of xcode and got the same error, after quite the older xcode it works for me.
Same problem with xcode 12 beta 6 and iPhone OS 14.0, with iPhone OS 13.6.4 all ok
same issue with Xcode 11.7 and iPhone iOS14.0(with disk image 14.0 installed )

same issue with Xcode 11.7 and iPhone iOS14.0(with disk image 14.0 installed)



Details

Failed to start remote service on device.
Domain: com.apple.dtdevicekit
Code: 811
Recovery Suggestion: Please check your connection to your device.
User Info: {
  DVTRadarComponentKey = 261622;
}
  • -

The service is invalid.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653150
User Info: {
  DVTRadarComponentKey = 261622;
  MobileDeviceErrorCode = "(0xE8000022)";
  "com.apple.dtdevicekit.stacktrace" = (
0  DTDeviceKitBase           0x000000011f30081a DTDKCreateNSErrorFromAMDErrorCode + 233
1  DTDeviceKitBase           0x000000011f312161 _63-[DTDKRemoteDeviceConnection startFirstServiceOf:unlockKeybag:]blockinvoke + 564
2  DTDeviceKitBase           0x000000011f311829
48-[DTDKRemoteDeviceConnection futureWithSession:]blockinvoke3 + 22
3  DTDeviceKitBase           0x000000011f302df9 _DTDKExecuteInSessionblockinvoke2 + 35
4  DTDeviceKitBase           0x000000011f302209 _DTDKExecuteWithConnectionblockinvoke2 + 473
5  DTDeviceKitBase           0x000000011f302007 _DTDKExecuteWithConnectionblockinvoke + 106
6  libdispatch.dylib          0x00007fff6ecf8658
dispatchclientcallout + 8
7  libdispatch.dylib          0x00007fff6ed046ec dispatchlanebarriersyncinvokeandcomplete + 60
8  DVTFoundation            0x0000000104da8138 DVTDispatchBarrierSync + 208
9  DVTFoundation            0x0000000104d7ea93 -[DVTDispatchLock performLockedBlock:] + 64
10 DTDeviceKitBase           0x000000011f301f08 DTDKExecuteWithConnection + 226
11 DTDeviceKitBase           0x000000011f302c63 DTDKExecuteInSession + 376
12 DTDeviceKitBase           0x000000011f31166a
48-[DTDKRemoteDeviceConnection futureWithSession:]blockinvoke2 + 131
13 DVTFoundation            0x0000000104da55c4 DVTCALLINGCLIENTBLOCK + 7
14 DVTFoundation            0x0000000104da7206
DVTDispatchAsyncblockinvoke + 1194
15 libdispatch.dylib          0x00007fff6ecf76c4
dispatchcallblockandrelease + 12
16 libdispatch.dylib          0x00007fff6ecf8658 dispatchclientcallout + 8
17 libdispatch.dylib          0x00007fff6ecfdc44
dispatchlaneserialdrain + 597
18 libdispatch.dylib          0x00007fff6ecfe609
dispatchlaneinvoke + 414
19 libdispatch.dylib          0x00007fff6ed07c09 dispatchworkloopworkerthread + 596
20 libsystempthread.dylib       0x00007fff6ef52a3d pthreadwqthread + 290
21 libsystem
pthread.dylib       0x00007fff6ef51b77 start_wqthread + 15
);
}
  • -


System Information

macOS Version 10.15.6 (Build 19G73)
Xcode 11.7 (16142)