gluonhq / substrate

Create native Java(FX) apps for desktop, mobile and embedded
GNU General Public License v2.0
398 stars 51 forks source link

WebView not working on Linux #1137

Open jperedadnr opened 2 years ago

jperedadnr commented 2 years ago

Adding to HelloFX:

WebView webView = new WebView();
        webView.getEngine().loadContent("<html><body><h1>WebEngine!</h1></body></html>");
        VBox root = new VBox(30, webView);

causes

Caused by: java.lang.UnsatisfiedLinkError: com.sun.webkit.WebPage.twkInitWebCore(ZZZ)V [symbol: Java_com_sun_webkit_WebPage_twkInitWebCore or Java_com_sun_webkit_WebPage_twkInitWebCore__ZZZ]
[SUB]     at com.oracle.svm.jni.access.JNINativeLinkage.getOrFindEntryPoint(JNINativeLinkage.java:153)
[SUB]     at com.oracle.svm.jni.JNIGeneratedMethodSupport.nativeCallAddress(JNIGeneratedMethodSupport.java:57)
[SUB]     at com.sun.webkit.WebPage.twkInitWebCore(WebPage.java)

Possibly related to https://github.com/gluonhq/substrate/issues/1010, the GluonFeature currently lacks of webKit library and packages.

Reference: https://stackoverflow.com/questions/71682432/webview-webengine-fails-with-gluonmobile-graalvm22-javafx-17

Expected Behavior

Current Behavior

Steps to Reproduce

Your Environment

DJViking commented 2 years ago

According to the features supported, Web is included for both Linux and Windows. https://docs.gluonhq.com/#_platforms

I am getting the same problem with my GluonFX project (I am on Linux). Using Java 17 and JavaFX 17.

Until this is fixed, the documentation should reflect that Web does not work on Linux.

credmond commented 1 year ago

Would agree to remove the documentation suggesting this is supported...I am encountering the same issue and it's been a time killer :)

Or...any chance of fixing?

dpospisil commented 10 months ago

Any update on this?