You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the most recent available driver/plugin and server versions
Is the component officially supported by the Appium team?
I have verified the component repository is present under the Appium organization in GitHub
Is there an existing issue for this?
I have searched the existing issues
Current Behavior
When I attempt to start an appium session on a real android device, I get the following error: ERROR webdriver: Request failed with status 500 due to unknown error: An unknown server-side error occurred while processing the command. Original error: Error getting device API level. Original error: Error executing adbExec. Original error: 'Command '/Users/mainUser/Library/Android/sdk/platform-tools/adb -P 5037 -s shell getprop ro.build.version.sdk' exited with code 1'; Command output: error: device '' not found
The "appium:udid" capability is set to the value displayed when running adb devices and even if I omit this value, I still get the same error.
As can be seen, Appium is attempting run the command adb -s <UDID> shell, but the <UDID> is getting dropped.
In the logs there is even a line that shows an empty udid (Setting device id to ): [ADB] Running '/Users/mainUser/Library/Android/sdk/platform-tools/adb -P 5037 start-server' [ADB] Setting device id to [ADB] Running '/Users/mainUser/Library/Android/sdk/platform-tools/adb -P 5037 -s shell getprop ro.build.version.sdk'
This error occurs when running appium via code and in the appium inspector.
These are the session capabilities that are being used:
{
"platformName": "Android",
"appium:automationName": "UiAutomator2",
"appium:udid": "AAA985SOP2"
}
Please note that I can successfully run an appium session on a real iOS device using the same machine with the same appium installation, simply with different appium capabilities. This issue is only occurring on Android
Expected Behavior
Appium should perform the command /Users/mainUser/Library/Android/sdk/platform-tools/adb -P 5037 -s AAA985SOP2 shell getprop ro.build.version.sdk
Appium server version (output of appium --version): 2.4.1
Appium driver(s) and their version(s): xcuitest@5.14.0, uiautomator2@2.43.0
Appium plugin(s) and their version(s): N/A
Node.js version (output of node --version): v20.10.0
npm version (output of npm --version): 10.2.3
Last component(s) version which did not exhibit the problem: Same environment, just using real ios device and the corresponding udid for the ios device
Platform and version under test: Android, version 12
Do I have the most recent component updates?
Is the component officially supported by the Appium team?
Is there an existing issue for this?
Current Behavior
When I attempt to start an appium session on a real android device, I get the following error:
ERROR webdriver: Request failed with status 500 due to unknown error: An unknown server-side error occurred while processing the command. Original error: Error getting device API level. Original error: Error executing adbExec. Original error: 'Command '/Users/mainUser/Library/Android/sdk/platform-tools/adb -P 5037 -s shell getprop ro.build.version.sdk' exited with code 1'; Command output: error: device '' not found
The "appium:udid" capability is set to the value displayed when running
adb devices
and even if I omit this value, I still get the same error.As can be seen, Appium is attempting run the command
adb -s <UDID> shell
, but the<UDID>
is getting dropped.In the logs there is even a line that shows an empty udid (
Setting device id to
):[ADB] Running '/Users/mainUser/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[ADB] Setting device id to
[ADB] Running '/Users/mainUser/Library/Android/sdk/platform-tools/adb -P 5037 -s shell getprop ro.build.version.sdk'
This error occurs when running appium via code and in the appium inspector.
These are the session capabilities that are being used:
{
"platformName": "Android",
"appium:automationName": "UiAutomator2",
"appium:udid": "AAA985SOP2"
}
Please note that I can successfully run an appium session on a real iOS device using the same machine with the same appium installation, simply with different appium capabilities. This issue is only occurring on Android
Expected Behavior
Users/mainUser/Library/Android/sdk/platform-tools/adb -P 5037 -s AAA985SOP2 shell getprop ro.build.version.sdk
Minimal Reproducible Example
const {remote} = require('webdriverio');
const capabilities = {
platformName: 'Android',
'appium:automationName': 'UiAutomator2',
'appium:udid': 'AAA985SOP2'
};
const wdOpts = {
hostname: process.env.APPIUM_HOST || 'localhost',
port: parseInt(process.env.APPIUM_PORT, 10) || 4723,
logLevel: 'info',
capabilities,
};
async function runTest() {
const driver = await remote(wdOpts);
try {
const batteryItem = await driver.$('//*[@text="Battery"]');
await batteryItem.click();
} finally {
await driver.pause(1000);
await driver.deleteSession();
}
}
runTest().catch(console.error);
Environment
appium --version
): 2.4.1node --version
): v20.10.0npm
version (output ofnpm --version
): 10.2.3Link to Appium Logs
https://gist.github.com/tmlop/8e5b1e43e4aaca899af094d77c6782f2
Further Information
No response
The text was updated successfully, but these errors were encountered: