Bug 60930 - Xamarin.UITest backdoor calling IApp.Invoke method with parameter throws Exception
Summary: Xamarin.UITest backdoor calling IApp.Invoke method with parameter throws Exce...
Status: NEW
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Test Cloud ()
Version: 4.7.0 (15.4)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-11-30 15:53 UTC by Emmanuel.Guenther
Modified: 2017-11-30 15:53 UTC (History)
3 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 for Bug 60930 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:
Status:
NEW

Description Emmanuel.Guenther 2017-11-30 15:53:58 UTC
As soon as the IApp.Invoke method is called with a parameter, the following exception is thrown:

System.Exception : Error while performing Invoke("SetMainPage", "LoginView")   ----> System.Net.Http.HttpRequestException : Fehler beim Senden der Anforderung.   ----> System.Net.WebException : Die zugrunde liegende Verbindung wurde geschlossen: Die Verbindung wurde unerwartet getrennt..    bei Xamarin.UITest.Utils.ErrorReporting.With[T](Func`1 func, Object[] args, String memberName)    bei Xamarin.UITest.Android.AndroidApp.Invoke(String methodName, Object argument)    bei UITest.OnboardingTest.WelcomeScreenShowsUp() in D:\Projekte\Sonstige\UEBE\UEBE_CycloTestApp\code\V2\UITest\OnboardingTest.cs:Zeile 79. --HttpRequestException    bei Xamarin.UITest.Shared.Http.HttpClient.SendData(String endpoint, String method, HttpContent content, ExceptionPolicy exceptionPolicy, Nullable`1 timeOut)    bei Xamarin.UITest.Shared.Http.HttpClient.Post(String endpoint, String arguments, ExceptionPolicy exceptionPolicy, Nullable`1 timeOut)    bei Xamarin.UITest.Android.AndroidGestures.Invoke(String methodName, Object[] arguments)    bei Xamarin.UITest.Utils.ErrorReporting.With[T](Func`1 func, Object[] args, String memberName) --WebException    bei System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)    bei System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)

UITest code to invoke backdoor:
this.app.Invoke("SetMainPage", "LoginView");

Corresponding method in my Android MainActivity:
[Export("SetMainPage")]
public void SetMainPage(string arg){..}

Without parameter, everything is working fine.

I'm using the latest version of Xamarin.UITest and the Internet permission is set for the Android project.