-
-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADB permission issue in startup #795
Comments
Please provide the full server log. I guess the issue might be related to the fact the server package has been installed from another user account. Try to reset the driver install as a possible workaround |
Tried resetting it: C:\Users\Olli.appium\node_modules\appium-uiautomator2-driver\node_modules\teen_process\lib\exec.js:128 |
Here is the log from appium server: [AppiumDriver@9df7] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","appium:automationName":"UIAutomator2","appium:platformVersion":"14","appium:skipServerInstallation":false,"appium:ensureWebviewsHavePages":true,"appium:nativeWebScreenshot":true,"appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true},null,{"alwaysMatch":{"platformName":"Android","appium:automationName":"UIAutomator2","appium:platformVersion":"14","appium:skipServerInstallation":false,"appium:ensureWebviewsHavePages":true,"appium:nativeWebScreenshot":true,"appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true},"firstMatch":[{}]}] Error: Command 'C:\Users\Olli\AppData\Local\Android\sdk\platform-tools\adb.exe -P 5037 -s RFCWA1JHGYL shell cmd package list packages' exited with code 255 |
it looks like the reset script uses the same logic that the driver itself. adb uninstall io.appium.uiautomator2.server
adb uninstall io.appium.uiautomator2.server.test
adb uninstall io.appium.settings |
Removing those components and then trying again had no effect and the logs: Exception occurred while executing 'list': Error: Command 'C:\Users\Olli\AppData\Local\Android\sdk\platform-tools\adb.exe -P 5037 -s RFCWA1JHGYL shell cmd package list packages' exited with code 255 |
Checked google for similar issues and it looks like the issue has to do with profiles that are installed/activated on the device. You may try to switch the profile to the default one (user 0) or use a different device that does not have such restrictions to run automated tests. |
Yes i have a work profile set, i tried to use the uiautomator2 capability appium:userProfile and set it to 0 but no effect |
Interesting met similar with update appium server and uiautomator on half phones. Removing Meraki Work profile helps. But still wonder why it worked before about 3 month old appium and uiAutomator driver.... |
I got the same issue with both versions 3.0.5 to 3.5.5. Do we have any way to pass the |
Seems similar to #810 . Please try to test with the driver version 3.7.6 that was just released which resolved this issue by appending Thanks to PR from @mykola-mokhnach |
It works now. Thank you! |
Hi,
i have been trying to get my appium to work after updating appium-uiautomator2-driver from 3.0.5 to 3.5.5 but once i try to open any session i get error:
"... shell cmd package list packages' exited with code 255'; Command output: Exception occurred while executing 'list': java.lang.SecurityException: Shell does not have permission to access user 10 ..."
The error comes comes after:
"[ADB] The installed 'io.appium.uiautomator2.server' package is older than '.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v7.0.13.apk' (167 < 175 or '7.0.5' < '7.0.13')'"
The phone used is Samsung Galaxy S23
And here are the capabilities i tried to use in appium inspector:
{
"platformName": "Android",
"appium:automationName": "UIAutomator2",
"appium:platformVersion": "14",
}
Managed to get this working by setting a appium:skipServerInstallation to True but is there any other solution to this?
The text was updated successfully, but these errors were encountered: