MachinePublishers / jBrowserDriver

A programmable, embeddable web browser driver compatible with the Selenium WebDriver spec -- headless, WebKit-based, pure Java
Other
809 stars 143 forks source link

AbstractMethodError under JDK 8u212 #350

Closed mgladdish closed 4 years ago

mgladdish commented 4 years ago

I have a scala project which depends on jBrowserDriver 0.14.9. I've happily been working and building my project on java 1.8.0_152 (macOS).

Now I've started working on a fresh Fedora 30 build I have java-1.8.0-openjdk and java-1.8.0-openjdk-openjfx installed, along with their -devel counterparts. The bad news is that this installs java 1.8.0_221.

It seems this JDK bug: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8189926 brought in this change: https://github.com/javafxports/openjdk-jfx/commit/828f80887a8d37a878808d317e7c66d9713b5ec8#diff-a7f54b20f741c7d485d445ec85aafc9c which was included in this version https://www.oracle.com/technetwork/java/javase/2col/8u212-bugfixes-5292916.html

Unfortunately jBrowserDriver's https://github.com/MachinePublishers/jBrowserDriver/blob/master/src/com/machinepublishers/glass/ui/monocle/MonocleTimer.java doesn't implement the two new methods, _pause(long timer) and _resume(long timer).

For completeness, here's the stack trace from my test:


java.lang.RuntimeException: Exception in Application start method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$1(LauncherImpl.java:182)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.AbstractMethodError: com.sun.glass.ui.Timer._resume(J)V
    at com.sun.glass.ui.Timer.resume(Timer.java:151)
    at com.sun.javafx.tk.quantum.QuantumToolkit.resumeTimer(QuantumToolkit.java:511)
    at com.sun.javafx.tk.quantum.QuantumToolkit.access$000(QuantumToolkit.java:135)
    at com.sun.javafx.tk.quantum.QuantumToolkit$PulseTask.set(QuantumToolkit.java:202)
    at com.sun.javafx.tk.quantum.QuantumToolkit.setAnimationRunnable(QuantumToolkit.java:865)
    at com.sun.javafx.tk.quantum.MasterTimer.postUpdateAnimationRunnable(MasterTimer.java:105)
    at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.updateAnimationRunnable(AbstractMasterTimer.java:324)
    at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.access$100(AbstractMasterTimer.java:253)
    at com.sun.scenario.animation.AbstractMasterTimer.addAnimationTimer(AbstractMasterTimer.java:210)
    at javafx.animation.AnimationTimer.start(AnimationTimer.java:104)
    at javafx.scene.web.WebEngine$PulseTimer.start(WebEngine.java:1233)
    at javafx.scene.web.WebEngine$PulseTimer.access$1000(WebEngine.java:1210)
    at javafx.scene.web.WebEngine.<init>(WebEngine.java:902)
    at javafx.scene.web.WebEngine.<init>(WebEngine.java:868)
    at javafx.scene.web.WebView.<init>(WebView.java:273)
    at com.machinepublishers.jbrowserdriver.App.start(App.java:125)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
    at com.machinepublishers.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:94)
    at com.machinepublishers.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:53)

The net result is I can't run my selenium tests on JDK version >= 8_212.

hollingsworthd commented 4 years ago

Thanks for the great research! Fixed. Will be included in next release.

hollingsworthd commented 4 years ago

Released in v1.1.0-RC2 available now on Maven Central

mgladdish commented 4 years ago

Fab, thanks.

Any chance of a backport to either 0.14.9 or a version that's compatible with it?

I tried upgrading to the latest version but it's incompatible with the other old libs I'm stuck with.