openaudible icon indicating copy to clipboard operation
openaudible copied to clipboard

Linux: Internal browser doesn't load

Open felixg3 opened this issue 2 years ago • 20 comments

As described in Issue #930, I face the same problem, the webbrowser is not loading. I set the environment variable oa_chromium=true, to no success.

Using OA 3.5.3 on openSUSE Tumbleweed via AppImage The console output is

Mai 01, 2022 5:32:16 NACHM. org.openaudible.desktop.swt.gui.GUI <init>
INFORMATION: Starting OpenAudible build 3.5.3 for gtk swt 4944 jvm 12
WARNING: File System Not Set to UTF-8:
file.encoding=UTF8, sun.jnu.encoding=UTF-8
Mai 01, 2022 5:32:17 NACHM. org.openaudible.Directories isValid
INFORMATION: Not found:/home/felix/OpenAudible/mp3
Mai 01, 2022 5:32:17 NACHM. org.openaudible.Directories isValid
INFORMATION: Not found:/home/felix/OpenAudible/m4a
Mai 01, 2022 5:32:17 NACHM. org.openaudible.Directories isValid
INFORMATION: Not found:/home/felix/OpenAudible/m4b
Mai 01, 2022 5:32:17 NACHM. org.openaudible.Directories isValid
INFORMATION: Not found:/home/felix/OpenAudible/pdf
Mai 01, 2022 5:32:17 NACHM. org.openaudible.Directories getPrefs
INFORMATION: Loading /home/felix/OpenAudible/settings.json exists=true size=554
Mai 01, 2022 5:32:17 NACHM. org.openaudible.Directories getPrefs
INFORMATION: loaded settings 1651418648113
Mai 01, 2022 5:32:17 NACHM. org.openaudible.desktop.swt.manager.AudibleGUI <init>
INFORMATION: audible desktop 3.5.3 linux
Mai 01, 2022 5:32:17 NACHM. org.openaudible.desktop.swt.util.shop.PaintShop prefer2x
INFORMATION: useHighDPI=false
Mai 01, 2022 5:32:17 NACHM. org.openaudible.Directories getPrefs
INFORMATION: Loading /home/felix/OpenAudible/settings.json exists=true size=554
Mai 01, 2022 5:32:17 NACHM. org.openaudible.Directories getPrefs
INFORMATION: loaded settings 1651418648113
Mai 01, 2022 5:32:17 NACHM. org.openaudible.audible.AudibleConnectionState setRegion
INFORMATION: Setting audible region to US
Mai 01, 2022 5:32:17 NACHM. org.openaudible.Audible load
INFORMATION: Loading /home/felix/OpenAudible/books.json
Mai 01, 2022 5:32:17 NACHM. org.openaudible.Audible checkLibrary
INFORMATION: loaded 0 books.
Mai 01, 2022 5:32:17 NACHM. org.openaudible.desktop.swt.manager.AudibleGUI applicationStarted
INFORMATION: applicationStarted took 60 ms. to complete.
Mai 01, 2022 5:32:19 NACHM. org.openaudible.desktop.swt.manager.menu.CommandCenter execute
INFORMATION: Command: Connect
Mai 01, 2022 5:32:20 NACHM. org.openaudible.desktop.swt.manager.VersionCheck getVersion
INFORMATION: versionCheck: https://openaudible.org/swt_version.json
Mai 01, 2022 5:32:22 NACHM. org.openaudible.desktop.swt.manager.menu.CommandCenter execute
INFORMATION: Command: Console
Mai 01, 2022 5:32:25 NACHM. org.openaudible.desktop.swt.manager.menu.CommandCenter execute
INFORMATION: Command: Connect
Mai 01, 2022 5:32:29 NACHM. org.openaudible.audible.AudibleConnectionState setRegion
INFORMATION: Setting audible region to DE
Mai 01, 2022 5:32:29 NACHM. org.openaudible.audible.APIManager build_client_id
INFORMATION: build_client_id:4103DB6F0E0748D05A473D40928910306AAE30C9#A2CZJZGLK2JJVM->device:34313033444236463045303734384430354134373344343039323839313033303641414533304339234132435A4A5A474C4B324A4A564D
Mai 01, 2022 5:32:29 NACHM. org.openaudible.audible.APIManager debug
INFORMATION: AuthURL: https://www.amazon.de/ap/signin?openid.pape.max_auth_age=0
forceMobileLayout=true
openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select
accountStatusPolicy=P1
marketPlaceId=AN7V1F1VY261K
language=de-DE
pageId=amzn_audible_ios
openid.return_to=https%3A%2F%2Fwww.amazon.de%2Fap%2Fmaplanding
openid.assoc_handle=amzn_audible_ios_de
openid.oa2.response_type=token
openid.mode=checkid_setup
openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0
openid.ns.oa2=http%3A%2F%2Fwww.amazon.com%2Fap%2Fext%2Foauth%2F2
openid.oa2.scope=device_auth_access
openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select
openid.oa2.client_id=device%3A34313033444236463045303734384430354134373344343039323839313033303641414533304339234132435A4A5A474C4B324A4A564D
openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0
Mai 01, 2022 5:32:29 NACHM. org.openaudible.desktop.swt.manager.browser.BrowserFactory initBrowsers
INFORMATION: initBrowser: Chromium=true
Mai 01, 2022 5:32:29 NACHM. org.openaudible.desktop.swt.manager.browser.jcef.ChromiumApp <init>
INFORMATION: Building ChromiumApp
Mai 01, 2022 5:32:29 NACHM. org.openaudible.desktop.swt.manager.browser.jcef.ChromiumApp <init>
INFORMATION: jcefbundle:/tmp/.mount_OpenAueIDlRB/bin/linux/jcef-bundle
LICENSE.txt,README.txt,build_meta.json,chrome-sandbox,chrome_100_percent.pak,chrome_200_percent.pak,gluegen.LICENSE.txt,icudtl.dat,install.lock,jcef_helper,jogl.LICENSE.txt,libEGL.so,libGLESv2.so,libcef.so,libjcef.so,locales,resources.pak,snapshot_blob.bin,swiftshader,v8_context_snapshot.bin,
Mai 01, 2022 5:32:29 NACHM. org.openaudible.desktop.swt.manager.browser.jcef.ChromiumApp <init>
INFORMATION: builder.build
Mai 01, 2022 5:32:30 NACHM. org.openaudible.desktop.swt.manager.browser.jcef.ChromiumApp <init>
INFORMATION: builder.built
Mai 01, 2022 5:32:30 NACHM. org.openaudible.desktop.swt.manager.browser.BrowserFactory initBrowsers
INFORMATION: initBrowser complete: Chromium=jcef 0

Same issue in the rpm-version:

Mai 01, 2022 5:36:58 PM org.openaudible.desktop.swt.gui.GUI <init>
INFORMATION: Starting OpenAudible build 3.5.3 for gtk swt 4944 jvm 17.0.1
Mai 01, 2022 5:36:58 PM org.openaudible.Directories isValid
INFORMATION: Not found:/home/felix/OpenAudible/mp3
Mai 01, 2022 5:36:58 PM org.openaudible.Directories isValid
INFORMATION: Not found:/home/felix/OpenAudible/m4a
Mai 01, 2022 5:36:58 PM org.openaudible.Directories isValid
INFORMATION: Not found:/home/felix/OpenAudible/m4b
Mai 01, 2022 5:36:58 PM org.openaudible.Directories isValid
INFORMATION: Not found:/home/felix/OpenAudible/pdf
Mai 01, 2022 5:36:58 PM org.openaudible.Directories getPrefs
INFORMATION: Loading /home/felix/OpenAudible/settings.json exists=true size=554
Mai 01, 2022 5:36:58 PM org.openaudible.Directories getPrefs
INFORMATION: loaded settings 1651418648113
Mai 01, 2022 5:36:58 PM org.openaudible.desktop.swt.manager.AudibleGUI <init>
INFORMATION: audible desktop 3.5.3 linux
Mai 01, 2022 5:36:58 PM org.openaudible.desktop.swt.util.shop.PaintShop prefer2x
INFORMATION: useHighDPI=false
Mai 01, 2022 5:36:58 PM org.openaudible.Directories getPrefs
INFORMATION: Loading /home/felix/OpenAudible/settings.json exists=true size=554
Mai 01, 2022 5:36:58 PM org.openaudible.Directories getPrefs
INFORMATION: loaded settings 1651418648113
Mai 01, 2022 5:36:58 PM org.openaudible.audible.AudibleConnectionState setRegion
INFORMATION: Setting audible region to US
Mai 01, 2022 5:36:58 PM org.openaudible.Audible load
INFORMATION: Loading /home/felix/OpenAudible/books.json
Mai 01, 2022 5:36:58 PM org.openaudible.Audible checkLibrary
INFORMATION: loaded 0 books.
Mai 01, 2022 5:36:58 PM org.openaudible.desktop.swt.manager.AudibleGUI applicationStarted
INFORMATION: applicationStarted took 51 ms. to complete.
Mai 01, 2022 5:37:01 PM org.openaudible.desktop.swt.manager.VersionCheck getVersion
INFORMATION: versionCheck: https://openaudible.org/swt_version.json
Mai 01, 2022 5:37:02 PM org.openaudible.desktop.swt.manager.menu.CommandCenter execute
INFORMATION: Command: Connect
Mai 01, 2022 5:37:05 PM org.openaudible.audible.AudibleConnectionState setRegion
INFORMATION: Setting audible region to DE
Mai 01, 2022 5:37:05 PM org.openaudible.audible.APIManager build_client_id
INFORMATION: build_client_id:559A376278E2CDE85AEA7B8D6F5B85CE2528A6B6#A2CZJZGLK2JJVM->device:35353941333736323738453243444538354145413742384436463542383543453235323841364236234132435A4A5A474C4B324A4A564D
Mai 01, 2022 5:37:05 PM org.openaudible.audible.APIManager debug
INFORMATION: AuthURL: https://www.amazon.de/ap/signin?openid.pape.max_auth_age=0
forceMobileLayout=true
openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select
accountStatusPolicy=P1
marketPlaceId=AN7V1F1VY261K
language=de-DE
pageId=amzn_audible_ios
openid.return_to=https%3A%2F%2Fwww.amazon.de%2Fap%2Fmaplanding
openid.assoc_handle=amzn_audible_ios_de
openid.oa2.response_type=token
openid.mode=checkid_setup
openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0
openid.ns.oa2=http%3A%2F%2Fwww.amazon.com%2Fap%2Fext%2Foauth%2F2
openid.oa2.scope=device_auth_access
openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select
openid.oa2.client_id=device%3A35353941333736323738453243444538354145413742384436463542383543453235323841364236234132435A4A5A474C4B324A4A564D
openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0
Mai 01, 2022 5:37:05 PM org.openaudible.desktop.swt.manager.browser.jcef.ChromiumApp <init>
INFORMATION: Building ChromiumApp
Mai 01, 2022 5:37:05 PM org.openaudible.desktop.swt.manager.browser.jcef.ChromiumApp <init>
INFORMATION: jcefbundle:/home/felix/OpenAudible/tmp/jcef-bundle

