Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDownloader: cannot open links in firejailed Firefox #3579

Closed
ihasaquesion opened this issue Aug 9, 2020 · 7 comments
Closed

JDownloader: cannot open links in firejailed Firefox #3579

ihasaquesion opened this issue Aug 9, 2020 · 7 comments
Labels
duplicate This issue or pull request already exists question_old (Deprecated; use "needinfo" or "question" instead) Further information is requested sandbox-ipc Opening links and talking to programs outside of the sandbox (see #6462)

Comments

@ihasaquesion
Copy link

ihasaquesion commented Aug 9, 2020

When running JDownloader with firejail like so: firejail --profile=/etc/firejail/JDownloader.profile bash /path/JDownloader2/JDownloader2 I can't get it to open a webpage with a captcha in firejailed Firefox-ESR. It either launches it but it doesn't open a page and just closes again or nothing happens.

I used to get the error "Your Firefox profile cannot be loaded. It may be missing or inaccessible" and I might get it again when using an improved JDownloader.profile that allows Firefox-ESR. In that case I'd like to know how solve this problem without having to delete any Firefox profiles.

I used to use a workaround where I output the link to the captcha so that I can manually copy the link and open it in the firejailed Firefox-ESR by changing the Browser Commandline of the BrowserCaptchaSolver in the Advanced Settings of JDownloader2.

I'd like to get it to open the Webpage when clicking "Open Browser". Opening dlc/cnl files/links in JDownloader2 via firejailed Firefox work (while others do not but this could be a firewall issue).

This might also be a problem with JDownloader2 or Firefox-ESR.

Environment
firejail version 0.9.62

@rusty-snake rusty-snake added question_old (Deprecated; use "needinfo" or "question" instead) Further information is requested duplicate This issue or pull request already exists labels Aug 9, 2020
@rusty-snake
Copy link
Collaborator

Duplicate of #2336

@rusty-snake rusty-snake marked this as a duplicate of #2336 Aug 9, 2020
@rusty-snake
Copy link
Collaborator

see also #3471 (comment)

@ihasaquesion
Copy link
Author

ihasaquesion commented Aug 9, 2020

Thanks. The solution of #2336 was to add include chromium.profile to the profile.
The Browser Commandline setting under Advanced settings needed to be [ "firejail", "firefox-esr", "%s" ]
It doesn't seem to start another firejail instance but opens firefox directly without its profile (and also without installed addons). How to make it use firefox' firejail profile?

I often get this error after adding that line but sometimes it works:

An error has occurred during startup:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.jdownloader.update.launcher.JDLauncher.main(JDLauncher.java:82)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:62)
	at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jdownloader.update.launcher.JDLauncher.main(JDLauncher.java:78)
	... 6 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.appwork.utils.os.CrossSystem
	at org.appwork.utils.logging.LogFormatter.<init>(LogFormatter.java:57)
	at org.appwork.utils.logging2.LogConsoleHandler$1.<init>(LogConsoleHandler.java:54)
	at org.appwork.utils.logging2.LogConsoleHandler.<init>(LogConsoleHandler.java:54)
	at org.appwork.utils.logging2.LogSourceProvider.<init>(LogSourceProvider.java:137)
	at org.appwork.utils.logging2.extmanager.LoggerFactory.<init>(LoggerFactory.java:148)
	at org.appwork.utils.logging2.extmanager.LoggerFactory.initialize(LoggerFactory.java:128)
	at org.appwork.utils.logging2.extmanager.LoggerFactory.<clinit>(LoggerFactory.java:57)
	at org.appwork.utils.logging2.LogSourceRedirector.getDefaultLogger(LogSourceRedirector.java:64)
	at org.appwork.loggingv3.LogV3.info(LogV3.java:101)
	at org.appwork.utils.Application.setApplication(Application.java:881)
	at org.jdownloader.update.launcher.SecondLevelLauncher.<clinit>(SecondLevelLauncher.java:89)
	at org.jdownloader.update.launcher.JDLauncherViaClassLoader.main(JDLauncherViaClassLoader.java:10)
	... 11 more

Please also let me know how to allow it to run a specific executable under /usr/bin/ for a workaround until opening webpages with firefox works.

