Bug 58685 - UITest Query.Tap() fails with System.ArgumentOutOfRangeException
Summary: UITest Query.Tap() fails with System.ArgumentOutOfRangeException
Status: RESOLVED DUPLICATE of bug 59302
Alias: None
Product: iOS
Classification: Xamarin
Component: General (show other bugs)
Version: XI 10.14 (d15-4)
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-08-10 02:14 UTC by Jerome Laban
Modified: 2017-10-17 22:38 UTC (History)
8 users (show)

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


Attachments
Exception stacktrace (14.57 KB, text/plain)
2017-08-10 02:14 UTC, Jerome Laban
Details
Example UITest Projekt for Xamarin.iOS 10.14 (71.69 KB, application/zip)
2017-09-20 15:20 UTC, basti
Details


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 59302

Description Jerome Laban 2017-08-10 02:14:05 UTC
Created attachment 24114 [details]
Exception stacktrace

When running a UITest which calls Query.Tap(), on an iOS device, the call fails with a System.ArgumentOutOfRangeException when run with mono 5.4.0.135 (2017-06/4625f86), but runs properly when running with Mono 4.8.0 (mono-4.8.0-branch/9d74414).

Here are the test references:

    <PackageReference Include="NUnit" Version="2.6.4" />
    <PackageReference Include="NUnitTestAdapter" Version="2.1.1" />
    <PackageReference Include="Xamarin.UITest" Version="2.0.9" />

The following exception is raised (see attached for complete stack): 

Error while performing Tap(Marked("Test"))
Exception: System.AggregateException: One or more errors occurred. ---> System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
  at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x0004a] in <4a3409a5788649939d8853e446934e2b>:0 
  at Microsoft.CSharp.RuntimeBinder.Syntax.NameTable.Add (System.String key, System.Int32 length) [0x00048] in <23ed1b27ffd14ad9afc652f96faec8e0>:0 
  at Microsoft.CSharp.RuntimeBinder.Syntax.NameManager.Add (System.String key, System.Int32 length) [0x00010] in <23ed1b27ffd14ad9afc652f96faec8e0>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.GetName (System.Type type) [0x0002b] in <23ed1b27ffd14ad9afc652f96faec8e0>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.LoadSymbolsFromType (System.Type originalType) [0x0004e] in <23ed1b27ffd14ad9afc652f96faec8e0>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.GetCTypeFromType (System.Type t) [0x00000] in <23ed1b27ffd14ad9afc652f96faec8e0>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddMethodToSymbolTable (System.Reflection.MemberInfo member, Microsoft.CSharp.RuntimeBinder.Semantics.AggregateSymbol callingAggregate, Microsoft.CSharp.RuntimeBinder.Semantics.MethodKindEnum kind) [0x001d1] in <23ed1b27ffd14ad9afc652f96faec8e0>:0
Comment 1 John Miller [MSFT] 2017-08-10 16:40:41 UTC
Hi Jerome,

Thanks for reporting this issue. It looks like this could be related to UITest instead of Xamarin.iOS. I would suggest using the Support link at the top of https://testcloud.xamarin.com/login to report this issue and work with the team there to get them the information they need to file an issue. There also was a new version of UITest released today that would be good to confirm with: 2.0.10. I'll resolve this issue as downstream as it's not identifiable as an issue in Xamarin.iOS but instead UITest. 

Thank you!
Comment 2 basti 2017-09-19 15:59:07 UTC
Hello, 

I am facing the same issue after updating Xamarin iOS 10.12 to 10.14. With Xamarin 10.12 there were no errors.

Using Xamarin UITest 20.0.12, 20.1.0 and 20.1.1 results in the same error.

Looks more like an error in Xamarin iOS.

Visual Studio Enterprise 2017 for Mac (Preview)
Version 7.2 Preview (7.2 build 583)
Installation UUID: ea8ba5b2-3e55-42cc-8451-7da9cba113cd
Runtime:
	Mono 5.4.0.174 (2017-06/1afb931de69) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504000174

