Bug 43235 - UITests fail to start app on iOS simulator in preview
Summary: UITests fail to start app on iOS simulator in preview
Status: RESOLVED DUPLICATE of bug 44145
Alias: None
Product: iOS
Classification: Xamarin
Component: Pre-release ()
Version: XI 9.99 (iOS 10 previews)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-08-10 16:25 UTC by mcundiff
Modified: 2016-09-13 12:42 UTC (History)
5 users (show)

Tags:
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:
Status:
RESOLVED DUPLICATE of bug 44145

Description mcundiff 2016-08-10 16:25:45 UTC
Using simulator with iOS 10 with continuous integration build for Xamarin.iOS (Hash: 64c20c0).  UITests created in Xamarin fail with the following error (even when made using "Add > Add New Project > iOS > Tests > UI Test App" for an empty/newly created Single View App).  Solution builds correctly and attempts to run but fails when StartApp function is called:

  at System.Linq.Enumerable.First[TSource] (IEnumerable`1 source, System.Func`2 predicate) [0x00065] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/System.Core/System/Linq/Enumerable.cs:939 
  at Xamarin.UITest.iOS.Instruments.GetAutomationTemplatePath () <0x46056e8 + 0x000fb> in <filename unknown>:0 
  at Xamarin.UITest.iOS.Instruments.StartInstrumentsInternal (System.String targetApplication, iOSRunType runType, System.String deviceId, System.String runLoopPath, AppDataMode appDataMode, System.Predicate`1 dropLine) <0x4604218 + 0x0001b> in <filename unknown>:0 
  at Xamarin.UITest.iOS.Instruments.StartInstruments (System.String targetApplication, iOSRunType runType, System.String deviceId, AppDataMode appDataMode) <0x46040c8 + 0x0004f> in <filename unknown>:0 
  at Xamarin.UITest.iOS.iOSAppLauncher.RunAppInEmulatorInternal (System.String application, Xamarin.UITest.iOS.Instruments instruments, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Uri deviceUri, Xamarin.UITest.Shared.Artifacts.ArtifactFolder artifactFolder, AppDataMode appDataMode, System.String deviceIdentifier) <0x4602080 + 0x001f7> in <filename unknown>:0 
  at Xamarin.UITest.iOS.iOSAppLauncher.RunAppInEmulator (Xamarin.UITest.Shared.iOS.AppBundle appBundle, Xamarin.UITest.iOS.Instruments instruments, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Uri deviceUri, Xamarin.UITest.Shared.Artifacts.ArtifactFolder artifactFolder, AppDataMode appDataMode, System.String deviceIdentifier) <0x447b4d0 + 0x001ef> in <filename unknown>:0 
  at Xamarin.UITest.iOS.iOSAppLauncher.LaunchApp (IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, Xamarin.UITest.TestCloud.TestCloudiOSAppConfiguration testCloudAppConfiguration, Xamarin.UITest.Shared.Http.HttpClient testCloudWsClient) <0x4341d18 + 0x00283> in <filename unknown>:0 
  at Xamarin.UITest.iOS.iOSApp..ctor (IiOSAppConfiguration appConfiguration) <0x4275000 + 0x00b83> in <filename unknown>:0 
  at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (AppDataMode appDataMode) <0x42463a8 + 0x00063> in <filename unknown>:0 
  at UITests.shared.csharp.TestHelper.initializeApp () <0x4244920 + 0x00063> in <filename unknown>:0 
  at UITests.ios.csharp.QaSmokeTests.BeforeEachTest () <0x3d08f78 + 0x00013> in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:295 


XAMARIN:

=== Xamarin Studio Professional ===

Version 6.1 (build 5316)
Installation UUID: 5a8da78e-6731-442f-b9e1-d11ad131abd7
Runtime:
	Mono 4.4.0 (mono-4.4.0-branch/fcf7a6d) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404000148

=== NuGet ===
Version: 3.4.3.0

=== Xamarin.Profiler ===
Not Installed

=== Apple Developer Tools ===
Xcode 8.0 (11222.4)
Build 8S188o

=== Xamarin.iOS ===
Version: 9.99.2.5 (Visual Studio Professional)
Hash: 64c20c0
Branch: cycle8
Build date: 2016-08-07 14:57:43-0400

=== Build Information ===
Release ID: 601005316
Git revision: dfc3133c2542c0e69d8acf9e753a583a82ba6f88
Build date: 2016-08-09 07:09:29-04
Xamarin addins: 26e9d6ad5431f7a0290a7109439ec3836f5ccbc9
Build lane: monodevelop-lion-cycle8

=== Operating System ===
Mac OS X 10.11.6
Darwin Morgans-Mac-mini.local 15.6.0 Darwin Kernel Version 15.6.0
    Thu Jun 23 18:25:34 PDT 2016
    root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
Comment 1 mcundiff 2016-08-10 17:19:16 UTC
In order to get the application to build at all I had to switch the .NET runtime to be Mono 4.4.2

Xamarin Studio > Preferences > Projects > .NET Runtimes > Mono 4.4.2 (f72fe45) (/Library/Frameworks/Mono.framework/Versions/4.4.2)

Before doing so I got the following error:
/Users/mcundiff/softphones/Client.ios.fsharp/Client.ios.fsharp.fsproj: Error: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.FSharp.targets: Project file could not be imported, it was being imported by /Users/mcundiff/softphones/Client.ios.fsharp/Client.ios.fsharp.fsproj: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.FSharp.targets could not import "$(FSharpTargets)" (Client.ios.fsharp)
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2016-09-13 12:42:13 UTC
I'll mark this as a duplicate of another bug about the same issue that by chance got updated before this one with the cause of the problem.  The problem is that as of Xcode 8 "The Automation instrument has been removed from Instruments." (https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html)

UITest currently relies on the UI Automation API provided by the Automation instrument.  The UITest developers are working to address that change and use a different mechanism to automate the UI.  In the mean time it will be necessary to keep Xcode 7 installed in the default location /Applications/Xcode.app for use with UITest.  You can optionally also have Xcode 8 installed side-by-side at a different location.

*** This bug has been marked as a duplicate of bug 44145 ***