I am trying to install an apk on the Android Studio Emulator, I am seeing some errors when I use the driver.install_app("xxx.apk"), it is complaining about the INSUFFICIENT STORAGE. But when I check the Android emulator, it does has sufficient storage for me to install my application.
I am seeing this error "UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec".
I have been troubleshooting for a while, but would be really appreciate if someone can point me out the error.
caps = {}
caps["appium:deviceName"] = "emulator-5554"
caps["platformName"] = "android"
caps["appium:appPackage"] = "com.app.sample"
caps["appium:appActivity"] = "com.app.activity"
caps["appium:ensureWebviewsHavePages"] = True
caps["appium:nativeWebScreenshot"] = True
caps["appium:newCommandTimeout"] = 3600
caps["appium:connectHardwareKeyboard"] = True
driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", caps)
driver.install_app('/Users/blablacat/PycharmProjects/pythonProject/sample.apk')
File "/Users/blablacat/PycharmProjects/pythonProject/venv/lib/python3.9/site-packages/appium/webdriver/errorhandler.py", line 26, in check_response super().check_response(response) File "/Users/blablacat/PycharmProjects/pythonProject/venv/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/Users/blablacat/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 install -r /Users/blablacat/PycharmProjects/pythonProject/sample.apk' exited with code 1'; Command output: adb: failed to install /Users/blablacat/PycharmProjects/pythonProject/sample.apk: Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE] Stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/Users/blablacat/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 install -r /Users/blablacat/PycharmProjects/pythonProject/sample.apk' exited with code 1'; Command output: adb: failed to install /Users/blablacat/PycharmProjects/pythonProject/sample.apk: Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE] at getResponseForW3CError (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9) at asyncHandler (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:380:37) Process finished with exit code 1