diff --git a/lib/uiautomator2.js b/lib/uiautomator2.js index 0cc3b22f2..263b409cc 100644 --- a/lib/uiautomator2.js +++ b/lib/uiautomator2.js @@ -413,7 +413,10 @@ class UiAutomator2Server { } try { - await this.adb.forceStop(SERVER_TEST_PACKAGE_ID); + await B.all([ + this.adb.forceStop(SERVER_PACKAGE_ID), + this.adb.forceStop(SERVER_TEST_PACKAGE_ID) + ]); } catch (ignore) {} if (strictCleanup) { // https://github.com/appium/appium/issues/10749