Xcode 11 install to device fails, code -402620415

After the upgrade to Xcode 11, an existing app that once was debuggable on device can no longer be installed and debugged on device. It is failing with an unknown error. Same failure occurs on Xcode 11.2.1 and Xcode 11.3 beta. App debugging on SImulator works fine.


This is not reporting a codesign or provisioning failure (I've seen those in the past). I'm hoping someone can help narrow down the culprits.


Details


Unable to install "NameOfMyApp"

Domain: com.apple.dtdevicekit

Code: -402620415

--

App installation failed

Domain: com.apple.dtdevicekit

Code: -402620415

Failure Reason: An unknown error has occurred.

User Info: {

DVTRadarComponentKey = 487927;

"com.apple.dtdevicekit.stacktrace" = (

0 DTDeviceKitBase 0x000000012692a6e7 DTDKCreateNSError + 109

1 DTDeviceKitBase 0x000000012692ade9 DTDK_AMDErrorToNSError + 792

2 DTDeviceKitBase 0x000000012696a56a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164

3 DVTFoundation 0x000000010b4ea156 DVTInvokeWithStrongOwnership + 73

4 DTDeviceKitBase 0x000000012696a301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589

5 IDEiOSSupportCore 0x00000001267f2a25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523

6 DVTFoundation 0x000000010b61b3ba __DVT_CALLING_CLIENT_BLOCK__ + 7

7 DVTFoundation 0x000000010b61ca92 __DVTDispatchAsync_block_invoke + 809

8 libdispatch.dylib 0x00007fff590635f8 _dispatch_call_block_and_release + 12

9 libdispatch.dylib 0x00007fff5906463d _dispatch_client_callout + 8

10 libdispatch.dylib 0x00007fff5906a8e0 _dispatch_lane_serial_drain + 602

11 libdispatch.dylib 0x00007fff5906b396 _dispatch_lane_invoke + 385

12 libdispatch.dylib 0x00007fff590736ed _dispatch_workloop_worker_thread + 598

13 libsystem_pthread.dylib 0x00007fff592a4611 _pthread_wqthread + 421

14 libsystem_pthread.dylib 0x00007fff592a43fd start_wqthread + 13

);

}

--

Details


Following is the details of the error in the device.


Unable to install "NameOfMyApp"

Domain: com.apple.dtdevicekit

Code: -402653103

--

App installation failed

Domain: com.apple.dtdevicekit

Code: -402653103

Failure Reason: Could not inspect the application package.

User Info: {

DVTRadarComponentKey = 487927;

"com.apple.dtdevicekit.stacktrace" = (

0 DTDeviceKitBase 0x00000001231936e7 DTDKCreateNSError + 109

1 DTDeviceKitBase 0x0000000123193de9 DTDK_AMDErrorToNSError + 792

2 DTDeviceKitBase 0x00000001231d356a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164

3 DVTFoundation 0x000000010b6d4156 DVTInvokeWithStrongOwnership + 73

4 DTDeviceKitBase 0x00000001231d3301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589

5 IDEiOSSupportCore 0x000000012306ca25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523

6 DVTFoundation 0x000000010b8053ba __DVT_CALLING_CLIENT_BLOCK__ + 7

7 DVTFoundation 0x000000010b806a92 __DVTDispatchAsync_block_invoke + 809

8 libdispatch.dylib 0x00007fff691cd583 _dispatch_call_block_and_release + 12

9 libdispatch.dylib 0x00007fff691ce50e _dispatch_client_callout + 8

10 libdispatch.dylib 0x00007fff691d3ace _dispatch_lane_serial_drain + 597

11 libdispatch.dylib 0x00007fff691d4452 _dispatch_lane_invoke + 363

12 libdispatch.dylib 0x00007fff691dda9e _dispatch_workloop_worker_thread + 598

13 libsystem_pthread.dylib 0x00007fff6942771b _pthread_wqthread + 290

14 libsystem_pthread.dylib 0x00007fff6942757b start_wqthread + 15

);

}

--

I'm getting the same error when trying to install an app onto a local device from Xcode. If you figured this out or were able to work around it, any advice would be appreciated.

I was able to get past this issue by plugging my device into a different USB port than the one I had been using. I tried many, many solutions including reinstallation of Xcode, creation of a different user profile, etc, etc before this succeeded.

I'm having the same issue. Were you able to find a solution?

I had this same issue. I suspect, although I'm not sure at all, that it had something to do with trying to install the app on my device wirelessly when on a fairly weak wifi network. Something seemed to get corrupted and then it wouldn't work even when plugged in over USB.


In any event, I removed the app from my device, I removed my device from Xcode, then I did a force restarton my device, and repaired my device with Xcode. Then it subsequently worked and haven't had any issues since then.

I have the same code but different Domain error:


Details

Unable to install "NameOfMyApp"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620415
--
An unknown error has occurred.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620415
User Info: {
    DVTRadarComponentKey = 280331;
    MobileDeviceErrorCode = "(0xE8008001)";
    "com.apple.dtdevicekit.stacktrace" = (
  0   DTDeviceKitBase                     0x000000012784481a DTDKCreateNSErrorFromAMDErrorCode + 233
  1   DTDeviceKitBase                     0x0000000127885f70 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
  2   DVTFoundation                       0x000000010d532385 DVTInvokeWithStrongOwnership + 73
  3   DTDeviceKitBase                     0x0000000127885ca8 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1654
  4   IDEiOSSupportCore                   0x00000001276fce91 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4165
  5   DVTFoundation                       0x000000010d665a10 __DVT_CALLING_CLIENT_BLOCK__ + 7
  6   DVTFoundation                       0x000000010d667652 __DVTDispatchAsync_block_invoke + 1194
  7   libdispatch.dylib                   0x00007fff71416583 _dispatch_call_block_and_release + 12
  8   libdispatch.dylib                   0x00007fff7141750e _dispatch_client_callout + 8
  9   libdispatch.dylib                   0x00007fff7141cace _dispatch_lane_serial_drain + 597
  10  libdispatch.dylib                   0x00007fff7141d452 _dispatch_lane_invoke + 363
  11  libdispatch.dylib                   0x00007fff71426a9e _dispatch_workloop_worker_thread + 598
  12  libsystem_pthread.dylib             0x00007fff716716fc _pthread_wqthread + 290
  13  libsystem_pthread.dylib             0x00007fff71670827 start_wqthread + 15
);
}
--


System Information

macOS Version 10.15.3 (Build 19D76)
Xcode 11.4 (16134)

'WatchOnlyAppContainerNotInstallable'


my message like this.

i can't install app to the my IPhon.

It works very well on the simulator.

Someone has idea about that?

I am also facing same iuuses in xcode 11.4.1


Details


Unable to install "xyz"

Domain: com.apple.dt.MobileDeviceErrorDomain

Code: -402620388

--

No code signature found.

Domain: com.apple.dt.MobileDeviceErrorDomain

Code: -402620388

User Info: {

DVTRadarComponentKey = 261622;

MobileDeviceErrorCode = "(0xE800801C)";

"com.apple.dtdevicekit.stacktrace" = (

0 DTDeviceKitBase 0x000000011e68f81a DTDKCreateNSErrorFromAMDErrorCode + 233

1 DTDeviceKitBase 0x000000011e6d0f70 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155

2 DVTFoundation 0x00000001051da155 DVTInvokeWithStrongOwnership + 73

3 DTDeviceKitBase 0x000000011e6d0ca8 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1654

4 IDEiOSSupportCore 0x000000011e547e91 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4165

5 DVTFoundation 0x000000010530d7f4 __DVT_CALLING_CLIENT_BLOCK__ + 7

6 DVTFoundation 0x000000010530f436 __DVTDispatchAsync_block_invoke + 1194

7 libdispatch.dylib 0x00007fff703926c4 _dispatch_call_block_and_release + 12

8 libdispatch.dylib 0x00007fff70393658 _dispatch_client_callout + 8

9 libdispatch.dylib 0x00007fff70398c44 _dispatch_lane_serial_drain + 597

10 libdispatch.dylib 0x00007fff703995d6 _dispatch_lane_invoke + 363

11 libdispatch.dylib 0x00007fff703a2c09 _dispatch_workloop_worker_thread + 596

12 libsystem_pthread.dylib 0x00007fff705eda3d _pthread_wqthread + 290

13 libsystem_pthread.dylib 0x00007fff705ecb77 start_wqthread + 15

);

}

--



System Information


macOS Version 10.15.4 (Build 19E287)

Xcode 11.4.1 (16137)

I am also having this exact same error after upgrading to Xcode 11. I cannot install apps on my device because of the

MobileDeviceErrorDomain
error.

Hi,


Did you solve the error?

same code. different message. i havent been able to run any apps on my phone due to this error, but trying on a different phone with a different apple id works. All provisioning profiles deleted. ive tried everything


Unable to install "Xylophone"

Domain: com.apple.dt.MobileDeviceErrorDomain

Code: -402620383

--

The maximum number of apps for free development profiles has been reached.

Domain: com.apple.dt.MobileDeviceErrorDomain

Code: -402620383

User Info: {

DVTRadarComponentKey = 487925;

MobileDeviceErrorCode = "(0xE8008021)";

"com.apple.dtdevicekit.stacktrace" = (

0 DTDeviceKitBase 0x00000001207b081a DTDKCreateNSErrorFromAMDErrorCode + 233

1 DTDeviceKitBase 0x00000001207f1f70 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155

2 DVTFoundation 0x00000001077f0155 DVTInvokeWithStrongOwnership + 73

3 DTDeviceKitBase 0x00000001207f1ca8 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1654

4 IDEiOSSupportCore 0x0000000120668e91 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4165

5 DVTFoundation 0x00000001079237f4 __DVT_CALLING_CLIENT_BLOCK__ + 7

6 DVTFoundation 0x0000000107925436 __DVTDispatchAsync_block_invoke + 1194

7 libdispatch.dylib 0x00007fff677da6c4 _dispatch_call_block_and_release + 12

8 libdispatch.dylib 0x00007fff677db658 _dispatch_client_callout + 8

9 libdispatch.dylib 0x00007fff677e0c44 _dispatch_lane_serial_drain + 597

10 libdispatch.dylib 0x00007fff677e15d6 _dispatch_lane_invoke + 363

11 libdispatch.dylib 0x00007fff677eac09 _dispatch_workloop_worker_thread + 596

12 libsystem_pthread.dylib 0x00007fff67a39a3d _pthread_wqthread + 290

13 libsystem_pthread.dylib 0x00007fff67a38b77 start_wqthread + 15

);

}

--



System Information


macOS Version 10.15.5 (Build 19F101)

Xcode 11.5 (16139)

I have the same kind of error. It's the same as the one of c4stus above:

Code Block Details
Unable to install "Concentration"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620415
--
An unknown error has occurred.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620415
User Info: {
DVTRadarComponentKey = 280331;
MobileDeviceErrorCode = "(0xE8008001)";
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x000000011eca981a DTDKCreateNSErrorFromAMDErrorCode + 233
1 DTDeviceKitBase 0x000000011eceaf70 90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2 DVTFoundation 0x00000001069e0155 DVTInvokeWithStrongOwnership + 73
3 DTDeviceKitBase 0x000000011eceaca8 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1654
4 IDEiOSSupportCore 0x000000011eb61e91 118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4165
5 DVTFoundation 0x0000000106b137f4 DVT_CALLING_CLIENT_BLOCK + 7
6 DVTFoundation 0x0000000106b15436 __DVTDispatchAsync_block_invoke + 1194
7 libdispatch.dylib 0x00007fff730826c4 _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x00007fff73083658 _dispatch_client_callout + 8
9 libdispatch.dylib 0x00007fff73088c44 _dispatch_lane_serial_drain + 597
10 libdispatch.dylib 0x00007fff730895d6 _dispatch_lane_invoke + 363
11 libdispatch.dylib 0x00007fff73092c09 _dispatch_workloop_worker_thread + 596
12 libsystem_pthread.dylib 0x00007fff732dda3d _pthread_wqthread + 290
13 libsystem_pthread.dylib 0x00007fff732dcb77 start_wqthread + 15
);
}
--
System Information
macOS Version 10.15.5 (Build 19F101)
Xcode 11.5 (16139)


