4

can't launch UI auto tests on my ipad.

Error - Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Failed to launch DeviceAgent ExitCode: 65

App is installed on device. DeviseAgent installed while trying to run any test.

ios version of ipad 10.3.3 xcode 8.3.3

Packages in appProject:

Xamarin.TestCloud.Agent v 0.20.7

in testProject:

NUnit v 2.6.3

Xamarin.UITest v 2.0.10

Test setup:

app = ConfigureApp
      .iOS
      .InstalledApp(somebundle)
      .StartApp();

About profiles also looks like everything is ok.

The thing is - test are running on another device (ipad with ios 9.2) and some time ago were running on current device (from time to time). So that should not be problem with ios version compatibility.

Also tryed to delete folder 'xdb';

Any ideas?

MiddleD.
  • 315
  • 1
  • 4
  • 21
  • I have a few questions: 1. Does the app you're trying to test work if you manually launch it on the affected device? 2. Have you tried uninstalling & reinstalling the IPA? 3. Can you reproduce the issue with any other iOS apps, such as a template iOS app? – user62171 Aug 22 '17 at 16:18
  • 1. Yes, app works fine. 2. I've reinstalled everything many times :) 3. I don't think about this thing, I'll try. – MiddleD. Aug 22 '17 at 16:21
  • 3. Yes, it reprodused on, for example empty app with custom bundle. DeviceAgent installing itself, but app not running and the same error 65. – MiddleD. Aug 22 '17 at 16:38
  • Do you notice a difference if you update NUnit to 2.6.4? Also, have you tried explicitly uninstalling any old copies of the app & DeviceAgent from the device before trying to run it again? – user62171 Aug 23 '17 at 22:27
  • 1
    No, actualy I don't feel difference, yes, I try to uninstalling app and DA every time. While I'm trying to resolve this issue - i got feeling that the problem in provisioning profile. Looks like some way app install more than one PP or trying to use old one. For now it's only guess. I'll write result of checking it. – MiddleD. Aug 25 '17 at 09:20
  • Hard to say what the issue is without more detail, but make sure you're using a development provisioning profile; not a distribution provisioning profile. I know Distribution fails in Xamarin Test Cloud but I can't remember 100% if it fails for local UITests. – user62171 Aug 25 '17 at 20:18

2 Answers2

6

To get round this I have to navigate to /Var/Folders/ in here one of the sub folders will contain an xdb folder. Delete this and run tests again and it will work.

TB14
  • 187
  • 1
  • 15
  • That worked for me. I deleted the xdb directory in the folder referenced in the error message in VS. – Guy Lowe Jul 31 '20 at 05:41
1

if you have upgraded to latest xcode version 12.0 for ioS 14.0 support then you need to upgrade your xamarin.uitest version also to more than 3.0.10 ( better latest version). Xamarin.UITest prior versions (3.0.5) does not have support to iOS14.

Ajay Kopperla
  • 199
  • 2
  • 5
  • This solution worked for me with iOS 12.5.5. I had to upgrade package Xamarin.UITest to current last version (3.2.4). This answer should get more upvotes ! – Naweap Dec 10 '21 at 20:46