Xamarin.iOS
Version: 10.14.0.26 (Visual Studio Enterprise)
Hash: 416f778f
Branch: d15-4
Build date: 2017-08-25 17:30:05-0400

Greetings,
Sebastian
Comment 3 John Miller [MSFT] 2017-09-19 16:37:51 UTC
@Sebastian,

Thanks for commenting. If you believe this issue is related to Xamarin.iOS, please provide a sample project that can reproduce this an open a new bug. I will be happy to review!
Comment 4 basti 2017-09-20 15:20:43 UTC
Created attachment 24832 [details]
Example UITest Projekt for Xamarin.iOS 10.14
Comment 5 basti 2017-09-20 15:23:07 UTC
Hey I added an example project. 

just run the iOS application on a iOS Simulator (I used 10.3 14E8301) and run the UITest after this.

Thanks for your investigation.

my complete console output looks like:

Full log file: /var/folders/lq/77fdl1ts0hz29ns807rmpfjm0000gn/T/uitest/log-2017-09-20_17-11-28-003.txt

iOS test running Xamarin.UITest version: 2.1.1

Attempting IDE connection through pipe 38c30c508e7f46d79b2c361ce2ada5fc.

Deploying app through IDE.

Instructing the IDE to prepare the test app for execution. Session: Assembly=/Users/sebastiangloede/Projects/XamariniOS10_14/XamariniOS10_14 2/XamariniOS10_14.UITests/bin/Debug/XamariniOS10_14.UITests.dll
Platform=iOS

Skipping local screenshots. Can be enabled with EnableScreenshots() when configuring app.

1 - LaunchTestAsync:
    deviceId: A4A74FD6-F5B5-4E6E-BF28-944F472A26DA

1 - Launching simulator if not already running

7 - Launching simulator if not already running

7 - InstallApp:
    pathToBundle: /Users/sebastiangloede/Projects/XamariniOS10_14/XamariniOS10_14 2/iOS/bin/iPhoneSimulator/Debug/device-builds/iphone9.1-10.3.1/XamariniOS10_14.iOS.app
    deviceId: A4A74FD6-F5B5-4E6E-BF28-944F472A26DA

Test server version: 0.21.1

Tapping element matching Class("UITableViewWrapperView") at coordinates [ 187.5, 397.5 ].

