0
votes
Environment
- java client build version : 6.1.0 
- Appium server version : 1.7.1 
- Desktop OS/version used to run Appium if necessary: Windows 7 
- Node.js version : 6.4.1 
- Mobile platform/version under test: Android/ 8.1.0 
- Real device or emulator/simulator: Real device 
- Selenium Version: 3.12.0
- TestNg Version : 6.14.3 

When i was running my appium test for android then unable to launch app on real device getting proxy error in appium log and on console getting error impossible to create new session.

Is there any network setting required if yes please guide what kind of setting need to set..

Code To Reproduce Issue [ Good To Have ] 
public class launchApp {
AndroidDriver<WebElement> driver;

@BeforeClass
public void beforeClass() throws MalformedURLException, InterruptedException {
    DesiredCapabilities capab = new DesiredCapabilities();

    capab.setCapability("deviceName", "Redmi Note 5");
    capab.setCapability("udid", "35924c6f0804");
    capab.setCapability("platformName", "Android");
     capab.setCapability("automationName", "UiAutomator2");
    capab.setCapability("platformVersion", "8.1.0");
    capab.setCapability("appPackage", "com.miui.calculator");
    capab.setCapability("appActivity", "com.miui.calculator.cal.CalculatorActivity");
    driver = new AndroidDriver<WebElement>(new URL("http://0.0.0.0:4723/wd/hub"), capab);

     Thread.sleep(5000);
}

@Test
public void m1() throws InterruptedException {
    System.out.println("kfd");
    Thread.sleep(2000);

}
}

Console Exception:
org.openqa.selenium.WebDriverException: It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'

Appium Server log:

