Android OS automation & shell command unresponsive.

Mobile Testing, Android App Testing.
SanMan
Posts: 204
Joined: Tue Apr 13, 2010 9:59 am

Android OS automation & shell command unresponsive.

Post by SanMan » Tue Mar 19, 2019 2:35 pm

One or more errors occurred.
Automation error: shell command unresponsive.


Sometimes test run is interrupted with this message but sometimes it does not appear (running the same module)

Is there something that can be done to fix it?

McTurtle
Posts: 255
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: Android OS automation & shell command unresponsive.

Post by McTurtle » Fri Mar 22, 2019 4:07 pm

Hello SanMan,

Sounds like a performance issue.
Have you already tried to disable "Screenshots on AndroidOS" and "Android OS automation" and also turn up the time-outs in the Mobile Plug-in settings?

Regards,
McTurtle

SanMan
Posts: 204
Joined: Tue Apr 13, 2010 9:59 am

Re: Android OS automation & shell command unresponsive.

Post by SanMan » Fri Apr 05, 2019 6:36 am

Hi McTurtle,

yes, I have tried these but still sometimes this "Automation error: shell command unresponsive. " occurs.

E.g. if I run same case 20 iterations, once the run can be stopped because this.

This is specially bad because I have a test set where the endpoint is changed time-to-time and the testrun will be stopped because of this.

Could I code some error handling for this (try - catch) so the endpoint would be changed back to Localhost if this occures?

EDIT:

Seems that it helped when changed mobile phone. For now I have not got any "Automation error: shell command unresponsive." errors :)

SanMan
Posts: 204
Joined: Tue Apr 13, 2010 9:59 am

Re: Android OS automation & shell command unresponsive.

Post by SanMan » Thu Apr 11, 2019 7:55 am

Now when run tests more times, this issue has been coming back.

- "Android OS automation" : This I cannot disable as I am testing crosswalk application

Is there any other settings in phone or Ranorex that could help to get this work more staple?

Any help would be appreciated

McTurtle
Posts: 255
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: Android OS automation & shell command unresponsive.

Post by McTurtle » Thu Apr 11, 2019 12:33 pm

Hi SanMan,

I think it would be important to know exactly when the error appears. Is it during automation of your app or is it after switching to an Android system app? I have not seen this error before, so excuse me for asking, where does it even come up? :) Is it in the cmd or somewhere else?

Can you post some screenshots and possibly the code where it is normally triggered?

Regards,
McTurtle

SanMan
Posts: 204
Joined: Tue Apr 13, 2010 9:59 am

Re: Android OS automation & shell command unresponsive.

Post by SanMan » Fri Apr 12, 2019 7:49 am

Hi,

I have a testsuite where basically is tested a chrome webpage and time to time endpoint is changed to Android OS test.(and back to localhost)

Android app is done with crosswalk techology so I need to to use Android OS (and cannot "instrument" the app)

And randomly now when test should touch() some Android element, it give me this error when doing this:

//nokia 3.1
Host.MakeCurrentHost("USB-ES2BA80726000615");

repo.AndroidOS.BottomBar.S_tab_button.Touch();
Delay.Milliseconds(500);


Failed to find item 'Androidi.AndroidOS.BottomBar.Alarms'. Please check that your whitelist allows Ranorex to access the process.
No element found for path '/mobileapp[@title='Android OS']//container[@rid='R.id.action_bar_root']/container[@rid='R.id.content']/androidelement/container[@rid='R.id.xwalkWebView']//container[@accessibilitylabel='this']/form[3]/form[@rid='R.id.this-alarms']' within 1.8m.
Show/Hide Stacktrace

EDIT:

Now got this error (same problem I think?):

One or more errors occurred.
Automation error: shell command unresponsive.
Show/Hide Stacktrace
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)at System.Threading.Tasks.Task.Wait()at Ranorex.Plugin.Mobile.Tools.Android.Monkey.MonkeyDevice.ExecuteAutomationAction(Action a)at Ranorex.Plugin.Mobile.Tools.Android.Monkey.MonkeyDevice.Touch(Int32 x, Int32 y)at Ranorex.Plugin.Mobile.Device.Channels.MonkeyAppChannel.Touch(IElementWithId element, TouchEvent evt)at Ranorex.Plugin.Mobile.RxIntegration.Elements.MobileFlavorElement.Touch(TouchEvent evt)at Ranorex.Plugin.Mobile.RxIntegration.Elements.MonkeyFlavorElement.Touch(TouchEvent evt)at Ranorex.Touch.Tap(Element element, Int32 pointer, Location location, Duration touchDuration)at Ranorex.Adapter.Touch(Int32 pointer, Location location, Duration touchDuration, Boolean showOutOfBoundsWarning)at Ranorex.Adapter.Touch()at Company.TestCases.Guard.G_DataNewSa.Ranorex.Core.Testing.ITestModule.Run() in c:\...\G_DataNewSa.cs:line 204at Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext, Int32 iteration, Int32 iterationCount, Boolean skipIteration)

And because endpoint is changed to Android OS and this error occures, test's cannot continue with Localhost endpoint.