Christophe D
Christophe D

Reputation: 43

Cannot create a new Browser using jxbrowser on linux

I have a small test program using jxbrowser working on a Mac. I am trying to run the test program on a Fedora install and I connot get an instance of a Browser object.

Here is the logging of the program. Does anyone have an idea of what can cause jxbrowser to fail creating the browser ?

-- Product name: JxBrowser
-- Licensed version: 6.x
-- Licensed to:
-- License type: Evaluation
-- Generation date: Feb 23, 2017
-- Expiration date: Mar 25, 2017
-- License info: Single-user license
-- Current date: Feb 28, 2017 JxBrowser license valid. 04:27:24 INFO: OS name: Linux 04:27:24 INFO: OS version: 4.8.6-300.fc25.x86_64 04:27:24 INFO: JRE version: 1.8.0_111 64-bit 04:27:24 INFO: JxBrowser version: 6.12 04:27:24 INFO: Temp: /tmp
16:27:24:208 INFO [main] (be.lyncos.ivista.tools.Test) - Before new Browser 04:27:24 INFO: JxBrowser type: HEAVYWEIGHT 04:27:24 INFO: Starting IPC... 04:27:24 INFO: Starting IPC Server... 04:27:24 INFO: Starting socket server 04:27:24 INFO: Starting socket server at port 1101... 04:27:24 INFO: Starting IPC Process... 04:27:24 INFO: Starting Chromium process... 04:27:24 INFO: The '/lib/x86_64-linux-gnu/libudev.so.0' library exists: FALSE 04:27:24 INFO: The '/tmp/jxbrowser-chromium-55.0.2883.87.6.12/libudev.so.0' library exists: TRUE 04:27:24 INFO: The '/lib/x86_64-linux-gnu/libgcrypt.so.11' library exists: FALSE
04:27:24 INFO: The '/tmp/jxbrowser-chromium-55.0.2883.87.6.12/libgcrypt.so.11' library exists: TRUE 04:27:24 INFO: The '/lib/x86_64-linux-gnu/libcrypto.so.1.0.0' library exists: FALSE
04:27:24 INFO: The '/tmp/jxbrowser-chromium-55.0.2883.87.6.12/libcrypto.so.1.0.0' library exists: TRUE 04:27:24 INFO: Command line: /tmp/jxbrowser-chromium-55.0.2883.87.6.12/jxbrowser-chromium --port=1101 --pid=7360 --lang=en-us 04:27:24 INFO: [0228/172724:ERROR:browser_main_loop.cc(1426)] Unable to open X display. 04:27:24 INFO: Shared Memory Name: JXB1-7360 04:27:24 INFO: IPC connection has been established. Connection ID: 140474291099776 04:27:24 INFO: READ: OnHelloMessage{type=OnHello, uid=1, message='cid:0,type:Main', null 04:27:24 INFO: Channel has been accepted: SocketChannel{cid=0, bid=-1, type=Main} 04:27:24 INFO: IPC is started. 04:27:24 INFO: WRITE: CreateBrowserMessage{type=CreateBrowser, uid=1, channelId=0, contextId=0, cacheDir='user-data-dir/Cache', memoryDir='user-data-dir/Memory', dataDir='user-data-dir', currentLocale='en-us', proxyType=-1, proxyRules='null', proxyBypassRules='null', proxyAutoConfigURL='null', defaultZoomLevel=0.0, isOffScreenMode=false, storageType=1, SocketInfo{cid=0, bid=-1, channelType=Main} 04:27:25 INFO: Shutting down event queue... 04:27:25 INFO: Shutting down event queue... [DONE] 04:27:25 INFO: Shutting down event queue... 04:27:25 INFO: Shutting down event queue... [DONE] 04:27:25 INFO: Channel has been disconnected: SocketChannel{cid=0, bid=-1, type=Main} 04:27:25 INFO: IPC connection has been closed. Connection ID: 140474291099776
04:27:25 INFO: Pending IPC connections: 0 04:27:25 INFO: Chromium process exit code 139

com.teamdev.jxbrowser.chromium.internal.ipc.IPCException: Failed to get Browser browserChannel 0  
    at com.teamdev.jxbrowser.chromium.Browser.a(SourceFile:396)  
    at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:207)  
    at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:178)  
    at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:145)  
    at be.lyncos.ivista.tools.Test.testJxBrowser(Test.java:6942)  
    at be.lyncos.ivista.tools.Test.main(Test.java:382)  

16:29:24:674 ERROR [main] (be.lyncos.ivista.tools.Test) - Failed to get Browser browserChannel 0

com.teamdev.jxbrowser.chromium.internal.ipc.IPCException: Failed to get Browser browserChannel 0  
    at com.teamdev.jxbrowser.chromium.Browser.a(SourceFile:396)  
    at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:207)  
    at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:178)  
    at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:145)  
    at be.lyncos.ivista.tools.Test.testJxBrowser(Test.java:6942)  
    at be.lyncos.ivista.tools.Test.main(Test.java:382)  

04:29:24 INFO: Stopping Server...
04:29:24 INFO: Stopping Server... [DONE]
04:29:24 INFO: Waiting process exit...

Thank you for your help, Regards, Christophe

Upvotes: 0

Views: 1166

Answers (1)

Vladimir
Vladimir

Reputation: 2277

Please make sure that your Linux environment isn't a headless environment. JxBrowser doesn't support headless linux environments without running X Server: https://jxbrowser.support.teamdev.com/support/solutions/articles/9000013733-system-requirements

Upvotes: 0

Related Questions