appium / appium

Cross-platform automation framework for all kinds of apps, built on top of the W3C WebDriver protocol
http://appium.io/
Apache License 2.0
18.95k stars 6.07k forks source link

An unknown server-side error occurred while processing the command. (Original error: connect ECONNREFUSED) #6726

Closed DixantDubey closed 7 years ago

DixantDubey commented 8 years ago

Hi guys , everything was working good for me and suddenly , after upgrading my Xcode and OS and i start getting error on click() event , this is the logs. and also i checked below code with another system it's working fine.

@BeforeMethod public void setUp() throws MalformedURLException { DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability("platformName", "iOS"); caps.setCapability("platformVersion", "9.3.1"); //Replace this with your iOS version caps.setCapability("deviceName", "iPhone (2)"); //Replace this with your simulator/device version caps.setCapability("app", "/Users/Qualitest/Downloads/tolino__160727.ipa"); //Replace this with app path in your system driver = new IOSDriver(new URL("http://0.0.0.0:4723/wd/hub"), caps); }

@Test public void testiOS() throws InterruptedException { driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIATableView[1]/UIATableCell[2]/UIAStaticText[2]")); System.out.println("-----1----"+driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIATableView[1]/UIATableCell[2]/UIAStaticText[2]")).getText()); Assert.assertTrue(driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIATableView[1]/UIATableCell[2]/UIAStaticText[2]")).isDisplayed(), "element is not displayed"); System.out.println("-----2----"); driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIATableView[1]/UIATableCell[2]/UIAStaticText[2]")).click(); System.out.println("-----3----"); }

Console output - -----1----Start without the code -----2---- FAILED: testiOS org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (Original error: connect ECONNREFUSED) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 1.14 seconds Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' System info: host: 'QualiTests-Mac-mini.local', ip: '10.50.2.185', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_25' Driver info: io.appium.java_client.ios.IOSDriver Capabilities [{app=/Users/Qualitest/Downloads/tolino160727.ipa, networkConnectionEnabled=false, warnings={}, databaseEnabled=false, deviceName=iPhone (2), platform=MAC, desired={app=/Users/Qualitest/Downloads/tolino160727.ipa, platformVersion=9.3.1, platformName=iOS, deviceName=iPhone (2)}, platformVersion=9.3.1, webStorageEnabled=false, locationContextEnabled=false, browserName=iOS, takesScreenshot=true, javascriptEnabled=true, platformName=iOS}] Session ID: 6516d445-aa91-4f42-a3f6-dfcc5debb7f7

DixantDubey commented 8 years ago

I am getting below error in appium : info: [debug] Socket data received (83 bytes)

info: [debug] Socket data being routed. info: [debug] Got result from instruments: {"status":0,"value":{"origin":{"x":16,"y":562},"size":{"width":164,"height":20}}}

info: [debug] Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command. (Original error: connect ECONNREFUSED)","code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect","origValue":"connect ECONNREFUSED"},"sessionId":"6516d445-aa91-4f42-a3f6-dfcc5debb7f7"} info: <-- POST /wd/hub/session/6516d445-aa91-4f42-a3f6-dfcc5debb7f7/element/3/click 500 1134.587 ms - 293

info: [IOS_SYSLOG_ROW ] Aug 11 12:20:00 Quali-Tests-iPad securityd[82] : SecOCSPSingleResponseCalculateValidity OCSPSingleResponse: nextUpdate 15.38 days ago

info: [IOS_SYSLOG_ROW ] Aug 11 12:20:00 Quali-Tests-iPad securityd[82] : SecOCSPSingleResponseCalculateValidity OCSPSingleResponse: nextUpdate 15.61 days ago

Appium version - 1.4.3 xcode - 7.3.1

Also i tried with appium 1.5.2 same issue can some one please help me on this. Android is working fine.

DixantDubey commented 8 years ago

@jlipps : Could you please help me on this issue

mykola-mokhnach commented 8 years ago

Is there any reason to use 0.0.0.0 as server address instead of 127.0.0.1 or just localhost?

mykola-mokhnach commented 8 years ago

BTW ECONNREFUSED error signature means that the client was not able to connect to the server to send the request, which might also be a sign of network/connectivity issues.

jlipps commented 8 years ago

yeah there's no reason to use 0.0.0.0 in your client, that's more for the server to listen on all interfaces. please add a gist with your entire appium log for that run to assist in debugging.

bipin-k commented 8 years ago

Check with wait before first line of your code. Add, "Thread.sleep(5000);" testiOS()!

SrinivasanTarget commented 7 years ago

Closing this because of inactivity.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.