If I run it with --whitelist=/usr/bin/filename I get Error: invalid whitelist path /usr/bin/filename.

@rusty-snake
Copy link
Collaborator

Please also let me know how to allow it to run a specific executable under /usr/bin/ for a workaround until opening webpages with firefox works.

/usr/bin is not restricted in JDownloader.profile

@ihasaquesion
Copy link
Author

ihasaquesion commented Aug 13, 2020

/usr/bin is not restricted in JDownloader.profile

I can make JDownloader run a file in /usr/bin by changing [ "firejail", "firefox-esr", "%s" ] in the JDownloader settings when using the default firejail profile.
I can't do so when using the JDownloader.profile (running JDownloader with firejail --profile=/etc/firejail/JDownloader.profile bash /path/JDownloader2/JDownloader2) even when the file is set to noblacklist (I get an error when trying to whitelist it). It also doesn't work when moving the file into /path/JDownloader2/. (And that would only be the workaround.) I recently found out that not only does JDownloader not open a new tab in firejailed firefox-esr but in a new firefox-esr window without the firefox.profile - displaying the captcha also doesn't work even with the JDownloader addon.

@rusty-snake
Copy link
Collaborator

still need help?

@ihasaquesion
Copy link
Author

ihasaquesion commented Dec 3, 2020

Well, it didn't work with the captchas but now JDownloader2 doesn't start up at all (getting the error below):

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.jdownloader.updatev2.JDClassLoaderLauncher.main(JDClassLoaderLauncher.java:132)
	at org.jdownloader.update.launcher.JDLauncher.main(JDLauncher.java:8)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:62)
	at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jdownloader.updatev2.JDClassLoaderLauncher.main(JDClassLoaderLauncher.java:128)
	... 7 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.appwork.utils.os.CrossSystem
	at org.appwork.utils.logging.LogFormatter.<init>(LogFormatter.java:57)
	at org.appwork.utils.logging2.LogConsoleHandler$1.<init>(LogConsoleHandler.java:54)
	at org.appwork.utils.logging2.LogConsoleHandler.<init>(LogConsoleHandler.java:54)
	at org.appwork.utils.logging2.LogSourceProvider.<init>(LogSourceProvider.java:137)
	at org.appwork.utils.logging2.extmanager.LoggerFactory.<init>(LoggerFactory.java:148)
	at org.appwork.utils.logging2.extmanager.LoggerFactory.initialize(LoggerFactory.java:128)
	at org.appwork.utils.logging2.extmanager.LoggerFactory.<clinit>(LoggerFactory.java:57)
	at org.appwork.utils.logging2.LogSourceRedirector.getDefaultLogger(LogSourceRedirector.java:64)
	at org.appwork.loggingv3.LogV3.info(LogV3.java:101)
	at org.appwork.utils.Application.setApplication(Application.java:881)
	at org.jdownloader.update.launcher.SecondLevelLauncher.<clinit>(SecondLevelLauncher.java:85)
	at org.jdownloader.update.launcher.JDLauncherViaClassLoader.main(JDLauncherViaClassLoader.java:10)
	... 12 more

I could not find out why it's having this error and one forum post recommended reinstalling. Edit: now I also found this post according to which it may an ownership-issue - but this or other problems occurred during starting it up and used to get solved by just trying to start it a few more times.

Maybe this issue could be solved with comments in that Thunderbird issue. However, it looks like JDownloader2 isn't entirely open source so I'm switching to pyLoad (Persepolis is another good alternative).
I think as long as JD2 isn't verifiably fully open source and switching to pyLoad is possible this issue could be closed.

@kmk3 kmk3 changed the title How to open links in firejailed Firefox with firejailed JDownloader? JDownloader: cannot open links in firejailed Firefox Sep 4, 2024
@kmk3 kmk3 added the sandbox-ipc Opening links and talking to programs outside of the sandbox (see #6462) label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question_old (Deprecated; use "needinfo" or "question" instead) Further information is requested sandbox-ipc Opening links and talking to programs outside of the sandbox (see #6462)
Projects
None yet
Development

No branches or pull requests

3 participants