Coder Social home page Coder Social logo

dzikoysk / pandomium Goto Github PK

View Code? Open in Web Editor NEW
184.0 184.0 41.0 208.64 MB

Pandomium is the JCEF (Java Chromium Embedded Framework) implementation dedicated for the Maven based projects

License: Apache License 2.0

Java 97.88% Shell 2.12%
cef chromium chromium-embedded-framework jcef panda webview

pandomium's Introduction

pandomium's People

Contributors

christian-draeger avatar cyaffle avatar dependabot[bot] avatar dzikoysk avatar ensonic avatar jrsofty avatar osiris-team avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pandomium's Issues

Only black screen now

I am now just getting a black window on linux, I am not sure where the messages come from, they are not in the pandomium sources. Any idea?

[17:18:15.903][AWT-EventQueue-1/INFO ] Initialize on Thread[AWT-EventQueue-1,6,main] with library path /home/ensonic/projects/lego/gsoc/pandomium-example/native
LaunchProcess: failed to execvp:
/home/ensonic/projects/lego/gsoc/pandomium-example/native/jcef_helper
LaunchProcess: failed to execvp:
/home/ensonic/projects/lego/gsoc/pandomium-example/native/jcef_helper
LaunchProcess: failed to execvp:
/home/ensonic/projects/lego/gsoc/pandomium-example/native/jcef_helper
LaunchProcess: failed to execvp:
/home/ensonic/projects/lego/gsoc/pandomium-example/native/jcef_helper
LaunchProcess: failed to execvp:
/home/ensonic/projects/lego/gsoc/pandomium-example/native/jcef_helper
LaunchProcess: failed to execvp:
/home/ensonic/projects/lego/gsoc/pandomium-example/native/jcef_helper
LaunchProcess: failed to execvp:
/home/ensonic/projects/lego/gsoc/pandomium-example/native/jcef_helper
[0609/171816.867395:ERROR:browser_gpu_channel_host_factory.cc(103)] Failed to launch GPU process.

Undefined reference error while building on Centos 6.5

I'm trying to build linux natives on centos 6.5, after using CMake to generate Makefile, I run make -j4. When linking libraries error occurs:

