Bug 59455 - Xamarin.UITest fails to run if the device family is iPad only
Summary: Xamarin.UITest fails to run if the device family is iPad only
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: master
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Future Cycle (TBD)
Assignee: Dominic N [MSFT]
Depends on:
Reported: 2017-09-13 14:06 UTC by Christoffer Hoel
Modified: 2017-09-15 23:24 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Christoffer Hoel 2017-09-13 14:06:44 UTC

I'm setting up my project (iPad only) for the Xamarin Test Cloud, but found an issue. I get an error when running the test that comes with the UITest template (AppLaunches). It runs perfect if I change my iOS project to run on iPhone (which is was not designed for).

--- Tool versions
- Simulator version: 10.3.1
- XCode: 8.3.3
- VS for Mac: 7.1.3 (build 1)
- Xamarin.iOS:

--- iOS settings
- MinimumOSVersion: 10.0
- UIDeviceFamily: [2] (iPad)

--- NuGet package version
- Xamarin.UITest 2.1.0
- Xamarin.TestCloud.Agent 0.21.0

--- How to replicate
1. Download the CreditCardValidator (https://github.com/xamarin/test-cloud-samples/raw/master/Quickstarts/downloads/CreditCardValidator.iOS.zip) project.
2. Change the iOS project to only run on iPad.
3. Run the tests and verify that it fails.

--- Error Message:

SetUp : Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Failed to install DeviceAgent

ExitCode: 1

		-c,--codesign-identity	<codesign-identifier> [OPTIONAL] 	Identity used to codesign app bundle [device only]. Deprecated - should use profile path.	DEFAULT=
		-d,--device-id	<device-identifier>	iOS Simulator GUID or 40-digit physical device ID
		-i,--resources-path	<path/to/resources> [OPTIONAL] 	Path to resources (executables) to inject into app directory. A list of colon separated files may be specified.
		-p,--profile-path	<profile-path> [OPTIONAL] 	Path to provisioning profile
		-u,--update-app	<should-update-app> [OPTIONAL] 	When true, will reinstall the app if the device contains an older version than the bundle specified	DEFAULT=1
	install <app-path>
Error installing application: Error Domain=com.facebook.FBSimulatorControl Code=0 "Simulator does not support any of the architectures ([x86_64, i386]) of the executable at /var/folders/3v/6bwsqqw156zg8m4n1_g_1zz40000gn/T/xdb/DeviceAgent.iOS.Dependencies/2450a6b29680a9ad62e5bb5816848ba8/app/DeviceAgent-Runner.app/XCTRunner. Simulator Archs ([(null)])" UserInfo={NSLocalizedDescription=Simulator does not support any of the architectures ([x86_64, i386]) of the executable at /var/folders/3v/6bwsqqw156zg8m4n1_g_1zz40000gn/T/xdb/DeviceAgent.iOS.Dependencies/2450a6b29680a9ad62e5bb5816848ba8/app/DeviceAgent-Runner.app/XCTRunner. Simulator Archs ([(null)])}
Comment 1 Christoffer Hoel 2017-09-14 06:04:03 UTC
I forgot a step under "How to replicate": remember to update the Xamarin.UITest package to 2.1.0 (to support the simulator in 8.3.3).
Comment 2 Alex Soto [MSFT] 2017-09-15 14:13:12 UTC
This is being reviewed :)
Comment 3 Kent Green [MSFT] 2017-09-15 23:24:36 UTC
Even though you might only be hitting this issue locally, we research & triage Xamarin.UITest issues through the Test Cloud support channels because there's a lot of crossover between the testing platform and testing frameworks. 

You can reach out to support by logging into testcloud.xamarin.com & clicking on "Support" in the menubar: http://content.screencast.com/users/Kent.Green/folders/Jing/media/572442e2-c82c-4a25-9a30-1f594f156dd7/00000323.png

That said, I did a quick sanity check of your issue. I did notice that I only seem to be able to reproduce the symptoms on builds initially after updating...but the issue was resolved by closing and reopening the solution. In my case it seemed like the using Xamarin.UITest & related statements were broken when updating the package, and failed to be refreshed. 

When you reach out to email support could you note if you see any difference from restarting Visual Studio for Mac after you change the Xamarin.UITest package?