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

IE stopped working on Grid in beta 4 #9600

Closed
JohnA2 opened this issue Jun 23, 2021 · 8 comments
Closed

IE stopped working on Grid in beta 4 #9600

JohnA2 opened this issue Jun 23, 2021 · 8 comments

Comments

@JohnA2
Copy link

JohnA2 commented Jun 23, 2021

💥 Regression Report

RemoteWebDriver.get() throws an exception when used with IE on Grid. It started happening in beta 4. Beta 3 worked fine. IE still works fine when used directly, without Grid.

Last working Selenium version

Worked up to version: 4.0.0-beta-3

Stopped working in version: 4.0.0-beta-4

To Reproduce

Start Grid hub and node

java -jar selenium-server-4.0.0-beta-4.jar hub
java -jar selenium-server-4.0.0-beta-4.jar node

Execute a simple test

InternetExplorerOptions ieOptions = new InternetExplorerOptions();
WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444"), ieOptions);
driver.get("http://www.google.com");
driver.quit();

The exception is

Exception in thread "main" org.openqa.selenium.InvalidArgumentException: parameters property of command is not a valid JSON object
Build info: version: '4.0.0-beta-4', revision: '29f46d02dd'
System info: host: '...', ip: '...', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '11'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [c8ce0e31-e678-4cd7-b453-7d2209c49105, get {url=http://www.google.com}]
Capabilities {acceptInsecureCerts: false, browserName: internet explorer, browserVersion: 11, javascriptEnabled: true, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), se:ieOptions: {browserAttachTimeout: 0, elementScrollBehavior: 0, enablePersistentHover: true, ie.browserCommandLineSwitches: , ie.edgechromium: false, ie.edgepath: , ie.ensureCleanSession: false, ie.fileUploadDialogTimeout: 3000, ie.forceCreateProcessApi: false, ignoreProtectedModeSettings: false, ignoreZoomSetting: false, initialBrowserUrl: http://localhost:26710/, nativeEvents: true, requireWindowFocus: false}, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
Session ID: c8ce0e31-e678-4cd7-b453-7d2209c49105
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:200)
	at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:133)
	at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:53)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:184)
	at org.openqa.selenium.remote.TracedCommandExecutor.execute(TracedCommandExecutor.java:39)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:612)
	at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:326)
	at test.Test.main(Test.java:14)

Environment

OS: Windows
Browser: Internet Explorer
Browser version: 11
Browser Driver version: IEDriver 3.150.1
Language Bindings version: Java 4.0.0-beta-4
Selenium Grid version (if applicable): 4.0.0-beta-4

@hnestorova
Copy link

I have the same issue - is there any progress on this?

@diemol
Copy link
Member

diemol commented Jul 28, 2021

I was able to reproduce this, I will have a look in the following days.

In the meantime, when you say it worked in beta-3. Was it both beta-3 bindings and Grid?

@diemol
Copy link
Member

diemol commented Jul 29, 2021

I was able to verify that Java bindings beta-3 and beta-4 work well, the issue happens in Grid beta-4 and upwards.

@JohnA2
Copy link
Author

JohnA2 commented Jul 31, 2021

Yes, both beta-3 bindings and Grid worked fine.

I did a quick look a few weeks ago and my impression was that IEDriver didn't like that some HTTP header names were not capitalized (all lowercase). At least that was the only difference that I noticed between beta-4+Grid, which didn't work, and beta-4+bindings/beta-3+bindings/beta-3+Grid, which worked.

@diemol
Copy link
Member

diemol commented Aug 1, 2021

@JohnA2 do you have a sample of those headers so I can double check? Did you capture traffic?

@diemol
Copy link
Member

diemol commented Aug 2, 2021

@JohnA2, thanks for the hint, this lead me to check a few changelogs and it seems there is a version of the IEServer that takes those case insensitive headers into account, but we never "officially" released it.
Could you please try the binary found here? https://github.com/SeleniumHQ/selenium/tree/trunk/cpp/prebuilt/Win32/Release

I tried it and things worked well.

In the meantime, I am in the process of uploading this binary and updating the dowloads page.

@JohnA2
Copy link
Author

JohnA2 commented Aug 2, 2021

Yes, I captured traffic to see the headers. They look like this:

beta 3

POST /session/250dc8b3-ddd1-4fb7-9d99-2eb16af8bdf8/url HTTP/1.1\r\n
User-Agent: selenium/4.0.0-beta-3 (java windows)\r\n
Connection: keep-alive\r\n
accept: */*\r\n
Cache-Control: no-cache\r\n
traceparent: 00-25e9bb2b8408a68ff665a0d9eadb58bf-efeeefd86f6d8158-01\r\n
host: localhost:23073\r\n
Content-Length: 43\r\n
Content-Type: application/json; charset=utf-8\r\n

beta 4

POST /session/841f5f70-6594-43c8-b831-c95fd11ead44/url HTTP/1.1\r\n
content-length: 43\r\n
User-Agent: selenium/4.0.0-beta-4 (java windows)\r\n
Connection: keep-alive\r\n
accept: */*\r\n
Cache-Control: no-cache\r\n
traceparent: 00-48a06bb961290995fa007ebec2ca7e42-1052970133208804-01\r\n
host: localhost:32269\r\n
Content-Type: application/json; charset=utf-8\r\n

So the only difference I see is "content-length" became non capitalized.

Yes, the updated IEDriverServer.exe from https://github.com/SeleniumHQ/selenium/tree/trunk/cpp/prebuilt/Win32/Release seems to be working fine with beta 4 Grid. Thanks!

selenium-ci added a commit to SeleniumHQ/seleniumhq.github.io that referenced this issue Aug 6, 2021
@diemol
Copy link
Member

diemol commented Aug 6, 2021

Thanks to @jimevans, a new release of the IEDriver is out and you can continue using IE together with Grid 4 Beta 4 and future versions.

Links have been updated in the docs as well, you can dowload it here.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants