Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Gocoollnath opened this issue May 31, 2018 · 13 comments

Comments

@Gocoollnath
Copy link

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
Copy link
Author

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

@ElenaAlejo
Copy link

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

@SrinivasanTarget
Copy link
Member

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

@Gocoollnath
Copy link
Author

@SrinivasanTarget the issue is not continuous. It occurs sparingly

@SrinivasanTarget
Copy link
Member

@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.

@ElenaAlejo
Copy link

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

@saikrishna321
Copy link
Member

@ElenaAlejo there is fix in master #928 can you please try building latest from master n give it a try.

In my case the master code fixed this issue.

@Siddh010
Copy link

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)

@saikrishna321
Copy link
Member

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

@Siddh010
Copy link

Siddh010 commented Jun 19, 2018

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

@NavdeepSingh09
Copy link

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

@saikrishna321
Copy link
Member

@NavdeepSingh09 Please use version 6.1.0

@NavdeepSingh09
Copy link

It's working Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants