I have connected android device wirelessly over tcpip on port 5555. When I run command "adb devices" I get following output
List of devices attached
172.16.202.156:5555 device
Now, I am running the appium test case on the same device using following capabilities
"appPackage": "com.***.",
"uiautomator2ServerInstallTimeout": "500000",
"deviceName": "172.16.202.156:5555",
"appActivity": "********.SplashActivity",
"androidInstallTimeout": "500000",
"nativeInstrumentsLib": "true",
"newCommandTimeout": "500",
"adbExecTimeout": "520000",
"platformVersion": "9",
"automationName": "UiAutomator2",
"browserName": "",
"waitForAppScript": "$.delay(5000);",
"platformName": "Android",
"autoAcceptAlerts": "true"
I am getting error on the adb command in appium server logs.
[debug] [35m[MJSONWP][39m Encountered internal error running command: Error: Error getting device platform version. Original error: Error executing adbExec. Original error: 'Command '/Users/mac1/Library/Android/sdk/platform-tools/adb -P 5037 -s 172.16.202.156:5555 shell getprop ro.build.version.release' exited with code 1'; Stderr: 'error: unknown host service'; Code: '1' [debug] [35m[MJSONWP][39m at ADB.getPlatformVersion (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/lib/tools/adb-commands.js:122:11) [debug] [35m[MJSONWP][39m Destroying socket connection
Here are the full appium server logs.
[info] [35m[Appium][39m Welcome to Appium v1.17.1
[info] [35m[Appium][39m Non-default server args:
[info] [35m[Appium][39m allowInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m denyInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m Appium REST http interface listener started on 0.0.0.0:4723[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/status[39m
[info] [35m[HTTP][39m [90m{}[39m
[debug] [35m[GENERIC][39m Calling AppiumDriver.getStatus() with args: []
[debug] [35m[GENERIC][39m Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/status [39m[32m200[39m [90m9 ms - 68[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/status[39m
[info] [35m[HTTP][39m [90m{}[39m
[debug] [35m[GENERIC][39m Calling AppiumDriver.getStatus() with args: []
[debug] [35m[GENERIC][39m Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/status [39m[32m200[39m [90m2 ms - 68[39m
[info] [35m[HTTP][39m [90m[39m[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
[info] [35m[HTTP][39m [90m{"capabilities":{"desiredCapabilities":{"appPackage":"com.********.******","uiautomator2ServerInstallTimeout":"500000","deviceName":"172.16.202.156:5555","appActivity":"crc646c9a2553fa37f659.SplashActivity","androidInstallTimeout":"500000","nativeInstrumentsLib":"true","newCommandTimeout":"500","adbExecTimeout":"520000","platformVersion":"9","automationName":"UiAutomator2","browserName":"","waitForAppScript":"$.delay(5000);","platformName":"Android","autoAcceptAlerts":"true"},"requiredCapabilities":{}},"desiredCapabilities":{"appPackage":"com.********.******","uiautomator2ServerInstallTimeout":"500000","deviceName":"172.16.202.156:5555","appActivity":"crc646c9a2553fa37f659.SplashActivity","androidInstallTimeout":"500000","nativeInstrumentsLib":"true","newCommandTimeout":"500","adbExecTimeout":"520000","platformVersion":"9","automationName":"UiAutomator2","browserName":"","waitForAppScript":"$.delay(5000);","platformName":"Android","autoAcceptAlerts":"true"},"requiredCapabilities":{}}[39m
[debug] [35m[W3C][39m Calling AppiumDriver.createSession() with args: [{"appPackage":"com.********.******","uiautomator2ServerInstallTimeout":"500000","deviceName":"172.16.202.156:5555","appActivity":"crc646c9a2553fa37f659.SplashActivity","androidInstallTimeout":"500000","nativeInstrumentsLib":"true","newCommandTimeout":"500","adbExecTimeout":"520000","platformVersion":"9","automationName":"UiAutomator2","browserName":"","waitForAppScript":"$.delay(5000);","platformName":"Android","autoAcceptAlerts":"true"},{},{"desiredCapabilities":{"appPackage":"com.********.******","uiautomator2ServerInstallTimeout":"500000","deviceName":"172.16.202.156:5555","appActivity":"crc646c9a2553fa37f659.SplashActivity","androidInstallTimeout":"500000","nativeInstrumentsLib":"true","newCommandTimeout":"500","adbExecTimeout":"520000","platformVersion":"9","automationName":"UiAutomator2","browserName":"","waitForAppScript":"$.delay(5000);","platformName":"Android","autoAcceptAlerts":"true"},"requiredCapabilities":{}}]
[debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1614153815161 (08:03:35 GMT+0000 (Coordinated Universal Time))
[info] [35m[Appium][39m Appium v1.17.1 creating new AndroidUiautomator2Driver (v1.44.2) session
[debug] [35m[BaseDriver][39m Creating session with MJSONWP desired capabilities: {
[debug] [35m[BaseDriver][39m "appPackage": "com.********.******",
[debug] [35m[BaseDriver][39m "uiautomator2ServerInstallTimeout": "500000",
[debug] [35m[BaseDriver][39m "deviceName": "172.16.202.156:5555",
[debug] [35m[BaseDriver][39m "appActivity": "crc646c9a2553fa37f659.SplashActivity",
[debug] [35m[BaseDriver][39m "androidInstallTimeout": "500000",
[debug] [35m[BaseDriver][39m "nativeInstrumentsLib": "true",
[debug] [35m[BaseDriver][39m "newCommandTimeout": "500",
[debug] [35m[BaseDriver][39m "adbExecTimeout": "520000",
[debug] [35m[BaseDriver][39m "platformVersion": "9",
[debug] [35m[BaseDriver][39m "automationName": "UiAutomator2",
[debug] [35m[BaseDriver][39m "browserName": "",
[debug] [35m[BaseDriver][39m "waitForAppScript": "$.delay(5000);",
[debug] [35m[BaseDriver][39m "platformName": "Android",
[debug] [35m[BaseDriver][39m "autoAcceptAlerts": "true"
[debug] [35m[BaseDriver][39m }
[warn] [35m[BaseDriver][39m Capability 'newCommandTimeout' changed from string ('500') to integer (500). This may cause unexpected behavior
[warn] [35m[BaseDriver][39m Capability 'uiautomator2ServerInstallTimeout' changed from string ('500000') to integer (500000). This may cause unexpected behavior
[warn] [35m[BaseDriver][39m Capability 'androidInstallTimeout' changed from string ('500000') to integer (500000). This may cause unexpected behavior
[warn] [35m[BaseDriver][39m Capability 'adbExecTimeout' changed from string ('520000') to integer (520000). This may cause unexpected behavior
[warn] [35m[BaseDriver][39m The following capabilities were provided, but are not recognized by Appium:
[warn] [35m[BaseDriver][39m nativeInstrumentsLib
[warn] [35m[BaseDriver][39m waitForAppScript
[warn] [35m[BaseDriver][39m autoAcceptAlerts
[info] [35m[BaseDriver][39m Session created with session id: 8fea8be0-33b8-4fca-8d01-39121a8731ae
[info] [35m[UiAutomator2][39m Starting 'com.********.******' directly on the device[info] [35m[ADB][39m Found 2 'build-tools' folders under '/Users/mac1/Library/Android/sdk' (newest first):
[info] [35m[ADB][39m /Users/mac1/Library/Android/sdk/build-tools/30.0.0
[info] [35m[ADB][39m /Users/mac1/Library/Android/sdk/build-tools/28.0.3
[info] [35m[ADB][39m Using 'adb' from '/Users/mac1/Library/Android/sdk/platform-tools/adb'
[info] [35m[AndroidDriver][39m Retrieving device list
[debug] [35m[ADB][39m Trying to find a connected android device
[debug] [35m[ADB][39m Getting connected devices...
[debug] [35m[ADB][39m Connected devices: [{"udid":"172.16.202.156:5555","state":"device"}]
[info] [35m[AndroidDriver][39m Looking for a device with Android '9.0.0'
[debug] [35m[ADB][39m Setting device id to 172.16.202.156:5555
[info] [35m[ADB][39m Getting device platform version
[debug] [35m[ADB][39m Running '/Users/mac1/Library/Android/sdk/platform-tools/adb -P 5037 -s 172.16.202.156\:5555 shell getprop ro.build.version.release'
[debug] [35m[UiAutomator2][39m Deleting UiAutomator2 session
[debug] [35m[BaseDriver][39m Event 'newSessionStarted' logged at 1614153815988 (08:03:35 GMT+0000 (Coordinated Universal Time))
[debug] [35m[MJSONWP][39m Encountered internal error running command: Error: Error getting device platform version. Original error: Error executing adbExec. Original error: 'Command '/Users/mac1/Library/Android/sdk/platform-tools/adb -P 5037 -s 172.16.202.156\:5555 shell getprop ro.build.version.release' exited with code 1'; Stderr: 'error: unknown host service'; Code: '1'
[debug] [35m[MJSONWP][39m at ADB.getPlatformVersion (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/lib/tools/adb-commands.js:122:11)
[debug] [35m[MJSONWP][39m Destroying socket connection
[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session [39m[31m500[39m [90m893 ms - 436[39m
[info] [35m[HTTP][39m [90m[39m[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
[info] [35m[HTTP][39m [90m{"desiredCapabilities":{"appPackage":"com.********.******","uiautomator2ServerInstallTimeout":"500000","deviceName":"172.16.202.156:5555","appActivity":"crc646c9a2553fa37f659.SplashActivity","androidInstallTimeout":"500000","nativeInstrumentsLib":"true","newCommandTimeout":"500","adbExecTimeout":"520000","platformVersion":"9","automationName":"UiAutomator2","browserName":"","waitForAppScript":"$.delay(5000);","platformName":"Android","autoAcceptAlerts":"true"},"requiredCapabilities":{}}[39m
[debug] [35m[MJSONWP][39m Calling AppiumDriver.createSession() with args: [{"appPackage":"com.********.******","uiautomator2ServerInstallTimeout":"500000","deviceName":"172.16.202.156:5555","appActivity":"crc646c9a2553fa37f659.SplashActivity","androidInstallTimeout":"500000","nativeInstrumentsLib":"true","newCommandTimeout":"500","adbExecTimeout":"520000","platformVersion":"9","automationName":"UiAutomator2","browserName":"","waitForAppScript":"$.delay(5000);","platformName":"Android","autoAcceptAlerts":"true"},{},null]
[debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1614153816119 (08:03:36 GMT+0000 (Coordinated Universal Time))
[info] [35m[Appium][39m Appium v1.17.1 creating new AndroidUiautomator2Driver (v1.44.2) session
[debug] [35m[BaseDriver][39m Creating session with MJSONWP desired capabilities: {
[debug] [35m[BaseDriver][39m "appPackage": "com.********.******",
[debug] [35m[BaseDriver][39m "uiautomator2ServerInstallTimeout": "500000",
[debug] [35m[BaseDriver][39m "deviceName": "172.16.202.156:5555",
[debug] [35m[BaseDriver][39m "appActivity": "crc646c9a2553fa37f659.SplashActivity",
[debug] [35m[BaseDriver][39m "androidInstallTimeout": "500000",
[debug] [35m[BaseDriver][39m "nativeInstrumentsLib": "true",
[debug] [35m[BaseDriver][39m "newCommandTimeout": "500",
[debug] [35m[BaseDriver][39m "adbExecTimeout": "520000",
[debug] [35m[BaseDriver][39m "platformVersion": "9",
[debug] [35m[BaseDriver][39m "automationName": "UiAutomator2",
[debug] [35m[BaseDriver][39m "browserName": "",
[debug] [35m[BaseDriver][39m "waitForAppScript": "$.delay(5000);",
[debug] [35m[BaseDriver][39m "platformName": "Android",
[debug] [35m[BaseDriver][39m "autoAcceptAlerts": "true"
[debug] [35m[BaseDriver][39m }
[warn] [35m[BaseDriver][39m Capability 'newCommandTimeout' changed from string ('500') to integer (500). This may cause unexpected behavior
[warn] [35m[BaseDriver][39m Capability 'uiautomator2ServerInstallTimeout' changed from string ('500000') to integer (500000). This may cause unexpected behavior
[warn] [35m[BaseDriver][39m Capability 'androidInstallTimeout' changed from string ('500000') to integer (500000). This may cause unexpected behavior
[warn] [35m[BaseDriver][39m Capability 'adbExecTimeout' changed from string ('520000') to integer (520000). This may cause unexpected behavior
[warn] [35m[BaseDriver][39m The following capabilities were provided, but are not recognized by Appium:
[warn] [35m[BaseDriver][39m nativeInstrumentsLib
[warn] [35m[BaseDriver][39m waitForAppScript
[warn] [35m[BaseDriver][39m autoAcceptAlerts
[info] [35m[BaseDriver][39m Session created with session id: e854d697-1ed0-481c-b353-0f31eca49d97
[info] [35m[UiAutomator2][39m Starting 'com.********.******' directly on the device
[info] [35m[ADB][39m Using 'adb' from '/Users/mac1/Library/Android/sdk/platform-tools/adb'
[info] [35m[AndroidDriver][39m Retrieving device list
[debug] [35m[ADB][39m Trying to find a connected android device
[debug] [35m[ADB][39m Getting connected devices...
[debug] [35m[ADB][39m Connected devices: [{"udid":"172.16.202.156:5555","state":"device"}]
[info] [35m[AndroidDriver][39m Looking for a device with Android '9.0.0'
[debug] [35m[ADB][39m Setting device id to 172.16.202.156:5555
[info] [35m[ADB][39m Getting device platform version
[debug] [35m[ADB][39m Running '/Users/mac1/Library/Android/sdk/platform-tools/adb -P 5037 -s 172.16.202.156\:5555 shell getprop ro.build.version.release'
[debug] [35m[UiAutomator2][39m Deleting UiAutomator2 session
[debug] [35m[BaseDriver][39m Event 'newSessionStarted' logged at 1614153816179 (08:03:36 GMT+0000 (Coordinated Universal Time))
[debug] [35m[MJSONWP][39m Encountered internal error running command: Error: Error getting device platform version. Original error: Error executing adbExec. Original error: 'Command '/Users/mac1/Library/Android/sdk/platform-tools/adb -P 5037 -s 172.16.202.156\:5555 shell getprop ro.build.version.release' exited with code 1'; Stderr: 'error: unknown host service'; Code: '1'
[debug] [35m[MJSONWP][39m at ADB.getPlatformVersion (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/lib/tools/adb-commands.js:122:11)
[debug] [35m[MJSONWP][39m Destroying socket connection
[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session [39m[31m500[39m [90m63 ms - 436[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
[info] [35m[HTTP][39m [90m{"capabilities":{"desiredCapabilities":{"appPackage":"com.*******.***","uiautomator2ServerInstallTimeout":"500000","deviceName":"172.16.202.156:5555","appActivity":"crc646c9a2553fa37f659.SplashActivity","androidInstallTimeout":"500000","nativeInstrumentsLib":"true","newCommandTimeout":"500","adbExecTimeout":"520000","platformVersion":"9","automationName":"UiAutomator2","browserName":"","waitForAppScript":"$.delay(5000);","platformName":"Android","autoAcceptAlerts":"true"},"requiredCapabilities":{}}}[39m
[debug] [35m[W3C][39m Calling AppiumDriver.createSession() with args: [null,null,{"desiredCapabilities":{"appPackage":"com.********.******","uiautomator2ServerInstallTimeout":"500000","deviceName":"172.16.202.156:5555","appActivity":"crc646c9a2553fa37f659.SplashActivity","androidInstallTimeout":"500000","nativeInstrumentsLib":"true","newCommandTimeout":"500","adbExecTimeout":"520000","platformVersion":"9","automationName":"UiAutomator2","browserName":"","waitForAppScript":"$.delay(5000);","platformName":"Android","autoAcceptAlerts":"true"},"requiredCapabilities":{}}]
[debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1614153816188 (08:03:36 GMT+0000 (Coordinated Universal Time))
[debug] [35m[BaseDriver][39m Event 'newSessionStarted' logged at 1614153816189 (08:03:36 GMT+0000 (Coordinated Universal Time))
[debug] [35m[W3C][39m Encountered internal error running command: Error: Either JSONWP or W3C capabilities should be provided
[debug] [35m[W3C][39m at parseCapsForInnerDriver (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/utils.js:58:14)
[debug] [35m[W3C][39m at AppiumDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:296:26)
[debug] [35m[W3C][39m at commandExecutor (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/driver.js:330:9)
[debug] [35m[W3C][39m at AppiumDriver.executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/driver.js:344:15)
[debug] [35m[W3C][39m at AppiumDriver.executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:520:26)
[debug] [35m[W3C][39m at asyncHandler (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:309:34)
[debug] [35m[W3C][39m at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:15
[debug] [35m[W3C][39m at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/layer.js:95:5)
[debug] [35m[W3C][39m at next (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/route.js:137:13)
[debug] [35m[W3C][39m at Route.dispatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/route.js:112:3)
[debug] [35m[W3C][39m at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/layer.js:95:5)
[debug] [35m[W3C][39m at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:281:22
[debug] [35m[W3C][39m at Function.process_params (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:335:12)
[debug] [35m[W3C][39m at next (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:275:10)
[debug] [35m[W3C][39m at logger (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/morgan/index.js:144:5)
[debug] [35m[W3C][39m at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/layer.js:95:5)
[debug] [35m[W3C][39m at trim_prefix (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:317:13)
[debug] [35m[W3C][39m at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:284:7
[debug] [35m[W3C][39m at Function.process_params (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:335:12)
[debug] [35m[W3C][39m at next (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:275:10)
[debug] [35m[W3C][39m at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/body-parser/lib/read.js:130:5
[debug] [35m[W3C][39m at invokeCallback (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/raw-body/index.js:224:16)
[debug] [35m[W3C][39m at done (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/raw-body/index.js:213:7)
[debug] [35m[W3C][39m at IncomingMessage.onEnd (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/raw-body/index.js:273:7)
[debug] [35m[W3C][39m at IncomingMessage.emit (events.js:208:15)
[debug] [35m[W3C][39m at endReadableNT (_stream_readable.js:1168:12)
[debug] [35m[W3C][39m at processTicksAndRejections (internal/process/task_queues.js:77:11)
[debug] [35m[W3C][39m Destroying socket connection
[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session [39m[31m500[39m [90m55 ms - 667[39m
[info] [35m[HTTP][39m [90m[39m