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

Java 1.8 compatibility issue in FirefoxProfile.java #8860

Closed
BorisOsipov opened this issue Nov 10, 2020 · 2 comments
Closed

Java 1.8 compatibility issue in FirefoxProfile.java #8860

BorisOsipov opened this issue Nov 10, 2020 · 2 comments
Labels

Comments

@BorisOsipov
Copy link
Contributor

💥 Regression Report

java.lang.NoSuchMethodError: java.io.FileWriter.<init>(Ljava/io/File;Ljava/nio/charset/Charset;) on jdk-1.8.0_231 due usage public FileWriter(File file, Charset charset) costructor that @since 11 - avaliable only on jdk 11. See https://github.com/SeleniumHQ/selenium/blame/trunk/java/client/src/org/openqa/selenium/firefox/FirefoxProfile.java#L251

Will selenium 4 support jdk 1.8? I didn't find any info.

Last working Selenium version

Worked up to version:
selenium-firefox-driver:4.0.0-alpha-6

Stopped working in version:
selenium-firefox-driver:4.0.0-alpha-7

Stacktrace

java.io.FileWriter.<init>(Ljava/io/File;Ljava/nio/charset/Charset;)V
java.lang.NoSuchMethodError: java.io.FileWriter.<init>(Ljava/io/File;Ljava/nio/charset/Charset;)V
	at org.openqa.selenium.firefox.FirefoxProfile.updateUserPrefs(FirefoxProfile.java:251)
	at org.openqa.selenium.firefox.FirefoxProfile.layoutOnDisk(FirefoxProfile.java:376)
	at org.openqa.selenium.firefox.FirefoxProfile.toJson(FirefoxProfile.java:326)
	at org.openqa.selenium.firefox.FirefoxOptions.asMap(FirefoxOptions.java:296)
	at org.openqa.selenium.MutableCapabilities.merge(MutableCapabilities.java:83)
	at org.openqa.selenium.remote.DesiredCapabilities.merge(DesiredCapabilities.java:107)

Environment

Language Bindings version: selenium-firefox-driver:4.0.0-alpha-7

@BorisOsipov
Copy link
Contributor Author

Also selenium-grid:4.0.0-alpha-7

java.util.Optional.isEmpty()Z
java.lang.NoSuchMethodError: java.util.Optional.isEmpty()Z
	at org.openqa.selenium.grid.docker.DockerOptions.isEnabled(DockerOptions.java:98)
	at org.openqa.selenium.grid.docker.DockerOptions.getDockerSessionFactories(DockerOptions.java:113)
	at org.openqa.selenium.grid.node.local.LocalNodeFactory.create(LocalNodeFactory.java:69)
	at org.openqa.selenium.grid.commands.Standalone.createHandlers(Standalone.java:195)
	at org.openqa.selenium.grid.TemplateGridServerCommand.asServer(TemplateGridServerCommand.java:41)
	at org.openqa.selenium.grid.commands.Standalone.execute(Standalone.java:206)
	at org.openqa.selenium.grid.TemplateGridCommand.lambda$configure$2(TemplateGridCommand.java:98)
	at org.openqa.selenium.grid.Main.launch(Main.java:154)
	at org.openqa.selenium.grid.Main.go(Main.java:88)
	at org.openqa.selenium.grid.Main.main(Main.java:54)

Optional.isEmpty() is 11 api

@diemol
Copy link
Member

diemol commented Nov 10, 2020

Thank you for reporting this, it was an honest mistake where some Java 11 bits went through.

We want to support Java 11 or higher in the future, but we have not made any decision yet on when and how to do that. So far, we will still support Java 8.
We will probably spend some time figuring out the Java versions support after Selenium 4 is released.

@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.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants