jlesage / docker-jdownloader-2

Docker container for JDownloader 2
MIT License
760 stars 71 forks source link

[Feature request] Update Alpine base image #212

Open skycaptain opened 1 month ago

skycaptain commented 1 month ago

Idea

To solve Captchas, I install Chromium inside the container using INSTALL_PACKAGE="chromium". However, the current version of the image is based on Alpine 3.16, which includes Chromium 102.0.5005.182-r0. This version is too old to install the MyJDownloader extension from the Chrome Web Store, which is required to solve Captchas.

It would be ideal to rebase this image to a more recent version of Alpine. I have successfully tested Alpine 3.19, which includes Chromium 124.0.6367.78-r0. Rebasing the image to Alpine 3.19 was straightforward (using alpine-3.19-v4.5.3 as the base image and alpine:3.19 as the jd2 base image).

mihawk90 commented 1 month ago

Should be noted that 3.16 is also EOL.


That aside, I tried doing the same, but I cannot get Chromium to open (neither Firefox). I set ["/usr/bin/chromium-browser", "%s"] (also tried with --kiosk) in the Browser Commandline for both General Settings as well as the CaptchaSolver, and nothing happens on Captchas or even when Opening the Online Help. Also tried with Firefox, it's throwing a "Your Firefox profile cannot be loaded. It may be missing or inaccessible." at me, and passing --profile (to a sub-directory of the downloads directory, which is writable) doesn't get rid of it either.

skycaptain commented 1 month ago

To start Chromium, I set --no-sandbox. This is required because AFAIK Jdownloader runs as the root user and therefore starts subprocesses as root as well. Additionally, there's an issue with the 4.6.x base images where the display freezes shortly after launching Chromium (see #211). That's why I downgraded to 4.5.3 until this is fixed. With this version, Chromium worked perfectly fine and smooth until the Chrome Web Store deprecated it. I couldn't get Firefox to run either, which is why I use Chromium.

mihawk90 commented 1 month ago

Heh, I just found it in your other issue as well. Thanks for the response anyway though!

Can't get the same to work for Firefox though as you said. Starting it on a command-line in the container actually results in an error regarding root.

Although in my case on TrueNAS at least JD shouldn't be running as root (runs as the apps user by default using PUID).

mihawk90 commented 1 month ago

This version is too old to install the MyJDownloader extension from the Chrome Web Store

Ugh OK... so, it took me a while but I was wondering about that earlier. Chromium 102 released in May 2022 while the Extension was last updated in June 2021, soooo yeah, Chromium being "too old" for the extension didn't really make sense. I guess Google just really doesn't like old Chromium versions (which is understandable).

But anyway, you can still install the extension manually. Unfortunately for some reason I had a hard time finding a simple command line program to unpack the damn thing, but I ended up using crxextractor and that worked like a charm. After unpacking the zip file you need to delete the _metadata directory because otherwise Chrome complains that it's a reserved directory, but other then that the manual install worked just fine (despite showing 4 syntax errors?).


Hope that helps, although obviously that shouldn't be a long-term solution :)

FaySmash commented 1 month ago

The last version of ffmpeg for Alpine 3.16 is also 5.0.3 which is now too old for some actions.

FaySmash commented 1 month ago

I just hope it's gonna get merged https://github.com/jlesage/docker-jdownloader-2/pull/214

jlesage commented 3 weeks ago

Note that installing a browser inside the container is not needed. The usage of MyJDownloader with its browser extension is what most people are using to solve captchas.

mihawk90 commented 3 weeks ago

For me it's not required anymore either since (and I don't know what jD is doing for this to be different) ddownload serves reCaptchas to jD, and those work just fine with 9kw (which I've been using forever). pyload and the website only serve hCaptcha and 9kw doesn't seem to support them properly yet (they are never served to solvers as of the time of this writing, supposedly a change is coming).