java-client icon indicating copy to clipboard operation
java-client copied to clipboard

Getting org.openqa.selenium.WebDriverException: java.net.SocketException on Java client 6.0.0-Beta5 and 6.0.0 versions

Open Gocoollnath opened this issue 8 years ago • 13 comments

The problem

Getting org.openqa.selenium.WebDriverException: java.net.SocketException on Java client 6.0.0-Beta5 and 6.0.0 versions

Environment

  • Appium version (or git revision) that exhibits the issue: 1.8.0
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium: Windows 10
  • Node.js version (unless using Appium.app|exe): Latest
  • Mobile platform/version under test: API 25
  • Real device or emulator/simulator: Real device
  • Appium CLI or Appium.app|exe: Appium CLI
  • TestNG -6.14.3
  • Extent Reports - 2.41.2

Link to Stack trace

https://gist.github.com/Gocoollnath/2b949429341574b459776937053a3913

Link to Appium logs

https://gist.github.com/Gocoollnath/29e05255e3ff5c595c929da84ce19652

Code To Reproduce Issue [ Good To Have ]

https://gist.github.com/Gocoollnath/4d54fe5ddfacf1d8e3260ea9330f135c

Gocoollnath avatar May 31 '18 11:05 Gocoollnath

@sravanmedarapu @dpgraham Could any light be thrown into this issue,please?

Gocoollnath avatar Jun 01 '18 07:06 Gocoollnath

I am also getting an org.openqa.selenium.WebDriverException, java.net.SocketException. Reproducible with version java client version 6.0.0 only

ElenaAlejo avatar Jun 12 '18 08:06 ElenaAlejo

@Gocoollnath @ElenaAlejo I couldn't reproduce this issue in latest java client(6.0.0) and server version(1.8.1).

SrinivasanTarget avatar Jun 12 '18 10:06 SrinivasanTarget

@SrinivasanTarget the issue is not continuous. It occurs sparingly

Gocoollnath avatar Jun 12 '18 10:06 Gocoollnath

@Gocoollnath @ElenaAlejo Have been running tests since then the versions are out. I couldn't reproduce it. So its hard to solve atleast from my end.

SrinivasanTarget avatar Jun 12 '18 15:06 SrinivasanTarget

Hello, @SrinivasanTarget , I update the server version to 1.8.1, and I still have the issue, that is reproducible in my test cases, not intermittent. This is the log:

https://gist.github.com/ElenaAlejo/79d21d5c8284b24e8b74202de2c00cb7

Stack trace:

Message: org.openqa.selenium.WebDriverException: java.net.SocketException: Connection reset Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z' System info: host: 'MacBook-Pro-de-elena.local', ip: 'fe80:0:0:0:8b9:df9e:95df:fa45%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.2', java.version: '1.8.0_151' Driver info: driver.version: IOSDriver Stack Trace: io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:233) org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543) io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:46) io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1) io.appium.java_client.HasSessionDetails.getSessionDetails(HasSessionDetails.java:39) io.appium.java_client.HasSessionDetails.getSessionDetail(HasSessionDetails.java:56) io.appium.java_client.HasSessionDetails.getPlatformName(HasSessionDetails.java:65) io.appium.java_client.pagefactory.AppiumFieldDecorator.(AppiumFieldDecorator.java:96) commonsteps.Init.findByTags(Init.java:17)

Workaround: I am using Java client 6.0.0-Beta5

ElenaAlejo avatar Jun 13 '18 05:06 ElenaAlejo

@ElenaAlejo there is fix in master https://github.com/appium/java-client/pull/928/ can you please try building latest from master n give it a try.

In my case the master code fixed this issue.

saikrishna321 avatar Jun 13 '18 13:06 saikrishna321

I am facing similar issue with Java client 5.0.0 versions also:-

Can you please let us know how to write details in pom.xml for java -client master code.

org.openqa.selenium.WebDriverException: java.net.SocketException: Connection reset Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z' System info: host: 'gwgmobilabsiMac', ip: 'fe80:0:0:0:10e4:6e09:2a1:57de%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.4', java.version: '1.8.0_171' Driver info: driver.version: IOSDriver at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:104) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)

Siddh010 avatar Jun 18 '18 08:06 Siddh010

@Siddh010 clone master and run ./gradlew clean build -x test -x signArchives and replace the .jar from build/ inside .m2 of io.java-client

saikrishna321 avatar Jun 18 '18 10:06 saikrishna321

I am able to build the project but now block with below issue as I am not able to init Page Object. ExceptionI while trying to Initialise Page factory with Java client 6.0.0 #949

Siddh010 avatar Jun 19 '18 09:06 Siddh010

I am using Java client 6.0.0 and face the same issue, I think everyone using page factory framework and facing this issue. Can anyone fix this? Please describe in detail, how it gonna be fixed

NavdeepSingh09 avatar Jun 22 '18 01:06 NavdeepSingh09

@NavdeepSingh09 Please use version 6.1.0

saikrishna321 avatar Jun 22 '18 05:06 saikrishna321

It's working Thanks

NavdeepSingh09 avatar Jun 22 '18 19:06 NavdeepSingh09