Error while performing Tap(Class("UITableViewWrapperView"))
Exception: System.AggregateException: One or more errors occurred. ---> System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
  at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x00087] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/string.cs:1266 
  at Microsoft.CSharp.RuntimeBinder.Syntax.NameTable.Add (System.String key, System.Int32 length) [0x00048] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameTable.cs:61 
  at Microsoft.CSharp.RuntimeBinder.Syntax.NameManager.Add (System.String key, System.Int32 length) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameManager.cs:166 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.GetName (System.Type type) [0x00007] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:357 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.LoadSymbolsFromType (System.Type originalType) [0x0004e] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:667 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.GetCTypeFromType (System.Type t) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:991 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddMethodToSymbolTable (System.Reflection.MemberInfo member, Microsoft.CSharp.RuntimeBinder.Semantics.AggregateSymbol callingAggregate, Microsoft.CSharp.RuntimeBinder.Semantics.MethodKindEnum kind) [0x001c9] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:1648 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddNamesInInheritanceHierarchy (System.String name, System.Collections.Generic.List`1[T] inheritance) [0x0015d] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:271 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddNamesOnType (Microsoft.CSharp.RuntimeBinder.SymbolTable+NameHashKey key) [0x0000d] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:220 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.PopulateSymbolTableWithName (System.String name, System.Collections.Generic.IEnumerable`1[T] typeArguments, System.Type callingType) [0x00056] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:135 
  at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.PopulateSymbolTableWithPayloadInformation (Microsoft.CSharp.RuntimeBinder.SymbolTable symbolTable, Microsoft.CSharp.RuntimeBinder.ICSharpInvokeOrInvokeMemberBinder callOrInvoke, System.Type callingType, Microsoft.CSharp.RuntimeBinder.ArgumentObject[] arguments) [0x0002b] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs:395 
  at Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.PopulateSymbolTableWithName (Microsoft.CSharp.RuntimeBinder.SymbolTable symbolTable, System.Type callingType, Microsoft.CSharp.RuntimeBinder.ArgumentObject[] arguments) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeMemberBinder.cs:24 
  at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindCore (Microsoft.CSharp.RuntimeBinder.ICSharpBinder payload, System.Linq.Expressions.Expression[] parameters, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject& deferredBinding) [0x0001d] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs:175 
  at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind (System.Dynamic.DynamicMetaObjectBinder payload, System.Linq.Expressions.Expression[] parameters, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject& deferredBinding) [0x00021] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs:134 
  at Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind (System.Dynamic.DynamicMetaObjectBinder action, Microsoft.CSharp.RuntimeBinder.RuntimeBinder binder, System.Dynamic.DynamicMetaObject[] args, System.Collections.Generic.IEnumerable`1[T] arginfos, System.Dynamic.DynamicMetaObject onBindingError) [0x001f5] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderHelper.cs:97 
  at Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.FallbackInvokeMember (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject errorSuggestion) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeMemberBinder.cs:89 
  at System.Dynamic.InvokeMemberBinder.FallbackInvokeMember (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Dynamic/InvokeMemberBinder.cs:77 
  at System.Dynamic.DynamicMetaObject.BindInvokeMember (System.Dynamic.InvokeMemberBinder binder, System.Dynamic.DynamicMetaObject[] args) [0x0000b] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Dynamic/DynamicMetaObject.cs:192 
  at System.Dynamic.InvokeMemberBinder.Bind (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) [0x00016] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Dynamic/InvokeMemberBinder.cs:61 
  at System.Dynamic.DynamicMetaObjectBinder.Bind (System.Object[] args, System.Collections.ObjectModel.ReadOnlyCollection`1[T] parameters, System.Linq.Expressions.LabelTarget returnLabel) [0x000c6] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Dynamic/DynamicMetaObjectBinder.cs:90 
  at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T] (System.Runtime.CompilerServices.CallSite`1[T] site, System.Object[] args) [0x00019] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Runtime/CompilerServices/CallSiteBinder.cs:129 
  at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0) [0x000ea] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Dynamic/UpdateDelegates.Generated.cs:258 
  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<GestureAsync>c__async5.MoveNext () [0x002b4] in <ee5e7c8e1f8b4462983ecc7d2c1f60a6>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:447 
  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<PointGestureAsync>c__async15.MoveNext () [0x000ac] in <ee5e7c8e1f8b4462983ecc7d2c1f60a6>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:447 
  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<TouchAsync>c__async10.MoveNext () [0x00080] in <ee5e7c8e1f8b4462983ecc7d2c1f60a6>:0 
   --- End of inner exception stack trace ---
  at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00013] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:2159 
  at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:3189 
  at System.Threading.Tasks.Task.Wait () [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:3054 
  at Xamarin.UITest.iOS.iOSGestures.TapCoordinates (System.Single x, System.Single y) [0x00023] in <ee5e7c8e1f8b4462983ecc7d2c1f60a6>:0 
  at Xamarin.UITest.iOS.iOSApp+<Tap>c__AnonStoreyA.<>m__0 () [0x000f9] in <ee5e7c8e1f8b4462983ecc7d2c1f60a6>:0 
  at Xamarin.UITest.Utils.ErrorReporting.With (System.Action func, System.Object[] args, System.String memberName) [0x00006] in <ee5e7c8e1f8b4462983ecc7d2c1f60a6>:0 
---> (Inner Exception #0) System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
  at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x00087] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/string.cs:1266 
  at Microsoft.CSharp.RuntimeBinder.Syntax.NameTable.Add (System.String key, System.Int32 length) [0x00048] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameTable.cs:61 
  at Microsoft.CSharp.RuntimeBinder.Syntax.NameManager.Add (System.String key, System.Int32 length) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Syntax/NameManager.cs:166 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.GetName (System.Type type) [0x00007] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:357 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.LoadSymbolsFromType (System.Type originalType) [0x0004e] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:667 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.GetCTypeFromType (System.Type t) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:991 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddMethodToSymbolTable (System.Reflection.MemberInfo member, Microsoft.CSharp.RuntimeBinder.Semantics.AggregateSymbol callingAggregate, Microsoft.CSharp.RuntimeBinder.Semantics.MethodKindEnum kind) [0x001c9] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:1648 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddNamesInInheritanceHierarchy (System.String name, System.Collections.Generic.List`1[T] inheritance) [0x0015d] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:271 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddNamesOnType (Microsoft.CSharp.RuntimeBinder.SymbolTable+NameHashKey key) [0x0000d] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:220 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.PopulateSymbolTableWithName (System.String name, System.Collections.Generic.IEnumerable`1[T] typeArguments, System.Type callingType) [0x00056] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/SymbolTable.cs:135 
  at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.PopulateSymbolTableWithPayloadInformation (Microsoft.CSharp.RuntimeBinder.SymbolTable symbolTable, Microsoft.CSharp.RuntimeBinder.ICSharpInvokeOrInvokeMemberBinder callOrInvoke, System.Type callingType, Microsoft.CSharp.RuntimeBinder.ArgumentObject[] arguments) [0x0002b] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs:395 
  at Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.PopulateSymbolTableWithName (Microsoft.CSharp.RuntimeBinder.SymbolTable symbolTable, System.Type callingType, Microsoft.CSharp.RuntimeBinder.ArgumentObject[] arguments) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeMemberBinder.cs:24 
  at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindCore (Microsoft.CSharp.RuntimeBinder.ICSharpBinder payload, System.Linq.Expressions.Expression[] parameters, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject& deferredBinding) [0x0001d] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs:175 
  at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind (System.Dynamic.DynamicMetaObjectBinder payload, System.Linq.Expressions.Expression[] parameters, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject& deferredBinding) [0x00021] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs:134 
  at Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind (System.Dynamic.DynamicMetaObjectBinder action, Microsoft.CSharp.RuntimeBinder.RuntimeBinder binder, System.Dynamic.DynamicMetaObject[] args, System.Collections.Generic.IEnumerable`1[T] arginfos, System.Dynamic.DynamicMetaObject onBindingError) [0x001f5] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderHelper.cs:97 
  at Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.FallbackInvokeMember (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject errorSuggestion) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeMemberBinder.cs:89 
  at System.Dynamic.InvokeMemberBinder.FallbackInvokeMember (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Dynamic/InvokeMemberBinder.cs:77 
  at System.Dynamic.DynamicMetaObject.BindInvokeMember (System.Dynamic.InvokeMemberBinder binder, System.Dynamic.DynamicMetaObject[] args) [0x0000b] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Dynamic/DynamicMetaObject.cs:192 
  at System.Dynamic.InvokeMemberBinder.Bind (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) [0x00016] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Dynamic/InvokeMemberBinder.cs:61 
  at System.Dynamic.DynamicMetaObjectBinder.Bind (System.Object[] args, System.Collections.ObjectModel.ReadOnlyCollection`1[T] parameters, System.Linq.Expressions.LabelTarget returnLabel) [0x000c6] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Dynamic/DynamicMetaObjectBinder.cs:90 
  at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T] (System.Runtime.CompilerServices.CallSite`1[T] site, System.Object[] args) [0x00019] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Runtime/CompilerServices/CallSiteBinder.cs:129 
  at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0) [0x000ea] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Dynamic/UpdateDelegates.Generated.cs:258 
  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<GestureAsync>c__async5.MoveNext () [0x002b4] in <ee5e7c8e1f8b4462983ecc7d2c1f60a6>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:447 
  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<PointGestureAsync>c__async15.MoveNext () [0x000ac] in <ee5e7c8e1f8b4462983ecc7d2c1f60a6>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:447 
  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<TouchAsync>c__async10.MoveNext () [0x00080] in <ee5e7c8e1f8b4462983ecc7d2c1f60a6>:0 <---
Comment 6 John Miller [MSFT] 2017-09-20 18:04:16 UTC
Hi Sebastian,

I was unable to reproduce that issue with UITest version 2.1.1 and Test Cloud Agent 0.21.1. The tests complete successfully on iOS 10.3. 

Note, this test will fail on iOS 11 because UITableViewWrapperView does not exist. This likely changed in iOS 11. If you can provide additional details on this failing with the same versions I noted above, please open a new bug with that information.
Comment 7 basti 2017-09-21 07:06:54 UTC
It runs fine for me on TestCloud but I could run not the test using iOS Simulator and iPhone 6 (both running iOS 10.3.3)

Updating (switch from beta to current stable) everything in Visual Studio 4 Mac to 7.1.5 and Xamarin.iOS 11.0.0.0 solved the issue.

Perhaps there exists an incompatibility with the testrunner and the runtime version shipped with Visual Studio in beta Channel.

Anyway: Problem solved for me with updating.

Thanks for the note about iOS 11 and the UITableViewWrapperView. But it was just an recorded test from TestRecorder ;)
Comment 8 thomaspublicmail 2017-10-11 15:04:43 UTC
I just upgraded my mac with the latest VS updates (Xamarin.iOS 11.2.0.11) and now I ran into this problem as well. I am using the latest "UITest 2.1.3" and "Test Cloud Agent 0.21.1". I use "NUnit 2.6.4" and "NUnit test adapter 2.0.0". I am using the "iPhone 6s (10.3.1)" simulator.

The call stack looks exactly like the ones reported in this thread:

System.Exception : Error while performing Tap(Marked("Industrial Noise"))
  ----> System.AggregateException : One or more errors occurred.
  ----> System.ArgumentOutOfRangeException : Length cannot be less than zero.
Parameter name: length  

It looks like the tap succeeds (the app navigates correctly) but the exception then occurs. Before the upgrade the tests worked fine.
Comment 9 janssen 2017-10-11 19:17:53 UTC
Exactly the same issue as in previous comment here.
Configuration:
Version 7.2 (build 636)
Runtime:
	Mono 5.4.0.201 (2017-06/71277e78f6e) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504000201

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

=== Apple Developer Tools ===

Xcode 9.0 (13247)
Build 9A235

=== Xamarin.iOS ===

Version: 11.2.0.11 (Visual Studio Community)
Hash: 2f8bbec0
Branch: d15-4-xi
Build date: 2017-10-05 20:56:05-0400

=== Xamarin Inspector ===
Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

=== Xamarin.Mac ===

Version: 3.8.0.49 (Visual Studio Community)

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Comment 10 thomaspublicmail 2017-10-12 08:09:04 UTC
I tried running my tests in the test cloud and here I get an exception that resembles this quite a lot but it occurs even earlier. It seems to me it occurs in a Tap() that is not part of my test but is performed by the testcloud framework when starting up my test:

System.Exception : Error while performing Tap(Marked("Run Everything")) ----> System.Exception : Unable to tap element. Query for Marked("Run Everything") gave no results.

at Xamarin.UITest.Utils.ErrorReporting.With (System.Action func, System.Object[] args, System.String memberName) <0x6d7e210 + 0x0018f> in <filename unknown>:0 