[info] [35m[Appium][39m Welcome to Appium v1.9.1
[info] [35m[Appium][39m Non-default server args:
[info] [35m[Appium][39m   sessionOverride: true
[info] [35m[Appium][39m Appium REST http interface listener started on 0.0.0.0:4723[info] [35m[HTTP][39m [37m-->[39m

[37mPOST[39m [37m/wd/hub/session[39m [info] [35m[HTTP][39m [90m{"desiredCapabilities":{"appActivity":"com.miui.calculator.cal.CalculatorActivity","appPackage":"com.miui.calculator","platformVersion":"8.1.0","automationName":"UiAutomator2","platformName":"Android","deviceName":"35924c6f0804"},"capabilities":{"alwaysMatch":{"appium:appActivity":"com.miui.calculator.cal.CalculatorActivity","appium:appPackage":"com.miui.calculator","appium:automationName":"UiAutomator2","appium:deviceName":"35924c6f0804","platformName":"android","appium:platformVersion":"8.1.0"},"firstMatch":[{}]}}[39m [debug] [35m[W3C][39m Calling AppiumDriver.createSession() with args: [{"appActivity":"com.miui.calculator.cal.CalculatorActivity","appPackage":"com.miui.calculator","platformVersion":"8.1.0","automationName":"UiAutomator2","platformName":"Android","deviceName":"35924c6f0804"},null,{"alwaysMatch":{"appium:appActivity":"com.miui.calculator.cal.CalculatorActivity","appium:appPackage":"com.miui.calculator","appium:automationName":"UiAutomator2","appium:deviceName":"35924c6f0804","platformName":"android","appium:platformVersion":"8.1.0"},"firstMatch":[{}]}] [debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1540389852349 (19:34:12 GMT+0530 (India Standard Time)) [info] [35m[Appium][39m Creating new AndroidUiautomator2Driver (v1.19.0) session [info] [35m[Appium][39m Capabilities: [info] [35m[Appium][39m platformName: android [info] [35m[Appium][39m appActivity: com.miui.calculator.cal.CalculatorActivity [info] [35m[Appium][39m appPackage: com.miui.calculator [info] [35m[Appium][39m automationName: UiAutomator2 [info] [35m[Appium][39m deviceName: 35924c6f0804 [info] [35m[Appium][39m platformVersion: 8.1.0 [debug] [35m[BaseDriver][39m W3C capabilities {"alwaysMatch":{"platformNa... and MJSONWP desired capabilities {"appActivity":"com.miui.ca... were provided [debug] [35m[BaseDriver][39m Creating session with W3C capabilities: {"alwaysMatch":{"platformNa... [info] [35m[BaseDriver][39m Session created with session id: fe068491-4817-474e-bcd5-6580d8909142[info] [35m[AndroidDriver][39m Java version is: 1.8.0_91 [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 1 device(s) connected [info] [35m[AndroidDriver][39m Looking for a device with Android '8.1.0' [debug] [35m[ADB][39m Setting device id to 35924c6f0804 [info] [35m[ADB][39m Getting device platform version [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell getprop ro.build.version.release'[debug] [35m[ADB][39m Current device property 'ro.build.version.release': 8.1.0 [info] [35m[AndroidDriver][39m Using device: 35924c6f0804 [debug] [35m[ADB][39m Setting device id to 35924c6f0804 [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell getprop ro.build.version.sdk' [debug] [35m[ADB][39m Current device property 'ro.build.version.sdk': 27 [debug] [35m[ADB][39m Device API level: 27 [warn] [35m[AndroidDriver][39m No app sent in, not parsing package/activity [info] [35m[ADB][39m Getting device platform version [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell getprop ro.build.version.release'[debug] [35m[ADB][39m Current device property 'ro.build.version.release': 8.1.0 [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell wm size'[debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell wm density'[debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell getprop ro.product.model'[debug] [35m[ADB][39m Current device property 'ro.product.model': Redmi Note 5 [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell getprop ro.product.manufacturer' [debug] [35m[ADB][39m Current device property 'ro.product.manufacturer': Xiaomi [debug] [35m[ADB][39m Device API level: 27 [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell am force-stop io.appium.uiautomator2.server'[debug] [35m[ADB][39m Checking app cert for C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v1.18.0.apk [debug] [35m[ADB][39m Starting 'C:\Users\Office\AppData\Local\Android\Sdk\build-tools\28.0.3\apksigner.bat' with args '["verify","--print-certs","C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v1.18.0.apk"]'[debug] [35m[ADB][39m apksigner stdout: Signer #1 certificate DN: [email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US [debug] [35m[ADB][39m Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc [debug] [35m[ADB][39m Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81 [debug] [35m[ADB][39m Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87 [debug] [35m[ADB][39m WARNING: META-INF/INDEX.LIST not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/. [debug] [35m[ADB][39m WARNING: META-INF/io.netty.versions.properties not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/. [debug] [35m[ADB][39m [debug] [35m[ADB][39m 'C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v1.18.0.apk' is already signed. [debug] [35m[ADB][39m Checking app cert for C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk [debug] [35m[ADB][39m Starting 'C:\Users\Office\AppData\Local\Android\Sdk\build-tools\28.0.3\apksigner.bat' with args '["verify","--print-certs","C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk"]'[debug] [35m[ADB][39m apksigner stdout: Signer #1 certificate DN: [email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US [debug] [35m[ADB][39m Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc [debug] [35m[ADB][39m Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81 [debug] [35m[ADB][39m Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87 [debug] [35m[ADB][39m [debug] [35m[ADB][39m 'C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is already signed. [debug] [35m[ADB][39m Getting install status for io.appium.uiautomator2.server [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell pm list packages io.appium.uiautomator2.server'[debug] [35m[ADB][39m App is installed [debug] [35m[ADB][39m Getting package info for 'io.appium.uiautomator2.server' [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell dumpsys package io.appium.uiautomator2.server'[debug] [35m[ADB][39m The installed 'io.appium.uiautomator2.server' package does not require upgrade ('1.18.0' >= '1.18.0') [debug] [35m[ADB][39m Getting install status for io.appium.uiautomator2.server.test [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell pm list packages io.appium.uiautomator2.server.test'[debug] [35m[ADB][39m App is installed [debug] [35m[ADB][39m Getting package info for 'io.appium.uiautomator2.server.test' [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell dumpsys package io.appium.uiautomator2.server.test'[warn] [35m[ADB][39m Cannot read version codes of 'C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' and/or 'io.appium.uiautomator2.server.test' [warn] [35m[ADB][39m Cannot read version names of 'C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' and/or 'io.appium.uiautomator2.server.test'. Assuming correct app version is already installed [debug] [35m[UiAutomator2][39m Waiting up to 20000ms for instrumentation 'io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner' to be available [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell pm list instrumentation'[debug] [35m[UiAutomator2][39m Instrumentation 'io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner' available [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 wait-for-device' [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell echo ping' [debug] [35m[AndroidDriver][39m Pushing settings apk to device... [debug] [35m[ADB][39m Getting install status for io.appium.settings [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell pm list packages io.appium.settings'[debug] [35m[ADB][39m App is not installed [debug] [35m[ADB][39m App 'C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\app\build\outputs\apk\settings_apk-debug.apk' not installed. Installing [debug] [35m[ADB][39m Device API level: 27 [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 install -g C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\app\build\outputs\apk\settings_apk-debug.apk'[debug] [35m[ADB][39m Install command stdout: Success [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell ps'[debug] [35m[ADB][39m Device API level: 27 [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'[debug] [35m[ADB][39m Device API level: 27 [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell appops set io.appium.settings android:mock_location allow' [warn] [35m[AndroidDriver][39m setDeviceLanguageCountry requires language or country. [warn] [35m[AndroidDriver][39m Got language: 'undefined' and country: 'undefined' [debug] [35m[Logcat][39m Starting logcat capture[debug] [35m[AndroidDriver][39m Pushing unlock helper app to device... [debug] [35m[ADB][39m Getting install status for io.appium.unlock [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell pm list packages io.appium.unlock'[debug] [35m[ADB][39m App is not installed [debug] [35m[ADB][39m App 'C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk' not installed. Installing [debug] [35m[ADB][39m Device API level: 27 [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 install -g C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk'[debug] [35m[ADB][39m Install command stdout: Success [debug] [35m[UiAutomator2][39m Forwarding UiAutomator2 Server port 6790 to 8200 [debug] [35m[ADB][39m Forwarding system: 8200 to device: 6790 [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 forward tcp:8200 tcp:6790' [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell rm -rf /data/local/tmp/strings.json'[debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell pm path com.miui.calculator'[debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 pull /system/app/Calculator/Calculator.apk C:\Users\Office\AppData\Local\Temp\com.miui.calculator.apk'[debug] [35m[ADB][39m Pulled app for package 'com.miui.calculator' to 'C:\Users\Office\AppData\Local\Temp\com.miui.calculator.apk' [debug] [35m[AndroidDriver][39m Extracting strings from apk [debug] [35m[AndroidDriver][39m C:\Users\Office\AppData\Local\Temp\com.miui.calculator.apk [debug] [35m[AndroidDriver][39m undefined [debug] [35m[AndroidDriver][39m C:\Users\Office\AppData\Local\Temp\com.miui.calculator [debug] [35m[ADB][39m Extracting strings for language: default[info] [35m[ADB][39m Successfully extracted 645 strings from 'C:\Users\Office\AppData\Local\Temp\com.miui.calculator.apk' resources for '(default)' configuration[debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 push C:\Users\Office\AppData\Local\Temp\com.miui.calculator\strings.json /data/local/tmp'[debug] [35m[UiAutomator2][39m No app capability. Assuming it is already on the device [debug] [35m[ADB][39m Getting install status for com.miui.calculator [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell pm list packages com.miui.calculator'[debug] [35m[ADB][39m App is installed [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell am force-stop com.miui.calculator'[debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell pm clear com.miui.calculator'[debug] [35m[AndroidDriver][39m Performed fast reset on the installed 'com.miui.calculator' application (stop and clear) [debug] [35m[ADB][39m Checking app cert for undefined[debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell am force-stop io.appium.uiautomator2.server' [info] [35m[UiAutomator2][39m Starting uiautomator2 server 1.18.0 [info] [35m[UiAutomator2][39m Using UIAutomator2 server from 'C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v1.18.0.apk' and test from 'C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' [info] [35m[UiAutomator2][39m Running command: 'adb -s 35924c6f0804 shell am instrument -w io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner' [info] [35m[UiAutomator2][39m Waiting up to 20000ms for UiAutomator2 to be online... [debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [error] [35m[UiAutomator2][39m [UIAutomator2 Error] getaddrinfo ENOENT localhost localhost:5037 [debug] [35m[UiAutomator2][39m Full error: Error: getaddrinfo ENOENT localhost localhost:5037 [debug] [35m[UiAutomator2][39m at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:50:26)[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Matched '/status' to command name 'getStatus' [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body [debug] [35m[UiAutomator2][39m Deleting UiAutomator2 session [debug] [35m[UiAutomator2][39m Deleting UiAutomator2 server session [debug] [35m[JSONWP Proxy][39m Matched '/' to command name 'deleteSession' [warn] [35m[UiAutomator2][39m Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Trying to proxy a session command without session id [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 shell am force-stop com.miui.calculator'[debug] [35m[Logcat][39m Stopping logcat capture [debug] [35m[ADB][39m Removing forwarded port socket connection: 8200 [debug] [35m[ADB][39m Running 'C:\Users\Office\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 35924c6f0804 forward --remove tcp:8200' [debug] [35m[BaseDriver][39m Event 'newSessionStarted' logged at 1540389906576 (19:35:06 GMT+0530 (India Standard Time)) [debug] [35m[W3C][39m Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: getaddrinfo ENOENT localhost localhost:8200 [debug] [35m[W3C][39m at JWProxy.command$ (C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:238:13) [debug] [35m[W3C][39m at tryCatch (C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40) [debug] [35m[W3C][39m at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22) [debug] [35m[W3C][39m at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21) [debug] [35m[W3C][39m at GeneratorFunctionPrototype.invoke (C:\Users\Office\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37) [debug] [35m[W3C][39m at run (C:\Users\Office\AppData\Local\Programs\Appium\resources\app\webpack:\~\babel-polyfill\~\core-js\modules\es6.promise.js:75:1) [debug] [35m[W3C][39m at C:\Users\Office\AppData\Local\Programs\Appium\resources\app\webpack:\~\babel-polyfill\~\core-js\modules\es6.promise.js:92:1 [debug] [35m[W3C][39m at flush (C:\Users\Office\AppData\Local\Programs\Appium\resources\app\webpack:\~\babel-polyfill\~\core-js\modules_microtask.js:18:1) [debug] [35m[W3C][39m at process._tickCallback (internal/process/next_tick.js:61:11) [info] [35m[HTTP][39m [37m<-- POST /wd/hub/session [39m[31m500[39m [90m54260 ms - 1973[39m [info] [35m[HTTP][39m [90m[39m

Plz guide

1

1 Answers

0
votes
  1. Make sure you are using latest Appium server 1.9.1.

  2. Latest Android SDK and ADB is installed.

  3. Uninstall your app, Appium setting and unlock apps from your device.

  4. USB debugging is enabled on the device.

Edit:

I also encountered this error today.

After analyzing I found out that my connected device was somehow got offline.

I checked with the following command:

$ adb devices

and this was the result for offline device:

List of devices attached
392edea50404    offline

Solution:

The solution was just I unplugged the device from the computer and reconnected it.

Try this approach and let me know.