Page 1 of 1

Set ConnectTimeout

Posted: Thu Apr 27, 2017 9:19 am
by sboeck
Hello,

we are currently testing ours iOS App and came across the communication timeout exception.
We now would like to increase the timeout as stated in this thread.

Is there any way to do this via code?

Greeting sboeck

Re: Set ConnectTimeout

Posted: Thu Apr 27, 2017 9:29 am
by odklizec
Hi,

Yes, it should be possible to set ConnectTimeout via code. Check this post:
runmobileapp-specifying-the-timeout-t6711.html#p27768

Re: Set ConnectTimeout

Posted: Thu Apr 27, 2017 10:03 am
by sboeck
Thank you very much. Indeed it is possible too set the ConnectTimeout with Ranorex.Plugin.Mobile.RxIntegration.MobilePluginConfig.ConnectTimeout. Unfortunately the connection to our App still times out.

Re: Set ConnectTimeout

Posted: Thu Apr 27, 2017 2:54 pm
by asdf
Hi Sboeck,

I would try to reinstall the latest Ranorex service application on your device. I had the same issue after upgrading my Ranorex studio and not my service app accordingly.

Hope this helps.

Re: Set ConnectTimeout

Posted: Tue May 02, 2017 7:06 am
by sboeck
Hi asdf,

we already tried reinstalling the service app but it didn't help. Unfortunately we still get a timeout while starting our app.

But we found another solution to our problem. Basiclly we just try to reconnect a few more times until it works or we give up. With this solution we can start our application without a exception. Until now it always started the app after the first call of Service.Reconnect().

Here an excerpt of our sourcecode:

Code: Select all

string device = "Our devicename";
for(int i = 0; i < 10; i++){
	try{
		// Start application
		Host.Local.RunMobileApp(device, Repository.Instance.APPTITLE, true);
		break;
	}catch (Exception e){
		// Reconnect device
		RemoteServiceLocator.Service.GetByDisplayName(device).Reconnect();
	}
}

Re: Set ConnectTimeout

Posted: Tue May 02, 2017 7:17 am
by odklizec
Hi,

Are you connecting via USB or WIFI? I guess USB, right? Try connecting via WIFI, which is more stable and and also faster.

Re: Set ConnectTimeout

Posted: Tue May 02, 2017 10:28 am
by sboeck
Hello odklizec,

yes you are right. We connect the devices via USB. Unfortunately WIFI is no option for us.

Re: Set ConnectTimeout

Posted: Thu May 04, 2017 11:56 am
by asdf
Hi sboeck,

Since this I would suggest forwarding your issue directly to Ranorex support([email protected]). Ranorex support can analyze it and eventually provide a solution for your problem.