issues with java client : unable to create remote session
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 752
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 8
Description
Description
Getting the following Exception while
Unable to create a new remote session. Original error: okio.BufferedSource.readUtf8LineStrict(J)Ljava/lang/String;
In the following code
appiumDriver = new AndroidDriver(new URL("http:/0:0:0:0:4723/wd/hub"), desiredCapabilities);
Tried localhost and 127.0.0.1 as well
Note : The same code works fine for 4.1.2 java-client and Appium 1.9.1 but doesn't work for 7.0.0 client or 6.1.0 client
Environment
- java client build version or git revision if you use some shapshot:
7.0.0 and 6.1.0 - Appium server version or git revision if you use some shapshot:
1.11.1 and 1.9.1 - Desktop OS/version used to run Appium if necessary:
Mac OS Sierra and Mojave - Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe:
11.11.0 - Mobile platform/version under test:
Android and iOS too - Real device or emulator/simulator:
Real device and Simulators too
Details
Please provide more details, if necessary.
Note : The same code works fine for 4.1.2 java-client
Code To Reproduce Issue [ Good To Have ]
appiumDriver = new AndroidDriver(new URL("http:/0:0:0:0:4723/wd/hub"), desiredCapabilities);
Ecxeption stacktraces
Please create a gist with pasted stacktrace of exception thrown by java.
Link to Appium logs
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"app":"/android/test/app-test-10.5.1568.apk","appActivity":"com.test.activities.LauncherActivity","appPackage":"com.test.dev","automationName":"UiAutoWent to tear down
mator2","platformName":"Android","deviceName":"SamsungS7","fullReset":true},null,{"firstMatch":[{"appium:app":/android/test/app-test-10.5.1568.apk","appium:appActivity":"com.activities.LauncherActivity","appium:appPackage":"com.ttest.dev","appium:automationName":"UiAutomator2","appium:deviceName":"SamsungS7","appium:fullReset":true,"platformName":"android"}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1552392797229 (12:13:17 GMT+0000 (Greenwich Mean Time))
[Appium] Creating new AndroidUiautomator2Driver (v1.29.1) session
[Appium] Capabilities:
[Appium] platformName: android
[Appium] app: android/test/app-test-10.5.1568.apk
[Appium] appActivity: com.test.activities.LauncherActivity
[Appium] appPackage: com.test.dev
[Appium] automationName: UiAutomator2
[Appium] deviceName: SamsungS7
[Appium] fullReset: true
Driver info: driver.version: AndroidDriver
at org.junit.Assert.fail(Assert.java:88)
at drivers.Drivers.getDriver(Drivers.java:229)
at runner.RunTest.setUp(RunTest.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure at the AndroidDriver constructor with the reported Java-client and Appium versions, using the provided capabilities and server URL. Compare the working 4.1.2/1.9.1 combination with 6.1.0 and 7.0.0, then use the session-creation logs and stack trace to identify the compatibility issue; done means a remote session is created successfully on the affected combinations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100