If I use the androiddriver.removeApp(<package name>);
, I am getting the following error
[debug] [W3C (08e37f07)] Encountered internal error running command: Error: Unable to uninstall APK. Original error: Error executing adbExec. Original error: 'Command '/Users/<user>/Library/Android/sdk/platform-tools/adb -P 5037 -s R9WR7102GEF uninstall com.test.support_mobile.staging' timed out after 40000ms'. Try to increase the 40000ms adb execution timeout represented by 'adbExecTimeout' capability [debug] [W3C (08e37f07)] at ADB.uninstallApk (/usr/local/lib/node_modules/appium/node_modules/appium-adb/lib/tools/apk-utils.js:382:11) [debug] [W3C (08e37f07)] at AndroidUiautomator2Driver.removeApp (/usr/local/lib/node_modules/appium/node_modules/appium-android-driver/lib/commands/app-management.js:91:10)
I increased the timeout. But it still timed out.
Found out that the adb uninstall ...
command being passed requires the --user 0
flag to be passed for successfully uninstalling the APK. How do I pass that flag?
Any guidance very much appreciated thank you.