WordRider Home
Welcome! Log In Create A New Profile

Advanced

Java IllegalArgumentException:Empty command on Linux

Java IllegalArgumentException:Empty command on Linux
November 06, 2021 05:37PM
Problem: Downloading a CAPTCHA-protected file from Uloz.to is not possible due to a java.lang.IllegalArgumentException: Empty command.
The issue only happens on Linux, and I never had problems with my Java distribution before. Its version, as well as other debug information, is located in the attached file.
I am using FreeRapid 0.9u4, I will try the 1.0beta version and post the result.

(As the author is Czech, so is my system localisation and the attached file smileys with beer)
Attachments:
open | download - Soupis relevantních informací k chybě FRD.txt (41.7 KB)
Addition: Java IllegalArgumentException:Empty command on Linux
November 06, 2021 05:42PM
The issue sadly happens in version 1.0beta as well, and is about a month old. I donated a few days ago so that you get paid something for resolving the issue.
Re: Addition: Java IllegalArgumentException:Empty command on Linux
November 06, 2021 05:47PM
...and just now I got this error on 1.0beta when downloading a Vimeo video:
Sat Nov 06 18:44:46 CET 2021 SEVERE: 
java.lang.NoSuchMethodError: cz.vity.freerapid.plugins.webclient.utils.JsonMapper.getObjectMapper()Lorg/codehaus/jackson/map/ObjectMapper;
	at cz.vity.freerapid.plugins.services.vimeo.VimeoFileRunner.getSelectedVideo(Unknown Source)
	at cz.vity.freerapid.plugins.services.vimeo.VimeoFileRunner.run(Unknown Source)
	at cz.vity.freerapid.plugins.webclient.AbstractFileShareService.run(AbstractFileShareService.java:106)
	at cz.vity.freerapid.core.tasks.DownloadTask.doInBackground(DownloadTask.java:98)
	at cz.vity.freerapid.core.tasks.DownloadTask.doInBackground(DownloadTask.java:42)
	at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at javax.swing.SwingWorker.run(SwingWorker.java:334)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Sat Nov 06 18:44:46 CET 2021 SEVERE: Uncaught exception on EDT. 
java.lang.IllegalArgumentException: Empty command
	at java.lang.Runtime.exec(Runtime.java:445)
	at java.lang.Runtime.exec(Runtime.java:348)
	at cz.vity.freerapid.utilities.os.AbstractSystemCommander.runCommandAsScanner(AbstractSystemCommander.java:14)
	at cz.vity.freerapid.utilities.os.AbstractSystemCommander.getTopLevelWindowsList(AbstractSystemCommander.java:47)
	at cz.vity.freerapid.utilities.os.UnixCommander.getTopLevelWindowsList(UnixCommander.java:149)
	at cz.vity.freerapid.core.QuietMode.findWindow(QuietMode.java:55)
	at cz.vity.freerapid.core.QuietMode.isActive(QuietMode.java:46)
	at cz.vity.freerapid.utilities.Sound.playSound(Sound.java:58)
	at cz.vity.freerapid.utilities.Sound.playSound(Sound.java:54)
	at cz.vity.freerapid.core.tasks.DownloadTask.error(DownloadTask.java:423)
	at cz.vity.freerapid.core.tasks.DownloadTask.failed(DownloadTask.java:365)
	at org.jdesktop.application.Task$StatePCL$1.run(Task.java:1017)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	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.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	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)