Linking CXX executable Release/jcef_helper
../../third_party/cef/cef_binary_3.3396.1775.g5340bb0_linux64/Release/libcef.so: undefined reference to `g_settings_get_boolean'
../../third_party/cef/cef_binary_3.3396.1775.g5340bb0_linux64/Release/libcef.so: undefined reference to `g_settings_new'
../../third_party/cef/cef_binary_3.3396.1775.g5340bb0_linux64/Release/libcef.so: undefined reference to `__fdelt_chk@GLIBC_2.15'
../../third_party/cef/cef_binary_3.3396.1775.g5340bb0_linux64/Release/libcef.so: undefined reference to `memcpy@GLIBC_2.14'
../../third_party/cef/cef_binary_3.3396.1775.g5340bb0_linux64/Release/libcef.so: undefined reference to `sendmmsg@GLIBC_2.14'
../../third_party/cef/cef_binary_3.3396.1775.g5340bb0_linux64/Release/libcef.so: undefined reference to `g_settings_schema_source_get_default'
../../third_party/cef/cef_binary_3.3396.1775.g5340bb0_linux64/Release/libcef.so: undefined reference to `g_settings_get_int'
../../third_party/cef/cef_binary_3.3396.1775.g5340bb0_linux64/Release/libcef.so: undefined reference to `g_settings_schema_source_lookup'
../../third_party/cef/cef_binary_3.3396.1775.g5340bb0_linux64/Release/libcef.so: undefined reference to `g_settings_get_string'
../../third_party/cef/cef_binary_3.3396.1775.g5340bb0_linux64/Release/libcef.so: undefined reference to `g_settings_get_strv'
../../third_party/cef/cef_binary_3.3396.1775.g5340bb0_linux64/Release/libcef.so: undefined reference to `g_settings_get_child'
collect2: error: ld returned 1 exit status
make[2]: *** [native/Release/jcef_helper] Error 1
make[1]: *** [native/CMakeFiles/jcef_helper.dir/all] Error 2
make: *** [all] Error 2

From some google result, these missing g_xxx comes from gtk library, however I already installed gtk+ 2.8, could you help me solve this problem? thanks in advanced.

Unsupported class version number [53.0] (maximum 52.0, Java 1.8)

[proguard] java.io.IOException: Can't read [C:\Users\wen.m2\repository\org\panda-lang\pandomium\67.0.3\pandomium-67.0.3.jar] (Can't process class [META-INF/versions/9/module-info.class] (Unsupported class version number [53.0] (maximum 52.0, Java 1.8)))
[proguard] at proguard.InputReader.readInput(InputReader.java:188)
[proguard] at proguard.InputReader.readInput(InputReader.java:158)
[proguard] at proguard.InputReader.readInput(InputReader.java:136)
[proguard] at proguard.InputReader.execute(InputReader.java:88)
[proguard] at proguard.ProGuard.readInput(ProGuard.java:218)
[proguard] at proguard.ProGuard.execute(ProGuard.java:82)
[proguard] at proguard.ProGuard.main(ProGuard.java:538)

Failed opening Amazon.com website

Hi, sorry if I report this issue here.
I want to use your project for creating a web scraping (I don't know would it a success or not)
But I succeeded in opening AliExpress, Google search, and even Facebook. But I got ERR_ABORTED every time I try to open Amazon site. Any clue why this happens?

Help For language

Heyy can u help me how can I change the default language for Pandomium?

Internal Logging of Pandomium overwrites handling of my application's LogBack

I use Logback for my application logging, and I've found that when I use Pandomium I'm getting this warning:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/F:/Development/.m2/org/panda-lang/pandomium/67.0.3/pandomium-67.0.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/F:/Development/.m2/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]

It seems that instead of making your library require SLF4J you are actually embedding it into the jar like it was an application (along with all the other dependencies). This makes it difficult for people who wish to use Pandomium and configure its logging to match our application.

Would it be too much to ask for a simple jar and not a fat jar?

Better way to manage natives files

I think it's better to pack all the natives file into a jar, then write some code to extract and load it. By this way, natives files can also managed by maven, the download code can be deleted.

Getting/Setting cookies

Hi,
how can I get and set cookies with Pandomium?
In CefSharp, there's the CookieManager.
Is it possible in Pandomium?

MacOS support

I think adding support for macOS is now the most important thing for the Pandomium project. JCEF wrapper can be done later.

Render from string and get DOM afterwards

Is it possible to use Pandomium to render html given by a String?
currently I only see the possiblility to make a HTTP request using pandonium (or CEF).

client.loadURL("https://panda-lang.org")

Is it somehow possible to to pass HTML from a string? to get it more clear, something like:

client.loadRaw("<!DOCTYPE html>
<html lang="en">
    <head></head>
    <body></body>
    <script>
        var dynamicallyAddedElement = document.createElement("div");
        dynamicallyAddedElement.className = "dynamic";
        var textNode = document.createTextNode("I have been dynamically added via Javascript");
        dynamicallyAddedElement.appendChild(textNode);
        document.body.appendChild(dynamicallyAddedElement);

    </script>
</html>")

Furthermore i would be intressted in getting the pagesource after the javascript has been executed and would expect to get this:

<html lang="en">
    <head></head>
    <body>
        <div class="dynamic">I have been dynamically added via Javascript</div>
    </body>
    <script>
        var dynamicallyAddedElement = document.createElement("div");
        dynamicallyAddedElement.className = "dynamic";
        var textNode = document.createTextNode("I have been dynamically added via Javascript");
        dynamicallyAddedElement.appendChild(textNode);
        document.body.appendChild(dynamicallyAddedElement);

    </script>
</html>

is this possible with pandomium in some way or could be supported by any chance in the nearer future?

What I'm trying to archive is to build something that is giving me a pagesource after executing javascript etc.
Images, styles etc doesn't have to be rendered necessarily. I just want to use it as a rendering engine to write a DOM parser. I don't need to see the visual rendered page, I need to see the generated source code but executed by a modern engine (like chromium). Do you have any tipps if it's realistic to use pandomium in this case or have any approach how to realize it?

How to hide this menu inspector source code.

How to hide this inspector source code menu.

I don't want user to inspect my source code.

PandomiumSettings settings = PandomiumSettings.getDefaultSettings();
		
Pandomium pandomium = new Pandomium(settings);
pandomium.initialize();

PandomiumClient client = pandomium.createClient();
PandomiumBrowser browser = client.loadURL("https://www.google.co.th/");

JFrame frame = new JFrame();
frame.getContentPane().add(browser.toAWTComponent(), BorderLayout.CENTER);
frame.pack();
        
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
frame.addWindowListener(new WindowAdapter() {
    @Override
     public void windowClosing(WindowEvent e) {
         pandomium.dispose();
             frame.dispose();
         }
});

frame.setTitle("Pandomium");
frame.setSize(1380, 760);
frame.setVisible(true);

bug

pandomium-parent missing for 67.0.4

Using gradle if that makes any difference

      > Could not resolve org.panda-lang:pandomium:67.0.4.
         > Could not parse POM https://repo.panda-lang.org/org/panda-lang/pandomium/67.0.4/pandomium-67.0.4.pom
            > Could not find org.panda-lang:pandomium-parent:67.0.4.
              Searched in the following locations:
                - https://repo.panda-lang.org/org/panda-lang/pandomium-parent/67.0.4/pandomium-parent-67.0.4.pom
                - https://repo.panda-lang.org/org/panda-lang/pandomium-parent/67.0.4/pandomium-parent-67.0.4.jar

Also maybe update to 71?

Question about universal.jar

Hi:

With the latest change made including CefThreadBridge it is a little confusing the use of universal.jar: this jar includes all necessary dependencies in one single jar, but org.cef package is from original jcef.

If I build the project, I assume that I must use the jar from pandomium module including its libs/resources jars also including native ones for jogl.

Is that correct?

Bye.

Some files are loaded from the jre-bin dir

Copied from #11 (comment)

When stracing a program using Pandomium I get:

32719 open("/home/ensonic/projects/pandomium-example/native/liblinuxenv.so", O_RDONLY) = 20
32719 open("/home/ensonic/projects/pandomium-example/native/liblinuxenv.so", O_RDONLY|O_CLOEXEC) = 20
32719 open("/usr/lib/jvm/java-8-openjdk-amd64/jre/bin", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 20
32719 symlink("/home/ensonic/projects/pandomium-example/native/icudtl.dat", "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/icudtl.dat") = -1 EACCES (Permission denied)

and that of course cannot work. What is this trying to achieve?

If I manually copy (3 files), it starts.

sudo cp native/icudtl.dat /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/
sudo cp native/natives_blob.bin /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/
sudo cp native/snapshot_blob.bin /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/

Seems to be similar issue like
cztomczak/cefpython#231
can we apply the same fix?

Here is some special casing does for linux:
https://github.com/dzikoysk/Pandomium/blob/HEAD/pandomium/src/main/java/org/panda_lang/pandomium/loader/PandomiumLoaderWorker.java#L43

Support for JavaFX FXML Applications

Hey there!

I have tried and tried to get this working in JavaFX, even using SwiftNodes and all I could get working was some white box that did nothing. Could you guys add some JavaFX UI Objects?

How to show dev tools?

I tried to open dev tools with F12... did not work.

I seem to be able to get dev tools with

var client = pandomium.createClient();
var pandomiumBrowser = client.loadURL("...");
var browser = pandomiumBrowser.getCefBrowser();
var devTools = browser.getDevTools();

But how to show those dev tools?

I tried

JFrame frame = new JFrame();
var content = frame.getContentPane();
 
content.add(pandomiumBrowser.toAWTComponent(), BorderLayout.CENTER);
content.add((Component) devTools, BorderLayout.SOUTH);

but CefBrowser is no component.

download/unpacking seems to not work (on linux)

I've created this example according to the docs on your README:
https://github.com/ensonic/pandomium-example

When running this on linux I get this output:

java -jar target/pandomium-example-1.0-SNAPSHOT-jar-with-dependencies.jar 
starting
[09:28:59.414][main/INFO ] Launching Pandomium 1.0.6
[09:28:59.417][main/INFO ] Progress: 0%
[09:28:59.418][main/INFO ] Progress: 5%
[09:28:59.418][main/INFO ] Progress: 10%
[09:28:59.938][main/INFO ] Starting to download -1 bytes of data
[09:28:59.938][main/INFO ] Downloading https://pandomium.panda-lang.org/download/native/1.0.4/linux64-native.tar.xz
[09:29:00.141][main/INFO ] Progress: 91%
[09:29:00.142][main/INFO ] Unzipping .xz archive
[09:29:00.152][main/INFO ] Progress: 95%
[09:29:00.153][main/INFO ] Unpacking .tar archive (it can take a while)
java.io.FileNotFoundException: /home/ensonic/projects/pandomium-example/native/locales/te.pak (No such file or directory)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
	at org.panda_lang.pandomium.util.ArchiveUtils.unpackTarArchiveEntry(ArchiveUtils.java:47)
	at org.panda_lang.pandomium.util.ArchiveUtils.unpackTar(ArchiveUtils.java:21)
	at org.panda_lang.pandomium.loader.PandomiumNativeLoader.loadNatives(PandomiumNativeLoader.java:50)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.load(PandomiumLoaderWorker.java:37)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.run(PandomiumLoaderWorker.java:27)
	at org.panda_lang.pandomium.loader.PandomiumLoader.load(PandomiumLoader.java:36)
	at org.panda_lang.pandomium.Pandomium.initialize(Pandomium.java:37)
	at org.buzztrax.jceff.App.main(App.java:26)
Exception in thread "main" java.lang.RuntimeException: Pandomium is not initialized
	at org.panda_lang.pandomium.Pandomium.createClient(Pandomium.java:42)
	at org.buzztrax.jceff.App.main(App.java:28)

When I check the 'native' directory, it is empty:

>ll native/
total 8
drwxr-xr-x 2 ensonic users 4096 May 18 09:28 ./
drwxr-xr-x 6 ensonic users 4096 May 18 09:28 ../

If I manually download and unpack:

cd native
wget https://pandomium.panda-lang.org/download/native/1.0.4/linux64-native.tar.xz
tar xJf linux64-native.tar.xz --strip 1

(please note that the download is also much slower than the above), it fails differenttly

java -jar target/pandomium-example-1.0-SNAPSHOT-jar-with-dependencies.jar 
starting
[13:30:11.038][main/INFO ] Launching Pandomium 1.0.6
[13:30:11.040][main/INFO ] Progress: 0%
java.nio.file.AccessDeniedException: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/icudtl.dat
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.createSymbolicLink(UnixFileSystemProvider.java:457)
	at java.nio.file.Files.createSymbolicLink(Files.java:1043)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.load(PandomiumLoaderWorker.java:64)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.run(PandomiumLoaderWorker.java:27)
	at org.panda_lang.pandomium.loader.PandomiumLoader.load(PandomiumLoader.java:36)
	at org.panda_lang.pandomium.Pandomium.initialize(Pandomium.java:37)
	at org.buzztrax.jceff.App.main(App.java:26)
Exception in thread "main" java.lang.RuntimeException: Pandomium is not initialized
	at org.panda_lang.pandomium.Pandomium.createClient(Pandomium.java:42)
	at org.buzztrax.jceff.App.main(App.java:28)

Any ideas? Is it okay that the maven version is 1.0.6 while the binary linux64-native.tar.xz is 1.0.4 ?

Invalid file descriptor to ICU data received

OS: ubuntu 16.04
Console log:
Initialize on Thread[AWT-EventQueue-0,6,main] with library path /home/videorexpress/IdeaProjects/Jcef/native
[0210/175513.351410:ERROR:icu_util.cc(173)] Invalid file descriptor to ICU data received.

Building documentation

It would be nice to understand where the cef binaries are downloaded from and how they are built. This could help people to e.g. provide additional builds (macos or e.g. raspberry pi). A little section in the README would be great! Thanks.

FYI; we (https://github.com/OpenRoberta/robertalab) have a GSoC (google summer of code) student working on turning the openrobertalab webapp into a desktop app that one can carry arround and use locally.

Native lib path

After correct downloding the win64-natives.tar.xz there is a issue with the native lib path:

[13:03:41.579][main/INFO ] Close connections
[13:03:41.581][main/INFO ] Progress: 99%
java.lang.NoSuchFieldException: sys_paths
at java.lang.Class.getDeclaredField(Class.java:820)
at org.panda_lang.pandomium.util.SystemUtils.injectLibraryPath(SystemUtils.java:12)

image

Can you log the libraryPath please, could help something..
( I tried on the same point a lot ;-) )

Thanks

mp4 audio video is not playing inside CEF

Inside CEF mp4 audio and video files are not getting played . I have passed the command line arguments as
settings.getCommandLine().addArgument("--enable-media-stream");
Still its not working , do i need to enable any other setting or the setting which i have passing is not proper , please suggest

Error trying to download maven

I created a new maven project and added dependency and repository like this:

4.0.0 com.mycompany pandomium-test 1.0 jar UTF-8 1.8 1.8
<repositories>
    <repository>
        <id>panda-repository</id>
        <url>https://repo.panda-lang.org/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>org.panda-lang</groupId>
        <artifactId>pandomium</artifactId>
        <version>67.0.2</version>
    </dependency>
</dependencies>

And I got this error
Failed to execute goal on project pandomium-test: Could not resolve dependencies for project com.mycompany:pandomium-test:jar:1.0: Failed to collect dependencies for [org.panda-lang:pandomium:jar:67.0.2 (compile)]: Failed to read artifact descriptor for org.panda-lang:pandomium:jar:67.0.2: Failure to find org.panda-lang:pandomium-parent:pom:67.0.2 in https://repo.panda-lang.org/ was cached in the local repository, resolution will not be reattempted until the update interval of panda-repository has elapsed or updates are forced -> [Help 1]

Is anything I'm doing wrong?

Pandomium not starting, no access.

My OS:
Linux 5.3.10-arch1-1 #1 SMP PREEMPT Sun, 10 Nov 2019 11:29:38 +0000 x86_64 GNU/Linux

FULL LOG (console):
[main/INFO ] #
[main/INFO ] # Launching Pandomium 67.0.6
[main/INFO ] # Chromium Version: 67.0.3396.62
[main/INFO ] # CEF Version: 3.3396.1775.g5340bb0
[main/INFO ] #
[main/INFO ] Progress: 0%
[main/ERROR] Pandomium requires permission to /usr/lib/jvm/java-8-openjdk/jre/bin directory
[main/ERROR] Pandomium requires permission to /usr/lib/jvm/java-8-openjdk/jre/bin directory
[main/ERROR] Pandomium requires permission to /usr/lib/jvm/java-8-openjdk/jre/bin directory
[main/INFO ] Progress: 100%
initialize on Thread[AWT-EventQueue-1,6,main] with library path /home/..../eclipse-workspace/..../natives
[1112/180915.880187:ERROR:icu_util.cc(133)] Invalid file descriptor to ICU data received.

Process 1327429 (java) of user 1000 dumped core.
Stack trace of thread 1327586:
#0 0x00007fb502510f11 n/a (/home/ougi_oshino/eclipse-workspace/.../natives/libcef.so)
#1 0x00007fb5038068b5 n/a (/home/ougi_oshino/eclipse-workspace/.../natives/libcef.so)
#2 0x00007fb50254627d n/a (/home/ougi_oshino/eclipse-workspace/.../natives/libcef.so)
#3 0x00007fb502545f70 n/a (/home/ougi_oshino/eclipse-workspace/.../natives/libcef.so)
#4 0x00007fb500c10fa0 n/a (/home/ougi_oshino/eclipse-workspace/.../natives/libcef.so)
#5 0x00007fb4fe5a64f4 n/a (/home/ougi_oshino/eclipse-workspace/.../natives/libjcef.so)

-rwxr-xr-x 1 ... ... 131575424 $(Date) /home/..../eclipse-workspace/..../natives/libcef.so

ldd libcef.so (no dependencies found)

strace:
openat(AT_FDCWD, "/usr/lib/jvm/java-8-openjdk/jre/bin/../lib/amd64/jli/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (not found)
openat(AT_FDCWD, "/usr/lib/jvm/java-8-openjdk/jre/bin/../lib/amd64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (not found)

Connection refused

When I try to start the full example I get

[11:58:03.958][main/INFO ] #
[11:58:03.961][main/INFO ] # Launching Pandomium 67.0.6
[11:58:03.961][main/INFO ] # Chromium Version: 67.0.3396.62
[11:58:03.961][main/INFO ] # CEF Version: 3.3396.1775.g5340bb0
[11:58:03.962][main/INFO ] #
[11:58:03.963][main/INFO ] Progress: 0%
[11:58:03.964][main/INFO ] Progress: 5%
[11:58:03.966][main/INFO ] Progress: 10%
[11:58:05.543][main/INFO ] Starting to download <unknown size> MB of data
[11:58:05.543][main/INFO ] Downloading https://pandomium.panda-lang.org/download/natives/67.0/win64-natives.tar.xz
java.net.ConnectException: Connection refused: connect
	at java.base/java.net.PlainSocketImpl.connect0(Native Method)
	at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:101)
	at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
	at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
	at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
	at java.base/java.net.Socket.connect(Socket.java:591)
	at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:285)
	at java.base/sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
	at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:182)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:569)
	at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:265)
	at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:372)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1181)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1075)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:163)
	at org.panda_lang.pandomium.loader.PandomiumDownloader.download(PandomiumDownloader.java:20)
	at org.panda_lang.pandomium.loader.PandomiumNativesLoader.loadNatives(PandomiumNativesLoader.java:41)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.load(PandomiumLoaderWorker.java:31)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.run(PandomiumLoaderWorker.java:21)
	at org.panda_lang.pandomium.loader.PandomiumLoader.load(PandomiumLoader.java:41)
	at org.panda_lang.pandomium.Pandomium.initialize(Pandomium.java:37)
	at swtDemo.Main.main(Main.java:21)
Exception in thread "main" java.lang.RuntimeException: Pandomium is not initialized
	at org.panda_lang.pandomium.Pandomium.createClient(Pandomium.java:42)
	at swtDemo.Main.main(Main.java:23)

Can I configure some proxy settings for Pandomium?

Caused by: java.lang.ClassNotFoundException: org.cef.CefSettings

When I use remote repository it works fine.
implementation('org.panda-lang:pandomium:67.0.6')
But with local dependency
implementation files('libs/pandomium-67.0.6.jar')
I have this error:
Caused by: java.lang.ClassNotFoundException: org.cef.CefSettings

How to correctly use local jar dependency that there would be no mistakes?

Can't load AMD 64-bit .dll on a IA 32-bit platform

I am trying to Integrate the pandomium in a Project and when i try to run it on my Windows-64 Machine i am getting

Pandomium - Launching Pandomium 1.0.7

Pandomium - Progress: 0%

Pandomium - Progress: 100%

Exception in thread "PandomiumThread" java.lang.UnsatisfiedLinkError: path\to\native\chrome_elf.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform

Option to disable WebRTC

I've just tried to disable it with many command line arguments

Pandomium pandomium = new Pandomium(PandomiumSettings.getDefaultSettingsBuilder()
        .argument("--enable_webrtc 0")
        .argument("--enable-media-stream 0")
        .argument("--webrtc.ip_handling_policy disable_non_proxied_udp")
        .argument("--webrtc.ip_handling_policy false")
        .argument("--webrtc.nonproxied_udp_enabled false")
        .argument("--webrtc.multiple_routes_enabled false")
        .argument("--disable-media-stream")
        .argument("--disable-webrtc")
        .build());

But it's still activated and leaking IP's if connected to a socks proxy.
I've read here that it needs to be set via SetPreferenceIfCan.

Java 9 Systemutils.java WARNING: Illegal reflective access to field java.lang.ClassLoader.sys_paths

comming from Systemutils.java Org\Panda_lang\Pandomium\Util
This option will be warning in java 9 and blocked in java 10
any fix for java 10 ?


public static void injectLibraryPath(String libraryPath) throws Exception {
        System.setProperty("java.library.path", libraryPath);

        Field sysPathsField = ClassLoader.class.getDeclaredField("sys_paths");
        sysPathsField.setAccessible(true);
        sysPathsField.set(null, null);

Add Proxy Support

Good project!
I think proxy support would be very useful, although I'm not sure if it can be added than easily, because Chrome doesn't have any built-in proxy settings but instead uses the Windows Internet Options that affect many other applications.

Add Build setup

It will be great if we add how to build and run this On all OS.
I am finding it difficult to do so.

Can u help me with this i am getting Some errors?

Basic JS bridge

Advanced Java <-> JS bridge is one future implementation , but is there one basic way to call java method from js ?
Ex: with CefMessageRouter i can do that

Getting error in ubuntu 18.04 "exception in thread awt-eventqueue-0 javax.media.opengl.glexception"

I am using Pandomium in one of the application and when i try to execute the same in ubuntu 18.04 getting below error
Please note same is working fine in ubuntu 16.04 and i am able to see the browser without any issues.

Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: AWT-EventQueue-0: X11GLXContext.createContextImpl ctx !ARB but ARB is used, profile > GL2 requested (OpenGL >= 3.0.1). Requested: GLProfile[GL3bc/GL3bc.sw], current: 3.0 (Compat profile, ES2 compat, FBO, software) - 3.0 Mesa 18.0.5
at jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:390)
at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:696)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:589)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:539)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1263)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1131)
at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1394)
at javax.media.opengl.Threading.invoke(Threading.java:223)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:525)
at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:579)
at org.cef.browser.CefBrowserOsr$1.paint(CefBrowserOsr.java:105)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:64)
at sun.awt.RepaintArea.paint(RepaintArea.java:240)
at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:584)
at java.awt.Component.dispatchEventImpl(Component.java:4965)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Offline Installation Help

Hi, I want to use Pandomium in my server which cannot access the internet, I download the jar and the corresponding natives(unzip it manually), when I run the test case, it throws the following error:

$ javac -cp ".:pandomium-67.0.jar" Browser.java
$  java -cp ".:pandomium-67.0.jar" Browser
[23:32:38.682][main/INFO ] #
[23:32:38.684][main/INFO ] # Launching Pandomium 67.0
[23:32:38.684][main/INFO ] # Chromium Version: 67.0.3396.62
[23:32:38.684][main/INFO ] # CEF Version: 3.3396.1775.g5340bb0
[23:32:38.684][main/INFO ] #
[23:32:38.685][main/INFO ] Progress: 0%
Exception in thread "main" java.lang.UnsatisfiedLinkError: no linuxenv in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at net.dzikoysk.linuxenv.LinuxJVMEnvironment.<init>(LinuxJVMEnvironment.java:6)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.load(PandomiumLoaderWorker.java:44)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.run(PandomiumLoaderWorker.java:24)
	at org.panda_lang.pandomium.loader.PandomiumLoader.load(PandomiumLoader.java:41)
	at org.panda_lang.pandomium.Pandomium.initialize(Pandomium.java:37)
	at Browser.main(Browser.java:14)

And Here's my file structure:

Browser.java
natives
pandomium-67.0.jar

Could you help me solve this issue, thanks!

Native Library jawt.dll already loaded in another classloader

I'm trying to write a plugin for IDEA which integrates chromium as a webview, not sure if this error is on me, but any help would be appreciated

java.lang.UnsatisfiedLinkError: Native Library C:\Users\harmony\.gradle\caches\modules-2\files-2.1\com.jetbrains\jbre\jbrex8u152b1343.15_windows_x64\jre\bin\jawt.dll already loaded in another classloader
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1907)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at org.cef.CefApp.<init>(CefApp.java:138)
	at org.cef.CefApp.getInstance(CefApp.java:213)
	at org.cef.CefApp.getInstance(CefApp.java:200)
	at org.panda_lang.pandomium.wrapper.PandomiumCEF.initialize(PandomiumCEF.java:16)
	at org.panda_lang.pandomium.Pandomium.lambda$initialize$0(Pandomium.java:34)
	at org.panda_lang.pandomium.loader.PandomiumLoader.callListeners(PandomiumLoader.java:56)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.load(PandomiumLoaderWorker.java:46)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.run(PandomiumLoaderWorker.java:21)
	at java.lang.Thread.run(Thread.java:745)

Lower version GLIBC support

I want to use Pandomium in a relatively old machine(Centos 6.7) which only have glibc.12(upgrade glibc in customers' host is really painful), however Pandomium67.0 requires glibc2.14. Is there any solution to run Pandomium in a lower version of glibc? Thanks in advance.

mac64-natives.tar.xz not found

Hi, I am trying to use Pandomium on Mac, but when executing the project it throws an error when downloading the file mac64-natives.tar.xz because it can not find it. I followed the steps to compile on Mac and I already have that file, however, I do not know how to do so that I do not look for that file on the page but use the local file that I generated.

How can I use Pandomium on javafx

I want to use Pandomium on javafx, so I used SwingNode, my code is as follows.

package org.panda_lang.pandomium;

import javafx.application.Application;
import javafx.embed.swing.SwingNode;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
import org.panda_lang.pandomium.settings.PandomiumSettings;
import org.panda_lang.pandomium.wrapper.PandomiumBrowser;
import org.panda_lang.pandomium.wrapper.PandomiumClient;

import javax.swing.*;

public class PandomiumFXTest extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        PandomiumSettings settings = PandomiumSettings.getDefaultSettings();

        Pandomium pandomium = new Pandomium(settings);
        pandomium.initialize();

        PandomiumClient client = pandomium.createClient();
        PandomiumBrowser browser = client.loadURL("https://panda-lang.org");

        // create swing node
        SwingNode swingNode = new SwingNode();
        JPanel jpanel = new JPanel();
        jpanel.add(browser.toAWTComponent());
        swingNode.setContent(jpanel);

        // create a border pane
        BorderPane parent = new BorderPane();
        parent.setCenter(swingNode);
        Scene scene = new Scene(parent, 400, 400);
        primaryStage.setScene(scene);
        primaryStage.setOnCloseRequest(windowEvent -> {
            pandomium.dispose();
            System.exit(0);
        });
        primaryStage.show();
    }
}

But I failed, I get a empty app and look like it
image

Is there any way to solve the proplem?
Thanks!

Blank screen displayed for Test Java Source

I have downloaded the JAR and Kept in Java class path. For the Test Java source, I got the below console output and in Swing component shows blank screen

ant -f C:\Users\589103\Documents\NetBeansProjects\test -Dnb.internal.action.name=run.single -Djavac.includes=test/Test.java -Drun.class=test.Test run-single
init:
Deleting: C:\Users\589103\Documents\NetBeansProjects\test\build\built-jar.properties
deps-jar:
Updating property file: C:\Users\589103\Documents\NetBeansProjects\test\build\built-jar.properties
Compiling 1 source file to C:\Users\589103\Documents\NetBeansProjects\test\build\classes
compile-single:
run-single:
[12:36:48.981][main/INFO ] #
[12:36:48.983][main/INFO ] # Launching Pandomium 67.0.4
[12:36:48.983][main/INFO ] # Chromium Version: 67.0.3396.62
[12:36:48.983][main/INFO ] # CEF Version: 3.3396.1775.g5340bb0
[12:36:48.983][main/INFO ] #
[12:36:48.984][main/INFO ] Progress: 0%
WARNING: An illegal reflective access operation has occurred
[12:36:48.989][main/INFO ] Progress: 100%
WARNING: Illegal reflective access by org.panda_lang.pandomium.util.SystemUtils (file:/C:/Users/589103/Downloads/pandomium-67.0.4.jar) to field java.lang.ClassLoader.sys_paths
WARNING: Please consider reporting this to the maintainers of org.panda_lang.pandomium.util.SystemUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
initialize on Thread[AWT-EventQueue-0,6,main] with library path C:\Users\589103\Documents\NetBeansProjects\test\natives
[0201/123649.416:ERROR:gpu_process_transport_factory.cc(1027)] Lost UI shared context.

Please help

Core dumped while running on Ubuntu 16.04 LTS

When I'm trying to run the test under ubuntu 16.04, an error occurs:

java -cp .:pandomium-67.0.jar PandomiumTest
[17:43:00.768][main/INFO ] #
[17:43:00.770][main/INFO ] # Launching Pandomium 67.0
[17:43:00.770][main/INFO ] # Chromium Version: 67.0.3396.62
[17:43:00.770][main/INFO ] # CEF Version: 3.3396.1775.g5340bb0
[17:43:00.770][main/INFO ] #
[17:43:00.771][main/INFO ] Progress: 0%
[17:43:00.780][main/INFO ] Creating symlink /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/icudtl.dat to /home/charles/JCEF/natives/icudtl.dat
[17:43:00.780][main/INFO ] Creating symlink /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/natives_blob.bin to /home/charles/JCEF/natives/natives_blob.bin
[17:43:00.780][main/INFO ] Creating symlink /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/snapshot_blob.bin to /home/charles/JCEF/natives/snapshot_blob.bin
[17:43:00.781][main/INFO ] Progress: 100%
initialize on Thread[AWT-EventQueue-0,6,main] with library path /home/charles/JCEF/natives
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f10be5a5cda, pid=1198, tid=0x00007f10be79d700
#
# JRE version: OpenJDK Runtime Environment (8.0_171-b11) (build 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11)
# Java VM: OpenJDK 64-Bit Server VM (25.171-b11 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [ld-linux-x86-64.so.2+0x9cda]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/charles/JCEF/hs_err_pid1198.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
[1]    1198 abort (core dumped)  java -cp .:pandomium-67.0.jar PandomiumTest

It works normally under windows.

Browser not using full space on 4k Display

When running the PandomiumTest.java using Pandomium 67.0.6 on a 4k display, not all available space is used, as seen in this screenshot:
grafik
Changing the background color of the browser.toAWTComponent() shows me, that the component is full sized, but just does not render the full space.
When trying again on another, smaller display, everything works out fine, so I assume its due to the display, but I am not 100% sure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.