at Xamarin.UITest.iOS.iOSApp.Tap (System.Func`2 query) <0x6d8a398 + 0x00143> in <filename unknown>:0 

at UITest.UnitTests.StartUnitTests () <0x6d8a0f0 + 0x000c0> 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) <0x3212110 + 0x00093> in <filename unknown>:0 

--Exception

at Xamarin.UITest.iOS.iOSApp+<Tap>c__AnonStoreyA.<>m__0 () <0x6d8a4f8 + 0x00317> in <filename unknown>:0 

at Xamarin.UITest.Utils.ErrorReporting.With (System.Action func, System.Object[] args, System.String memberName) <0x6d7e210 + 0x00030> in <filename unknown>:0
Comment 11 Sergiu 2017-10-12 09:31:48 UTC
hello, 

also getting the errors mentioned above for every command I do, tried it with iPhone 7 simulator running both iOS 10.3 and 11, same error, but in the REPL that command works as expected

Xamarin.iOS - Version: 11.2.0.11

Visual Studio Community 2017 for Mac
Version 7.2 (build 636)
Mono 5.4.0.201 (2017-06/71277e78f6e) (64-bit)
GTK+ 2.24.23 (Raleigh theme)

Package version: 504000201
Tapping element matching Marked("moduleicon_test") at coordinates [ 262.5, 637 ].                                                                            Error while performing Tap(Marked("moduleicon_test"))                        Exception: System.AggregateException: One or more errors occurred. ---> System.ArgumentOutOfRangeException: Length cannot be less than zero.                    Parameter name: length                                                            at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x0004a] in <ac812cae460544af83bd6cf54c5eee87>:0                                     at Microsoft.CSharp.RuntimeBinder.Syntax.NameTable.Add (System.String key, System.Int32 length) [0x00048] in <8326c0dc23f348dba5871e78cf0a46d3>:0               at Microsoft.CSharp.RuntimeBinder.Syntax.NameManager.Add (System.String key, System.Int32 length) [0x00010] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.GetName (System.Type type) [0x0002b] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.LoadSymbolsFromType (System.Type originalType) [0x0004e] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.GetCTypeFromType (System.Type t) [0x00000] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddMethodToSymbolTable (System.Reflection.MemberInfo member, Microsoft.CSharp.RuntimeBinder.Semantics.AggregateSymbol callingAggregate, Microsoft.CSharp.RuntimeBinder.Semantics.MethodKindEnum kind) [0x001d1] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddNamesInInheritanceHierarchy (System.String name, System.Collections.Generic.List`1[T] inheritance) [0x0015d] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddNamesOnType (Microsoft.CSharp.RuntimeBinder.SymbolTable+NameHashKey key) [0x0000d] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.PopulateSymbolTableWithName (System.String name, System.Collections.Generic.IEnumerable`1[T] typeArguments, System.Type callingType) [0x00056] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.PopulateSymbolTableWithPayloadInformation (Microsoft.CSharp.RuntimeBinder.SymbolTable symbolTable, Microsoft.CSharp.RuntimeBinder.ICSharpInvokeOrInvokeMemberBinder callOrInvoke, System.Type callingType, Microsoft.CSharp.RuntimeBinder.ArgumentObject[] arguments) [0x00038] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.PopulateSymbolTableWithName (Microsoft.CSharp.RuntimeBinder.SymbolTable symbolTable, System.Type callingType, Microsoft.CSharp.RuntimeBinder.ArgumentObject[] arguments) [0x00000] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindCore (Microsoft.CSharp.RuntimeBinder.ICSharpBinder payload, System.Linq.Expressions.Expression[] parameters, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject& deferredBinding) [0x0001d] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind (System.Dynamic.DynamicMetaObjectBinder payload, System.Linq.Expressions.Expression[] parameters, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject& deferredBinding) [0x00021] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind (System.Dynamic.DynamicMetaObjectBinder action, Microsoft.CSharp.RuntimeBinder.RuntimeBinder binder, System.Dynamic.DynamicMetaObject[] args, System.Collections.Generic.IEnumerable`1[T] arginfos, System.Dynamic.DynamicMetaObject onBindingError) [0x001f5] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.FallbackInvokeMember (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject errorSuggestion) [0x0000e] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at System.Dynamic.InvokeMemberBinder.FallbackInvokeMember (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) [0x00000] in <3fb92ec709f44a579da6a23087df403d>:0 
  at System.Dynamic.DynamicMetaObject.BindInvokeMember (System.Dynamic.InvokeMemberBinder binder, System.Dynamic.DynamicMetaObject[] args) [0x0000b] in <3fb92ec709f44a579da6a23087df403d>:0 
  at System.Dynamic.InvokeMemberBinder.Bind (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) [0x00016] in <3fb92ec709f44a579da6a23087df403d>:0 
  at System.Dynamic.DynamicMetaObjectBinder.Bind (System.Object[] args, System.Collections.ObjectModel.ReadOnlyCollection`1[T] parameters, System.Linq.Expressions.LabelTarget returnLabel) [0x000c6] in <3fb92ec709f44a579da6a23087df403d>:0 
  at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T] (System.Runtime.CompilerServices.CallSite`1[T] site, System.Object[] args) [0x00019] in <3fb92ec709f44a579da6a23087df403d>:0 
  at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0) [0x000f1] in <3fb92ec709f44a579da6a23087df403d>:0 
  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<GestureAsync>c__async5.MoveNext () [0x002b4] in <e3fbae5611374d67b847056913ae6e0a>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<PointGestureAsync>c__async15.MoveNext () [0x000ac] in <e3fbae5611374d67b847056913ae6e0a>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<TouchAsync>c__async10.MoveNext () [0x00080] in <e3fbae5611374d67b847056913ae6e0a>:0 
   --- End of inner exception stack trace ---
  at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Threading.Tasks.Task.Wait () [0x00000] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at Xamarin.UITest.iOS.iOSGestures.TapCoordinates (System.Single x, System.Single y) [0x00023] in <e3fbae5611374d67b847056913ae6e0a>:0 
  at Xamarin.UITest.iOS.iOSApp+<Tap>c__AnonStoreyA.<>m__0 () [0x000f9] in <e3fbae5611374d67b847056913ae6e0a>:0 
  at Xamarin.UITest.Utils.ErrorReporting.With (System.Action func, System.Object[] args, System.String memberName) [0x00006] in <e3fbae5611374d67b847056913ae6e0a>:0 
---> (Inner Exception #0) System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
  at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x0004a] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at Microsoft.CSharp.RuntimeBinder.Syntax.NameTable.Add (System.String key, System.Int32 length) [0x00048] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.Syntax.NameManager.Add (System.String key, System.Int32 length) [0x00010] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.GetName (System.Type type) [0x0002b] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.LoadSymbolsFromType (System.Type originalType) [0x0004e] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.GetCTypeFromType (System.Type t) [0x00000] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddMethodToSymbolTable (System.Reflection.MemberInfo member, Microsoft.CSharp.RuntimeBinder.Semantics.AggregateSymbol callingAggregate, Microsoft.CSharp.RuntimeBinder.Semantics.MethodKindEnum kind) [0x001d1] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddNamesInInheritanceHierarchy (System.String name, System.Collections.Generic.List`1[T] inheritance) [0x0015d] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.AddNamesOnType (Microsoft.CSharp.RuntimeBinder.SymbolTable+NameHashKey key) [0x0000d] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.SymbolTable.PopulateSymbolTableWithName (System.String name, System.Collections.Generic.IEnumerable`1[T] typeArguments, System.Type callingType) [0x00056] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.PopulateSymbolTableWithPayloadInformation (Microsoft.CSharp.RuntimeBinder.SymbolTable symbolTable, Microsoft.CSharp.RuntimeBinder.ICSharpInvokeOrInvokeMemberBinder callOrInvoke, System.Type callingType, Microsoft.CSharp.RuntimeBinder.ArgumentObject[] arguments) [0x00038] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.PopulateSymbolTableWithName (Microsoft.CSharp.RuntimeBinder.SymbolTable symbolTable, System.Type callingType, Microsoft.CSharp.RuntimeBinder.ArgumentObject[] arguments) [0x00000] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindCore (Microsoft.CSharp.RuntimeBinder.ICSharpBinder payload, System.Linq.Expressions.Expression[] parameters, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject& deferredBinding) [0x0001d] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind (System.Dynamic.DynamicMetaObjectBinder payload, System.Linq.Expressions.Expression[] parameters, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject& deferredBinding) [0x00021] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind (System.Dynamic.DynamicMetaObjectBinder action, Microsoft.CSharp.RuntimeBinder.RuntimeBinder binder, System.Dynamic.DynamicMetaObject[] args, System.Collections.Generic.IEnumerable`1[T] arginfos, System.Dynamic.DynamicMetaObject onBindingError) [0x001f5] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.FallbackInvokeMember (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject errorSuggestion) [0x0000e] in <8326c0dc23f348dba5871e78cf0a46d3>:0 
  at System.Dynamic.InvokeMemberBinder.FallbackInvokeMember (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) [0x00000] in <3fb92ec709f44a579da6a23087df403d>:0 
  at System.Dynamic.DynamicMetaObject.BindInvokeMember (System.Dynamic.InvokeMemberBinder binder, System.Dynamic.DynamicMetaObject[] args) [0x0000b] in <3fb92ec709f44a579da6a23087df403d>:0 
  at System.Dynamic.InvokeMemberBinder.Bind (System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) [0x00016] in <3fb92ec709f44a579da6a23087df403d>:0 
  at System.Dynamic.DynamicMetaObjectBinder.Bind (System.Object[] args, System.Collections.ObjectModel.ReadOnlyCollection`1[T] parameters, System.Linq.Expressions.LabelTarget returnLabel) [0x000c6] in <3fb92ec709f44a579da6a23087df403d>:0 
  at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T] (System.Runtime.CompilerServices.CallSite`1[T] site, System.Object[] args) [0x00019] in <3fb92ec709f44a579da6a23087df403d>:0 
  at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0) [0x000f1] in <3fb92ec709f44a579da6a23087df403d>:0 
  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<GestureAsync>c__async5.MoveNext () [0x002b4] in <e3fbae5611374d67b847056913ae6e0a>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<PointGestureAsync>c__async15.MoveNext () [0x000ac] in <e3fbae5611374d67b847056913ae6e0a>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <ac812cae460544af83bd6cf54c5eee87>:0 
  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<TouchAsync>c__async10.MoveNext () [0x00080] in <e3fbae5611374d67b847056913ae6e0a>:0 <---

Exception: Error while performing Tap(Marked("moduleicon_test"))
Comment 12 Peter Simons 2017-10-12 15:51:40 UTC
I too was experiencing this problem and updating to Xamarin.UITest.2.1.3.1660-dev has resolved the issue for me
Comment 13 Brendan Zagaeski (Xamarin Team, assistant) 2017-10-17 22:38:41 UTC
## Note for users watching this bug report

For tallying purposes I will mark this bug as a duplicate of a newer report about the same issue that by chance followed a different investigation path and turned up an issue in Mono Framework MDK 5.4.  That issue is scheduled to be fixed in an upcoming servicing release of Mono Framework MDK 5.4.  If updating to Xamarin.UITest.2.1.3.1660-dev as mentioned in Comment 12 does not fully resolve the issue for any user watching this issue, see Bug 59302, Comment 8 for alternate Mono Framework MDK package versions that can help stop the issue.

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