Re: Addition: Java IllegalArgumentException:Empty command on Linux
November 06, 2021 05:52PM
One more thing: my Java vendor is indeed Oracle.
Property settings:
    awt.toolkit = sun.awt.X11.XToolkit
    file.encoding = UTF-8
    file.encoding.pkg = sun.io
    file.separator = /
    java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
    java.awt.printerjob = sun.print.PSPrinterJob
    java.class.path = .
    java.class.version = 52.0
    java.endorsed.dirs = /usr/local/java/jre1.8.0_281/lib/endorsed
    java.ext.dirs = /usr/local/java/jre1.8.0_281/lib/ext
        /usr/java/packages/lib/ext
    java.home = /usr/local/java/jre1.8.0_281
    java.io.tmpdir = /tmp
    java.library.path = /usr/java/packages/lib/amd64
        /usr/lib64
        /lib64
        /lib
        /usr/lib
    java.runtime.name = Java(TM) SE Runtime Environment
    java.runtime.version = 1.8.0_281-b09
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Oracle Corporation
    java.specification.version = 1.8
    java.vendor = Oracle Corporation
    java.vendor.url = [java.oracle.com]
    java.vendor.url.bug = [bugreport.sun.com]
    java.version = 1.8.0_281
    java.vm.info = mixed mode
    java.vm.name = Java HotSpot(TM) 64-Bit Server VM
    java.vm.specification.name = Java Virtual Machine Specification
    java.vm.specification.vendor = Oracle Corporation
    java.vm.specification.version = 1.8
    java.vm.vendor = Oracle Corporation
    java.vm.version = 25.281-b09
    line.separator = \n 
    os.arch = amd64
    os.name = Linux
    os.version = 5.8.0-63-generic
    path.separator = :
    sun.arch.data.model = 64
    sun.boot.class.path = /usr/local/java/jre1.8.0_281/lib/resources.jar
        /usr/local/java/jre1.8.0_281/lib/rt.jar
        /usr/local/java/jre1.8.0_281/lib/sunrsasign.jar
        /usr/local/java/jre1.8.0_281/lib/jsse.jar
        /usr/local/java/jre1.8.0_281/lib/jce.jar
        /usr/local/java/jre1.8.0_281/lib/charsets.jar
        /usr/local/java/jre1.8.0_281/lib/jfr.jar
        /usr/local/java/jre1.8.0_281/classes
    sun.boot.library.path = /usr/local/java/jre1.8.0_281/lib/amd64
    sun.cpu.endian = little
    sun.cpu.isalist = 
    sun.io.unicode.encoding = UnicodeLittle
    sun.java.launcher = SUN_STANDARD
    sun.jnu.encoding = UTF-8
    sun.management.compiler = HotSpot 64-Bit Tiered Compilers
    sun.os.patch.level = unknown
    user.country = CZ
    user.dir = /home/chaoticneutralczech/Downloads/FreeRapid-0.9u4
    user.home = /home/chaoticneutralczech
    user.language = cs
    user.name = chaoticneutralczech
    user.timezone = 
Re: Java IllegalArgumentException:Empty command on Linux
November 06, 2021 11:35PM
This seems to have something to do with the Quiet Mode feature, which requires you to configure the "list_top_windows" command at the bottom of syscmd.properties before it can work on Linux. I'm not sure why it doesn't fail more gracefully though. I think you can also just disable Quiet Mode somewhere in Preferences?



Edited 1 time(s). Last edit at 11/06/2021 11:35PM by ntoskrnl.
Re: Java IllegalArgumentException:Empty command on Linux
November 11, 2021 10:58PM
I can't access the machine now so in the meantime, I tried running FreeRapid on another Linux PC. This time, regardless of Quiet Mode, I cannot install plugin updates, which is neccessary to try to reproduce the bug. Is this issue related?
(Edit: No, it isn't. It was caused by using a wrong combination of FreeRapid and Java versions.)

I managed to reproduce the issue, see below.



Edited 1 time(s). Last edit at 11/15/2021 02:14PM by ChaoticNeutralCzech.
Re: Java IllegalArgumentException:Empty command on Linux
November 11, 2021 11:10PM
You have to use 1.0 beta to get it working with Java >=11 .
[wordrider.net]

-------------------------------------

Re: Java IllegalArgumentException:Empty command on Linux
November 15, 2021 10:55AM
Thank you, I deleted the report of the issue as it is now irrelevant. Now, let's focus on the application (both version 0.9u4 and 1.0beta) crashing when:

- Quiet Mode is enabled
- Preferences/Alerts/Quiet Mode/Quiet Mode activation is set to Active when enabled and any of the specified windows are found
- A CAPTCHA prompt is about to be displayed.

I did not find any other settings that influence if FreeRapid crashes. Also, VLC being open or closed does not affect the issue.
Re: Java IllegalArgumentException:Empty command on Linux
November 15, 2021 02:54PM
In that case, when the captcha window is about to be displayed, FRD will attempt to run the command defined in "list_top_windows" at the bottom of syscmd.properties to list all open windows to determine if any of the specified windows are open. This command is empty by default (because the appropriate command depends on which desktop environment you have). This results in IllegalArgumentException: Empty command. FRD should probably catch this issue and fail more gracefully, and not fail with the uncaught exception, but it does not for now.



Edited 1 time(s). Last edit at 11/15/2021 02:55PM by ntoskrnl.
Sorry, only registered users may post in this forum.

Click here to login