Hello,
As practise I did the configuration of grid,nodes following forums
However I am not able to run cases… Getting the error as metioned in subject.
Did find the below link but cannot proceed… I did clean followed by update maven dependency
Below is the error log,pom,testng and capabilities details.
Sir @Aleksei , @KazuCocoa can anyone please advise…
Also why in logs I see capabilities as 5001:systemport
I am under impression that it is name value and here I see value:name
Please let me know if I misread this or I have done something wrong.
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.141.5’, revision: ‘d54ebd709a’, time: ‘2018-11-06T11:42:16’
System info: host: ‘’, ip: ‘192.168.56.1’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_161’
Driver info: driver.version: AndroidDriver
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:195)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:209)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:231)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:84)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:94)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:93)
at InitBase.BaseClass.initAppium(BaseClass.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:653)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:185)
… 28 more
Caused by: org.openqa.selenium.WebDriverException: Unable to parse remote response:
Error 500 Server Error
HTTP ERROR 500
Problem accessing /wd/hub/session. Reason:
Server Error
Caused by:
java.io.IOException: org.openqa.grid.common.exception.GridException: Cannot extract a capabilities from the request: {
Caused by: java.lang.IllegalArgumentException: Illegal key values seen in w3c capabilities: [5.1.1, 5000, 7e6faae4, Android]
at org.openqa.selenium.remote.NewSessionPayload.lambda$validate$5(NewSessionPayload.java:197)
We do not use grid but init appium servers on machine we starting tests. We use parallel type “methods”. You driver should be thread safe ( we use as threadlocal). All variables that specific to threads are also thread safe. Few places are synchronized.
I think the way is like below. Launch multiple appium servers on local and create sessions for them. We can control sessions connecting to http://127.0.0.1:4723/wd/hub or http://127.0.0.1:4725/wd/hub. Then, you need to take care of port conflicts.
$ appium -p 4723 # Appium server communicate with `4723` port
$ appium -p 4725 # Appium server communicate with `4725` port
@vsharma remember! Each appium server accept own appium port should have dirrerent other set of ports depending on platform you are using: iOS or Android.
@Aleksei as read on forums when launching appium server instance I did define different BP in my case for lenevo it was 4724 or is it something else ur referring too?
Motorola 4275
@KazuCocoa in the logs I also see the following
20:21:20.520 WARN [DefaultGridRegistry.removeIfPresent] - Cleaning up stale test sessions on the unregistered node http://127.0.0.1:5000
2018-12-24 20:22:30.096:WARN:osjs.HttpChannel:qtp1846412426-12: /wd/hub/session java.io.IOException: org.openqa.grid.common.exception.GridException: Cannot extract a capabilities from the request: {
“desiredCapabilities”: {
I am unclear how the values are read?
eg:- I see in logs as
“7e6faae4”: “udid”,
in capabilities they are defiened as
“udid” :“7e6faae4”:
Is this correct?
Do you have any chance to try out newer grid?
If the bug is in grid server, it probably works after 3.14.0
(I tested with the version before. Then, it create session was succeeded.)
Updated Java to 11 then some compiler maven issues resolved but still the same
I am blocked
Which version worked for you? May be I will downgrade but I need to keep Java 6.1.0
Did you already try the lates Java client via jitpack? It is not 6.1.0 from maven. (We have an issue to publish the library, so we currently use jitpack as a workaround.) Please follow the repository’s readme to install it via jitpack.
If the cause is selenium grid’s parsing capability issue, the latest Java-client has the fix.
thanks. Can you create an issue on the client repository?
Please do not forget to attach appium logs and your code set the capability and create a session.
I need to investigate the cause.
(Or if other members know the reason, they also can help it.)
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
[debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.11.0-beta.2","git-sha":"e793e279f91217301e809e5deaad0b85ce0c3802","built":"2018-12-21 17:20:20 -0500"}}
[HTTP] <-- GET /wd/hub/status 200 1 ms - 164
[HTTP]
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"app":"/Users/kazu/GitHub/java-client/src/test/java/io/appium/java_client/TestApp.app.zip","server:CONFIG_UUID":"41d25297-cc13-49cc-ad8a-8b78ac18f327","platformVersion":"11.4","automationName":"XCuiTest","platformName":"ios","deviceName":"iPhone X","launchTimeout":500000},"capabilities":{"firstMatch":[{"platformName":"ios","server:CONFIG_UUID":"41d25297-cc13-49cc-ad8a-8b78ac18f327"}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"app":"/Users/kazu/GitHub/java-client/src/test/java/io/appium/java_client/TestApp.app.zip","server:CONFIG_UUID":"41d25297-cc13-49cc-ad8a-8b78ac18f327","platformVersion":"11.4","automationName":"XCuiTest","platformName":"ios","deviceName":"iPhone X","launchTimeout":500000},null,{"firstMatch":[{"platformName":"ios","server:CONFIG_UUID":"41d25297-cc13-49cc-ad8a-8b78ac18f327"}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1545836171483 (23:56:11 GMT+0900 (Japan Standard Time))
[Appium] Could not parse W3C capabilities: 'deviceName' can't be blank
[Appium] Trying to fix W3C capabilities by merging them with JSONWP caps
[BaseDriver] The capabilities ["app","platformVersion","automationName","deviceName","launchTimeout"] are not standard capabilities and should have an extension prefix
[Appium] Creating new XCUITestDriver (v2.104.0) session
[Appium] Capabilities:
[Appium] app: /Users/kazuaki/GitHub/java-client/src/test/java/io/appium/java_client/TestApp.app.zip
[Appium] platformVersion: 11.4
[Appium] automationName: XCuiTest
[Appium] deviceName: iPhone X
[Appium] launchTimeout: 500000
[Appium] platformName: ios
[Appium] server:CONFIG_UUID: 41d25297-cc13-49cc-ad8a-8b78ac18f327
[debug] [BaseDriver] W3C capabilities {"alwaysMatch":{"appium:app... and MJSONWP desired capabilities {"app":"/Users/kazuaki/GitH... were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"appium:app...
[BaseDriver] The following capabilities were provided, but are not recognized by appium: server:CONFIG_UUID.
[BaseDriver] Session created with session id: d1173cec-ecea-432b-b530-3ec659d56d08
[debug] [XCUITest] Current user: 'kazuaki'
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
The above was a part of Appium log which was registered with the grid. Appium clients worked well.
@KazuCocoa today I tried again this time I added device name in parameter and did a rerun…
I see some other exception in logs
the value “appium:udid”: “ZY2235F2FB”, is displayed as expected in logs though… but there is exception
org.openqa.selenium.WebDriverException: java.lang.NullPointerException
Build info: version: ‘3.141.5’, revision: ‘d54ebd709a’, time: ‘2018-11-06T11:42:16’
System info: host: ‘VAIBHAVS-LAPTOP’, ip: ‘192.168.56.1’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_51’
Driver info: driver.version: unknown
at io.appium.java_client.pagefactory.AppiumElementLocator$WaitingFunction.apply(AppiumElementLocator.java:192)
at io.appium.java_client.pagefactory.AppiumElementLocator$WaitingFunction.apply(AppiumElementLocator.java:1)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:249)
at io.appium.java_client.pagefactory.AppiumElementLocator.waitFor(AppiumElementLocator.java:99)
at io.appium.java_client.pagefactory.AppiumElementLocator.findElement(AppiumElementLocator.java:119)
at io.appium.java_client.pagefactory.interceptors.InterceptorOfASingleElement.intercept(InterceptorOfASingleElement.java:59)
at org.openqa.selenium.remote.RemoteWebElement$$EnhancerByCGLIB$$d27c0df4.getText()
at TestCases.Smoke.StartEkyc(Smoke.java:31)
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:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at io.appium.java_client.pagefactory.AppiumElementLocator.lambda$0(AppiumElementLocator.java:120)
at io.appium.java_client.pagefactory.AppiumElementLocator$$Lambda$214/1013481204.get(Unknown Source)
at io.appium.java_client.pagefactory.AppiumElementLocator$WaitingFunction.apply(AppiumElementLocator.java:172)
… 20 more