Mai 01, 2022 5:37:05 PM org.openaudible.desktop.swt.manager.browser.jcef.ChromiumApp <init>
INFORMATION: builder.build
Mai 01, 2022 5:37:05 PM me.friwi.jcefmaven.impl.step.fetch.PackageDownloader downloadNatives
WARNUNG: Requesting from sonatype due to 401 from github
Mai 01, 2022 5:37:12 PM org.openaudible.desktop.swt.manager.browser.jcef.ChromiumApp <init>
INFORMATION: builder.built
Mai 01, 2022 5:37:24 PM org.openaudible.desktop.swt.manager.menu.CommandCenter execute
INFORMATION: Command: Console

felixg3 avatar May 01 '22 15:05 felixg3

It looks like it had a problem downloading the chromium bundle.. Is there a directory with a lot of chromium files at: /home/felix/OpenAudible/tmp/jcef-bundle ?

openaudible avatar May 01 '22 20:05 openaudible

Yes. For further troubleshooting, I deleted the cache and reinitialized the chromium/cef cache. No success. I tried again using the install4j installer, now it works. It might be related to both the RPM and AppImage version running in wayland mode, while the install4j is using xwayland.

While it's working now, it still seems worth investigating.

➜  ~ ls  /home/felix/OpenAudible/tmp/jcef-bundle
.rw-r--r--  413 felix  1 Mai 17:37 build_meta.json
.rwxr-xr-x 1,6M felix  1 Mai 17:37 chrome-sandbox
.rw-r--r-- 631k felix  1 Mai 17:37 chrome_100_percent.pak
.rw-r--r-- 944k felix  1 Mai 17:37 chrome_200_percent.pak
.rw-r--r-- 8,2k felix  1 Mai 17:37 gluegen.LICENSE.txt
.rw-r--r--  10M felix  1 Mai 17:37 icudtl.dat
.rw-r--r--    0 felix  1 Mai 17:37 install.lock
.rwxr-xr-x 1,0M felix  1 Mai 17:37 jcef_helper
.rw-r--r--  19k felix  1 Mai 17:37 jogl.LICENSE.txt
.rwxr-xr-x 186M felix  1 Mai 17:37 libcef.so
.rwxr-xr-x 3,0M felix  1 Mai 17:37 libEGL.so
.rwxr-xr-x  31M felix  1 Mai 17:37 libGLESv2.so
.rwxr-xr-x 1,8M felix  1 Mai 17:37 libjcef.so
.rw-r--r-- 1,7k felix  1 Mai 17:37 LICENSE.txt
drwxr-xr-x    - felix  1 Mai 17:37 locales
.rw-r--r--  491 felix  1 Mai 17:37 README.txt
.rw-r--r-- 6,6M felix  1 Mai 17:37 resources.pak
.rw-r--r--  49k felix  1 Mai 17:37 snapshot_blob.bin
drwxr-xr-x    - felix  1 Mai 17:37 swiftshader
.rw-r--r-- 165k felix  1 Mai 17:37 v8_context_snapshot.bin

