App was not copied, so not deleting

Appium 1.6.3

When I run multiple tests in a row on android emulator I occasionally get the error

“An unknown server-side error occurred while processing the command. Original error: Error occured while starting App.”

Appium [debug] displays App was not copied, so not deleting, before the error above.

I do have other device hooked up to the machine, and received the below error.
Error: Not cleaning generated files. Add clearSystemFiles capability if wanted.

Which was fixed with
capabilities.setCapability(“clearSystemFiles”,true);

Any ideas?

[ADB] App was uninstalled
[debug] [AndroidBootstrap] Sending command to android: {“cmd”:“shutdown”}
[debug] [AndroidBootstrap] Received command result from bootstrap
[debug] [UiAutomator] Shutting down UiAutomator
[debug] [UiAutomator] Moving to state ‘stopping’
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“shutdown”}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:“OK, shutting down”}
[debug] [UiAutomator] UiAutomator shut down normally
[debug] [UiAutomator] Moving to state ‘stopped’
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Getting connected devices…
[debug] [ADB] 3 device(s) connected
[debug] [ADB] Running ‘/Users/mpsadmin/Library/Android/sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“ps”]
[ADB] No uiautomator process found to kill, continuing…
[debug] [UiAutomator] Moving to state ‘stopped’
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Getting connected devices…
[debug] [ADB] 3 device(s) connected
[debug] [ADB] Running ‘/Users/mpsadmin/Library/Android/sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“am”,“force-stop”,“io.appium.unlock”]
[debug] [AndroidDriver] App was not copied, so not deleting
[HTTP] <-- POST /wd/hub/session 500 63572 ms - 365

1 Like

@dduphorn try with latest appium version and in case still issue exists, file under appium project in github

1 Like

@VikramVI I was able to get around the issue by killing the simulator between test runs.

Using:
try{Runtime.getRuntime().exec(“killall qemu-system-x86_64”);}catch(Exception e){}
try {Thread.sleep(3000);}catch (Exception e) {}

When you get the latest version do you just run: npm install -g appium --no-shrinkwrap

Thanks

DD

1 Like

@dduphorn

npm uninstall -g appium
npm install -g appium --no-shrinkwrap 

Killing simulator and launching again increases overall execution time.

You try with latest build and file bug in case it still happens.

1 Like

@VikramVI

Yes, Killing the simulator does increase the overall execution time.

I’ll Update, command out the Simulator Kill and and re-run the test cases, and update you on my results.

DD

1 Like

I was able to reproduce this issue with the latest appium code. How do I file under appium project in GitHub?

1 Like

@dduphorn https://github.com/appium/appium/issues

1 Like