https://bugs.kde.org/show_bug.cgi?id=527736
Bug ID: 527736
Summary: Ark hides backend diagnostics and displays a
misleading generic error
Classification: Applications
Product: ark
Version First 25.04.3
Reported In:
Platform: openSUSE
OS: Linux
Status: REPORTED
Severity: minor
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
## DESCRIPTION
When Ark fails to list the contents of a split RAR archive using the `lsar`
backend, it displays the following message:
> The archive is empty or Ark could not open its content.
This issue was discovered while investigating a separate problem with `lsar`,
which Ark uses to list archive contents. On my openSUSE Leap 16.0 system,
`/etc/timezone` was an empty directory rather than a regular file. Renaming
this directory allowed Ark to list the contents of the same archive
successfully.
A separate issue has been reported to the `lsar` project:
[MacPaw/XADMaster#201](https://github.com/MacPaw/XADMaster/issues/201).
## STEPS TO REPRODUCE
1. On a system where `/etc/timezone` does not exist, create it as a directory:
```bash
sudo mkdir /etc/timezone
```
2. Open a terminal and launch Ark with debug logging enabled:
```bash
QT_LOGGING_RULES="ark.*=true" ark
```
3. Open a split RAR archive that can be listed successfully when
`/etc/timezone` is absent or renamed.
4. Observe that Ark fails to list the archive contents and displays the generic
error message.
## OBSERVED RESULT
Ark displays:
> The archive is empty or Ark could not open its content.
The terminal shows the following debug output:
```text
ark.kerfuffle: Successfully loaded plugin "kerfuffle_cliunarchiver"
ark.kerfuffle: Created archive instance
ark.kerfuffle: Created job instance
ark.kerfuffle: Executing "/usr/bin/lsar" QList("-json",
"/home/user/temp/rar/file.rar") within directory "/home/user/temp/rar"
ark.cliunarchiver: Process finished, exitcode: 0 exitstatus:
QProcess::NormalExit
ark.cliunarchiver: Could not parse json output: "garbage at the end of the
document"
ark.kerfuffle: Job finished, result: true, time: 173 ms
ark.part: Showing columns: QList()
```
Renaming the empty `/etc/timezone` directory makes Ark list the contents of the
same archive successfully.
## EXPECTED RESULT
Ark should either list the archive contents successfully or provide a useful
diagnostic explaining why the backend output could not be processed.
When the backend produces diagnostic output that may help explain the failure,
Ark should make that information available to the user or provide a clear
indication of the underlying problem, rather than displaying only a generic
message suggesting that the archive is empty or cannot be opened.
## SOFTWARE VERSIONS
- Operating System: openSUSE Leap 16.0
- Ark Version: 25.04.3
- KDE Plasma Version: 6.4.2
- KDE Frameworks Version: 6.16.0
- Qt Version: 6.9.1
- `unar` package version: 1.10.8-160000.2.2
- `lsar -version`: v1.10.7
## ADDITIONAL INFORMATION
The `lsar` backend emits the following diagnostic to standard error when
`/etc/timezone` is a directory:
```text
File NSData.m: 290. In readContentsOfFile Open (/etc/timezone) attempt failed -
not a regular file
```
Running `lsar -json` manually produces valid JSON on standard output and exits
with status code `0`. The diagnostic above is written to standard error.
I have reproduced the issue with more than one split RAR archive. I have not
established whether the diagnostic written to standard error directly causes
Ark's JSON parsing error.
The related `lsar` issue is tracked at
[MacPaw/XADMaster#201](https://github.com/MacPaw/XADMaster/issues/201).
--
You are receiving this mail because:
You are watching all bug changes.