Same Error Please Assist :( :(

Code Block
Details
Unable to install "MyApp"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620383
--
The maximum number of apps for free development profiles has been reached.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620383
User Info: {
  DVTRadarComponentKey = 487925;
  MobileDeviceErrorCode = "(0xE8008021)";
  "com.apple.dtdevicekit.stacktrace" = (
0  DTDeviceKitBase           0x000000011901a81a DTDKCreateNSErrorFromAMDErrorCode + 233
1  DTDeviceKitBase           0x000000011905bf70 90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2  DVTFoundation            0x000000010062b155 DVTInvokeWithStrongOwnership + 73
3  DTDeviceKitBase           0x000000011905bca8 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1654
4  IDEiOSSupportCore          0x0000000118ed2e91 118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4165
5  DVTFoundation            0x000000010075e7f4 DVT_CALLING_CLIENT_BLOCK + 7
6  DVTFoundation            0x0000000100760436 __DVTDispatchAsync_block_invoke + 1194
7  libdispatch.dylib          0x00007fff6adfc6c4 _dispatch_call_block_and_release + 12
8  libdispatch.dylib          0x00007fff6adfd658 _dispatch_client_callout + 8
9  libdispatch.dylib          0x00007fff6ae02c44 _dispatch_lane_serial_drain + 597
10 libdispatch.dylib          0x00007fff6ae035d6 _dispatch_lane_invoke + 363
11 libdispatch.dylib          0x00007fff6ae0cc09 _dispatch_workloop_worker_thread + 596
12 libsystem_pthread.dylib       0x00007fff6b057a3d _pthread_wqthread + 290
13 libsystem_pthread.dylib       0x00007fff6b056b77 start_wqthread + 15
);
}
--
System Information
macOS Version 10.15.5 (Build 19F96)
Xcode 11.5 (16139)

@DavidTatenda & @skkuddin -- The errors here appear to be roughly the same:
"The maximum number of apps for free development profiles has been reached." Can you check the number of apps you currently have development profiles for?

@marcremijn -- This looks a little more obscure. If you're able to still reproduce this, could you please collect sysdiagnose archives from your host Mac (sudo sysdiagnose) and the target device (see the sysdiagnose instructions here: https://developer.apple.com/bug-reporting/profiles-and-logs/?platform=ios). If you could attach these to a new Feedback ticket (https://developer.apple.com/bug-reporting/) and reply with the FB number, that'd be amazing!

@Dnyanesh_iOS -- It looks like your app isn't code signed correctly. Can you check your build settings and especially any post-build scripts you may have that could modify the resulting binary in anyway.


@jsnee I have only 2 apps under my development profile and I don't understand why the message say that I have exceeded?
I have confirmed this by going to: Window>> Devices and Simulators >> Right clicking on my iPhone 11 device >> Show Provisioning Profiles >> I have 2 iOS Team Provisioning Profiles listed for the 2 App IDs.
My iPhone 11 device has only one development app installed.
However the strange thing is I can run the same app on my older iPhone 6 device without the error.

Xcode 11 install to device fails, code -402620415
 
 
Q