Original error: 'Command '/home/iuser/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5562 shell settings delete global hidden_api_policy_pre_p_apps' exited with code 20'; Stderr: 'cmd: Can't find service: settings'; Code: '20'

Hello, I’m getting this error randomly from time to time. Can anyone advice on what is this error means exactly and what can be the reason to it. As I said it happens randomly, but often enough to think about. Thanks.

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/home/iuser/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5562 shell settings delete global hidden_api_policy_pre_p_apps' exited with code 20'; Stderr: 'cmd: Can't find service: settings'; Code: '20'

/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py:242: WebDriverException

It might be that your machine where Android emulator is running is too slow, so it does not start all the necessary services in time

2 Likes