felixg3 avatar May 03 '22 10:05 felixg3

There are a million varieties of linux and they don't all work. There are two browser systems available-- usually one or the other will work.. but it isn't easy to switch between the two. Glad you got the installer to work.

openaudible avatar May 03 '22 14:05 openaudible

@felixg3 Any chance you can provide instructions on how you fixed this please? Fedora 36 has the exact same issue.

kemra102 avatar Jun 01 '22 14:06 kemra102

SUSE the application quit during the setup process. So that seems confirmed.

I installed OpenAudible on Fedora 36 using virtual box (64bit Intel, 8gb/30gb) using the .sh installer and had no issues. Can you run from the command line using ./debug_linux.sh and report any errors? Does the application quit?

openaudible avatar Jun 01 '22 22:06 openaudible

One temporary fix is to run OpenAudible on Windows or Mac (or another Linux), connect to audible, then copy the credentials.json file to the linux machine having problems.

But working on the SUSE.

openaudible avatar Jun 02 '22 14:06 openaudible

I'm running:

Fedora 36 KDE Spin (x86_64 - Fedora don't provide i386 ISO any more) (https://spins.fedoraproject.org/kde/download/index.html) Hardware: Ryzen 1700 CPU, AMD Radeon RX 5700 XT GPU

@felixg3 mentioned Wayland above, this release does default to Wayland for the desktop over the previous default of X11. I can test later if switching to X11 still shows this problem.

Also I've tried both the Appimage and the RPM version and both show the same issue.

Here is the output of debug_linux.sh from launch to having the blank browser login window open up: https://pastebin.com/gGxi1T2i

kemra102 avatar Jun 02 '22 14:06 kemra102

OK I wasn't doing anything so I decided to try an X11 desktop session instead of the default Wayland and it works. So this is definitely something Wayland related.

kemra102 avatar Jun 02 '22 14:06 kemra102

@kemra102 Thanks for the link to ISO. Can try.

Don't know much about wayland vs. x11 so not sure how to turn one on or off.

Your error (InitializeSandbox() called with multiple threads in process gpu-process.) may be related to the GPU in the chromium browser, which I can probably disable if it makes everyone more stable.

Thanks

openaudible avatar Jun 02 '22 21:06 openaudible

OK.. Made a few changes that seem to have fixed the SUSE issue. Can't seem to run the fedora 36 iso on my virtualbox. https://openaudible.org/beta

openaudible avatar Jun 03 '22 20:06 openaudible

Still seeing the same issue on my side, debug output: https://pastebin.com/2jdUw9ST

kemra102 avatar Jun 03 '22 20:06 kemra102

Bummer. Can you try defining an environment variable:

set oa_browser=webkit (or set it under the ~/OpenAudible/settings.json browser:"webkit" )

openaudible avatar Jun 03 '22 20:06 openaudible

I set it both at the CLI as an environment variable and as an option in settings.json but no joy: https://pastebin.com/eh2ZB3hg

kemra102 avatar Jun 03 '22 20:06 kemra102

Bummer. Well, there is always the docker version.... https://github.com/openaudible/openaudible_docker

openaudible avatar Jun 05 '22 17:06 openaudible

@openaudible You are currently using an a bit older version of jcefmaven. In the mean time, there have been fixes to bound calculations that could affect the displaying of browser content, fixes to the downloading and bootstrapping of the chromium browser, fully implemented MacOSX support with code signatures and patched critical vulnerabilities in V8/Chromium (CVE-2022-1096 - type confusion in V8). [It is questionable whether you are affected, as you only load your own webapp and not external pages.]

FriwiDev avatar Jun 22 '22 23:06 FriwiDev

Hey thanks for looking. I'm using 95.7.14.3 and see there is a '100.0.14.2'. Will update and test. But yes, we typically just use this for linux users to load the audible login page.. as some versions of webkit crash on that particular page. Thanks for making your code available..

openaudible avatar Jun 23 '22 14:06 openaudible

Generally speaking, jcefmaven seems to be (surprisingly) relatively stable on all platforms. I did not receive any issue reports concerning the execution on any platform in the last 6 to 8 weeks. I have not yet encountered any crashes with it as you encountered with webkit. (Even though it can probably be crashed if you just try hard enough :D)

FriwiDev avatar Jun 23 '22 21:06 FriwiDev

The only report I received that sounds close is this one, but it is on MacOSX and JDK8: https://github.com/jcefmaven/jcefmaven/issues/49

@kemra102 Maybe you can run the jcef sample app on your machine, so we can test with a minimal setup whether the browser component is working for you? https://github.com/jcefmaven/jcefsampleapp/releases

FriwiDev avatar Jun 23 '22 21:06 FriwiDev

The sample app doesn't run but for probably unrelated reasons:

❯ java -jar ~/Downloads/jcefsampleapp-100.0.14.3-jar-with-dependencies.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-17-openjdk-17.0.3.0.7-2.fc36.x86_64/lib/libawt_xawt.so
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2393)
        at java.base/java.lang.Runtime.load0(Runtime.java:755)
        at java.base/java.lang.System.load(System.java:1953)
        at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
        at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
        at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:315)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:285)
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2398)
        at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
        at java.base/java.lang.System.loadLibrary(System.java:1989)
        at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1392)
        at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1390)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1389)
        at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1427)
        at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1401)
        at java.desktop/java.awt.Component.<clinit>(Component.java:624)

I've tried adding the CLI options detailed here but I still get the same error.

kemra102 avatar Jun 24 '22 09:06 kemra102

Similar or same problem on Arch (current): Application crashes regardless of browser setting while trying to open the browser.

language=de-DE
pageId=amzn_audible_ios
openid.return_to=https%3A%2F%2Fwww.amazon.de%2Fap%2Fmaplanding
openid.assoc_handle=amzn_audible_ios_de
openid.oa2.response_type=token
openid.mode=checkid_setup
openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0
openid.ns.oa2=http%3A%2F%2Fwww.amazon.com%2Fap%2Fext%2Foauth%2F2
openid.oa2.scope=device_auth_access
openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select
openid.oa2.client_id=deviceXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0
Aug. 01, 2022 4:23:15 PM org.openaudible.Directories getPrefs
INFORMATION: Loading /home/tho/OpenAudible/settings.json exists=true size=558
Aug. 01, 2022 4:23:15 PM org.openaudible.Directories getPrefs
INFORMATION: loaded settings 1659362979356
Aug. 01, 2022 4:23:15 PM org.openaudible.desktop.swt.manager.browser.swt.AudibleBrowser createBrowser
INFORMATION: creating browser of type: SWT.WEBKIT
[1]    801625 IOT instruction (core dumped)  java -jar openaudible_gtk_x86_64.jar


I anticipated the above question and tried (sucessfully!) the jcef sample app

Please consider reporting back whether this build worked on your platform or not. To report back, follow these 3 (1/2) easy steps (it will take ~1 minute): 1) Check if everything is working 2) Go to https://github.com/jcefmaven/jcefmaven/issues/new?assignees=&labels=test+report&template=report_artifact_working.md&title=%5BTR%5D+Test+report 3) Paste the following report as the issue text. Replace <Y/N> under "Working?" with Y or N. 4) If the build did not work, make sure to add debug info like console output or screenshots below.

Test report generated by JCefSampleApp
**Tag**
100.0.14.3

**OS (linux/windows/macosx)**
linux

**Version/Flavor (e.g. Ubuntu 20.04, Windows 10, Big Sur)**
"Arch Linux" (5.18.12-arch1-1)

**Arch (amd64/i386/arm64/arm)**
amd64

**Report as working? (Y/N)**
Y

**Did you test with the official sample app? (Y/N)**
Y

**Additional information**

Same crash happens with AppImage, only without logs. Version is the new 3.5.8.

the-cleaner avatar Aug 01 '22 14:08 the-cleaner

Marking as known and unsolved. Will keep updating libraries as they are released.

openaudible avatar Oct 16 '22 01:10 openaudible