-
-
Notifications
You must be signed in to change notification settings - Fork 759
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
5.0.0-BETA5 #594
Comments
@SrinivasanTarget @mykola-mokhnach @saikrishna321 I think there some changes on the selenium server-side. This failings are lelated to changes of this class: |
It looks like Selenium authors added some new JSON attributes to createSession API called "alwaysMatch" and "firstMatch". I still cannot fully understand the purpose of these based on their weird comments, but we need for sure avoid throwing an error in Appium or strip these attributes explicitly in our selenium driver wrappers. Probably, doing this in Appium would be better, since it won't require one to change all the drivers for different languages. |
@TikhomirovSergey Can you please try to apply this patch and check if the stuff still fails? |
ok, tracking that issue in appium at appium/appium#8009 |
@TikhomirovSergey @mykola-mokhnach i have confirmed with the spec authors that what the client is sending is completely wrong. It is sending this: {
"alwaysMatch": {
"app": "C:\\appium\\java-client\\src\\test\\java\\io\\appium\\java_client\\ApiDemos-debug.apk",
"deviceName": "Android Emulator",
"platformName": "Android"
},
"capabilities": {
"desiredCapabilities": {
"app": "C:\\appium\\java-client\\src\\test\\java\\io\\appium\\java_client\\ApiDemos-debug.apk",
"deviceName": "Android Emulator",
"platformName": "Android"
},
"requiredCapabilities": {}
},
"desiredCapabilities": {
"app": "C:\\appium\\java-client\\src\\test\\java\\io\\appium\\java_client\\ApiDemos-debug.apk",
"deviceName": "Android Emulator",
"platformName": "Android"
},
"firstMatch": [],
"requiredCapabilities": {}
} whereas according to the spec it should have the overall form: {
"capabilities": {
"alwaysMatch": {...},
"firstMatch": [...]
}
} so we need to figure out whether this is a bug in the java client or the appium client. I don't want to change the appium server parameters until we are sure what's going on here. |
according to spec authors, what the client should be sending is something more like this: {
"capabilities": {
"alwaysMatch": {
"app": "C:\\appium\\java-client\\src\\test\\java\\io\\appium\\java_client\\ApiDemos-debug.apk",
"deviceName": "Android Emulator",
"platformName": "Android"
},
"firstMatch": []
},
"requiredCapabilities": {
"app": "C:\\appium\\java-client\\src\\test\\java\\io\\appium\\java_client\\ApiDemos-debug.apk",
"deviceName": "Android Emulator",
"platformName": "Android"
},
"desiredCapabilities": {}
} note that there are 3 top-level keys: the two old ones (desiredCapabilities and requiredCapabilities) and the new one (capabilities). The reason is that the old ones are there to target old implementations, and the new one is there to target new implementations. Eventually the old keys will stop showing up. |
@KazuCocoa FYI |
👣 (watching) |
+1 to what @mykola-mokhnach says, this needs to be handled on the appium server side, which would help breaking all the clients. @jlipps @TikhomirovSergey i understand the caps which is in alwaysMatch should be present in requiredCapabilities. But what does the firstMatch gonna do ? |
@saikrishna321 This should be ok on server side if you put alwaysMatch and firstMatch attributes inside capabilities object, like the spec says. Jonathan has confirmed this with spec authors in W3C IRC chat. |
@jlipps @saikrishna321 @mykola-mokhnach @KazuCocoa @jlipps |
@jlipps @mykola-mokhnach As per latest Spec changes, ProtocolHandshake is redesigned in Selenium here, https://github.com/SeleniumHQ/selenium/blob/master/java/client/src/org/openqa/selenium/remote/ProtocolHandshake.java Same methods been overridden here: https://github.com/SeleniumHQ/selenium/blob/master/java/client/src/org/openqa/selenium/remote/HttpCommandExecutor.java#L139. We implicitly use the new handshake at our client side (after we ported to new selenium version) it breaks the handshake for us. Think there should be ways, Incase if we change the request json format at client end, does appium server handles everything out of box without any modifications at server end? Else this change requires modifications at both client and server ends? please clarify. |
Hi @SrinivasanTarget I think we should not improve the server side here because the server is doing things correctly. We need to ensure that the client is sending the right format. I'm not sure whether Appium's java client is responsible for the incorrect format, or whether Selenium's java client is responsible. But either way we should fix it in one of those places. |
@jlipps @SrinivasanTarget @mykola-mokhnach I'm working on our "protocol hand shake" class |
I will close this issue after the publishing. It is coming soon. |
The fix has been published. |
I use java client V4.1.2. it is OK |
@NgocVi93 Everything is fine in Latest version. You should invalidate your cache and restart the ide. Also if you are using java client in pom.xml, you should not add selenium dependency manually in pom.xml since java-client comes with latest selenium dependency. |
@SrinivasanTarget , I will try that. Thanks you for support. |
@SrinivasanTarget can you please check appium/appium#8916, it doesn't seems to be working properly |
@vikramvi Ok, will look into it. |
Hii all, I have installed below listed versions (mac machine):- 1.Java - 1.8.0_131 While running the code showing the error "Unable to create new remote session" Please anyone help me out from this situation. |
Please raise new issues with proper description and logs in form of gist. This is not relevant thread to raise queries. |
Description
The failing on the session creation.
Environment
Details
When I published the 5.0.0-BETA5 I had run tests and everything was ok. Yesterday I cleared caches and tried to check something. Instead I caught the exception. It reproduces with Selenium 3.2.0 and 3.3.0.
Code To Reproduce Issue [ Good To Have ]
Ecxeption stacktraces
Link to Appium logs
https://gist.github.com/TikhomirovSergey/28e7b0ffceacd480f44e1f0127edbfcb
The text was updated successfully, but these errors were encountered: