Forum Xamarin Test Cloud (Read Only)
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Exception when trying to start a Xamarin.UITest

I have a strange problem with my UI tests. Whenever I try to start the application in my SetUp method with app = ConfigureApp.Android.StartApp();, I get the following error:

SetUp : System.InvalidOperationException : The sequence contains no elements.

   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   at Xamarin.UITest.Shared.Android.Queries.QueryKeyStoreKeyType.ExtractKeyType(ProcessResult processResult)
   at Xamarin.UITest.Shared.Android.Queries.QueryKeyStoreKeyType.Execute(IProcessRunner processRunner, IJdkTools jdkTools)
   at Xamarin.UITest.Shared.Execution.Executor.<Execute>c__AnonStorey2`3.<>m__0()
   at Xamarin.UITest.Shared.Execution.Executor.WrapQuery[TResult](Func`1 queryFunc)
   at Xamarin.UITest.Shared.Execution.Executor.Execute[TResult,TDep1,TDep2](IQuery`3 query)
   at Xamarin.UITest.Shared.Android.KeyStore..ctor(IExecutor executor, FileInfo keyStoreFile, String keyAlias, String storePassword, String keyPassword)
   at Xamarin.UITest.Android.LocalAndroidAppInitializer.GetDefaultKeyStore(ArtifactFolder artifactFolder)
   at Xamarin.UITest.Android.LocalAndroidAppInitializer.PrepareApkFiles(IAndroidAppConfiguration appConfiguration, ArtifactFolder artifactFolder)
   at Xamarin.UITest.Android.AndroidApp..ctor(IAndroidAppConfiguration appConfiguration)
   at Xamarin.UITest.Configuration.AndroidAppConfigurator.StartApp(AppDataMode appDataMode)
   at Pollenalarm.Droid.UITests.Tests.BeforeEachTest() in c:\Source\Other\Pollenalarm\Pollenalarm\Pollenalarm.Android\Pollenalarm.Android.UITests\Tests.cs:Line 26.

For me it looks like Xamarin is unable to find the application to start on my device or something like that.

The weird thing is, that it only occurs on my Windows machine. My MacBook does not seem to have any problems with that. They both run the same version of Xamarin and both use the latest release of Xamarin.UITest (

So it seems that something in my Windows configuration was wrong but even after reinstalling Xamarin the problem was still there.
It drives me crazy. Do you have any ideas?

Best Answer


  • stvansolanostvansolano UMInsider, University ✭✭✭

    Hey @einRobby
    Any fix for it? I have the same issue and contacted Xamarin recently. Hope they can let us know here

  • einRobbyeinRobby USMember

    Unfortunately not. I have this problem on both of my Windows PCs. As I mentioned, it runs fine on my MacBook. On both devices that causes the problems runs Windows 10. My collegue with a Windows 7 machine has no problems. Maybe that is the cause? Which OS are you working on?

  • stvansolanostvansolano UMInsider, University ✭✭✭

    Hey @einRobby definitely it is Win10 issue :( I tried to reproduce it today on a Win8 and it worked fine

  • MaruMaru DEMember ✭✭

    I have the same problem but running on Win7...

  • stvansolanostvansolano UMInsider, University ✭✭✭

    Correct, v1.0.0.22 worked for me. Have you tried it @einRobby ?

Sign In or Register to comment.