This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
13 / 40
Dec 2018

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

E.g. “bootstrap-port” port for 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
BP

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

Also tried the below link by performing maven clean >install > test but still the same.
https://stackoverflow.com/questions/51084484/org-openqa-selenium-json-jsonoutput-writeljava-lang-objectljava-lang-reflect-t1

Something wrong in my capabilties?


Capabilities
testngxml

Yes, as you addressed, "7e6faae4": “udid”, should be "udid" :“7e6faae4”.

"5.1.1": "systemPort",
"5000": "platform"
"7xxxxx": "udid"
"Android": "platformVersion"

must be:

"systemPort": "5000",
"platform": "Android",
"platformVersion": "5.1.1",
"udid": "7xxxxx"

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

@KazuCocoa I tried with 3.141.59
Also included

org.seleniumhq.selenium
selenium-server
3.141.59

Updated Java to 11 then some compiler maven issues resolved but still the same
I am blocked :frowning:
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.


BTW, I tested with https://github.com/appium/ruby_lib/tree/master/grid1 . The ruby version also has the same fix with issue#1010 in Java client.

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

@KazuCocoa client repo?
Can you please share me the url as I am not aware…
Also should I share this discussion link there too?

I tried to run https://github.com/appium/java-client/blob/1991a8a0f9e4a3ff467dbb713cb5c51c8edc060f/src/test/java/io/appium/java_client/ios/IOSDriverTest.java1 with 3.13.0, 3.14 and 3.141.59. 3.13 and 3.14 succeeded to run. 3.141.59 had an issue in probably grid side? (have not investigated though). The grid configuration was he same as ruby_core’s one I attached the above.

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

I noticed capabilities you attached in https://discuss-new.appium.io/uploads/default/original/2X/f/fe7545f06f408ed5e9cd3486ec08f76820745d84.JPG3 was grid side. What capability can you see in http://localhost:4444/grid/console ? Was it correct?

@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

2018-12-27 16:39:53.673:WARN:osjs.HttpChannel:qtp510464020-12: /wd/hub/session java.io.IOException: org.openqa.grid.common.exception.GridException: Cannot extract a capabilities from the request: {
“desiredCapabilities”: {
“app”: “C:\Users\vaibhav.sharma\Latest WorkSpace\IDIAutomation\src\main\abcd.apk”,
“appActivity”: “abc”,
“appPackage”: “abc”,
“autoGrantPermissions”: “true”,
“platformName”: “Android”,
“udid”: “ZY2235F2FB”,
“deviceName”: “Motorola”,
“fullReset”: “false”,
“version”: “6.0.1”,
“platform”: “ANDROID”,
“systemPort”: “5001”
},
“capabilities”: {
“firstMatch”: [
{
“appium:app”: “C:\Users\vaibhav.sharma\Latest WorkSpace\IDIAutomation\src\main\abcd.apk”,
“appium:appActivity”: “”,
“appium:appPackage”: “”,
“appium:autoGrantPermissions”: “true”,
“appium:deviceName”: “Motorola”,
“appium:fullReset”: “false”,
“platform”: “ANDROID”,
“platformName”: “android”,
“appium:systemPort”: “5001”,
“appium:udid”: “ZY2235F2FB”,
“version”: “6.0.1”
}
]
}

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
Devicename

I’m having the same issue on an iOS device and am very interested to hear a solution for this.

The 1st issue you could not establish a new connection was resolved, right? Your attached capabilities had no issue like you faced before. And you could send a command find_element to the target.

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)

I would like to know that request send to server. Could you attach full server log via Gist or something? (I think you cannot attach all of them in here.)

[quote=“KazuCocoa, post:22, topic:24669”]
I would like to know that request send to server. Could you attach full server log via Gist or something?
@KazuCocoa I am going through blogs to understand capture of server logs…
In eclipse workspace I do see logs in console logs and same can be found in workspace.
Found belwo link need to implement capture of server logs or is there any other way? where I can get the logs present? for your sharing


As far the changes made in request in

  1. In testng.xml I had added the deviceName parameter same I passed into @Parameters
  2. Yesterday I was reading to invoke web on device for that i made change in chromedriver which I think has nothing to do but was getting some error in logs had added org.slf4j

Apart from that I made no changes…

Sorry, I’m not sure running via Eclipse case…

In my case:
terminal1: Launch a grid server
terminal2: Launch an appium server (and communicate with the grid)
terminal3 or other place: Run Java test case

Then, outputs in terminal 1, 2 and 3 will be logs for each products.
If you can also follow this way, it’s the easiest way, I think

that is just a bach environment. (On macOS, “terminal” is build-in app name.)