Failed to update app list. Connection to device lost

Mobile Testing, Android App Testing.
Gurusharan
Posts: 3
Joined: Tue Sep 30, 2014 8:26 am

Failed to update app list. Connection to device lost

Post by Gurusharan » Tue Sep 30, 2014 8:38 am

I have kept a testcase execution for 1000 times but after 30 or 40 times execution its failing and showing a below message

"Failed to update app list. Connection to device lost".

it has been shown at the time when a piece of code is trying to reconnect to particular apk's after rebooting a device.

Device used is Android.

Please help me in same.ASAP

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Failed to update app list. Connection to device lost

Post by Support Team » Thu Oct 02, 2014 4:30 pm

Hi Gurusharan,

May I ask you to answer the questions below?

Which Ranorex and Android version are you using?
Is the device connected via WIFI or USB?
How do you reboot the device and which code do you use to reconnect to the device?

When you often reboot and reconnect to the device it would be needed to increase the number of "Auto reconnect attempts" and the "Connect timeout". You find these options in the Settings window in the Plugins tab.
Does it work after you changed them?

Regards,
Markus
.
Image

Gurusharan
Posts: 3
Joined: Tue Sep 30, 2014 8:26 am

Re: Failed to update app list. Connection to device lost

Post by Gurusharan » Mon Jan 19, 2015 10:39 am

Hi Markus,

Below are details

Ranorex used is 5.1.2
Andriod version is API level 15
Device is connected via USB.

"adb reboot" is the commnad used to reboot the device.

"RefreshRanorexCompatibleApps()" is used to reconnect to the device.

I did the changes in settings as you mentioned but no improvements in the result. I could often see the same error.

Please let me know if there is any other way of reconnecting.

Thanks in advnace.

Regards,
Gurusharan

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Failed to update app list. Connection to device lost

Post by Support Team » Tue Jan 20, 2015 2:55 pm

Hi Gurusharan,

Please tell me in detail when this message is thrown, so what code throws this message "Failed to update app list. Connection to device lost"?
The method "RefreshRanorexCompatibleApps" is not a Ranorex method, so could you please tell me how the method is defined?
Without detailed information about your methods and your code I will unfortunately not be able to analyze the issue since rebooting and reconnecting should in general work.

Additionally, please make sure the timeout after the adb reboot is long enough, when the Ranorex service app is not started when you execute further actions your test will fail.

Regards,
Markus
.
Image