ungoogled-software/ungoogled-chromium · error · ChildProcessError

WinRAR command returned %s

Error message

WinRAR command returned %s

What it means

_extract_tar_with_winrar invokes WinRAR with 'x -o+'; a non-zero return code is logged and raised as ChildProcessError. WinRAR could not extract the archive.

Source

Thrown at utils/_extraction.py:136

    result = subprocess.run(cmd, check=False)
    if result.returncode != 0:
        get_logger().error('tar command returned %s', result.returncode)
        raise ChildProcessError()

    # for gnu tar, the --transform option could be used. but to keep compatibility with
    # bsdtar on macos, we just do this ourselves
    _process_relative_to(output_dir, relative_to)


def _extract_tar_with_winrar(binary, archive_path, output_dir, relative_to):
    get_logger().debug('Using WinRAR extractor')
    output_dir.mkdir(exist_ok=True)
    cmd = (binary, 'x', '-o+', str(archive_path), str(output_dir))
    get_logger().debug('WinRAR command line: %s', ' '.join(cmd))
    result = subprocess.run(cmd, check=False)
    if result.returncode != 0:
        get_logger().error('WinRAR command returned %s', result.returncode)
        raise ChildProcessError()

    _process_relative_to(output_dir, relative_to)


def _extract_tar_with_python(archive_path, output_dir, relative_to):
    get_logger().debug('Using pure Python tar extractor')

    class NoAppendList(list):
        """Hack to workaround memory issues with large tar files"""

        def append(self, obj):
            pass

    # Simple hack to check if symlinks are supported
    symlink_supported = False
    try:
        os.symlink('', '')
    except FileNotFoundError:

View on GitHub (pinned to f85e84a480)

Solutions

  1. Run the exact WinRAR command line manually and check its exit code / messages
  2. Buy/activate a WinRAR license or switch extractors to 7z/tar
  3. Verify the archive is not password-protected or corrupt
  4. Confirm output_dir exists and is writable
Defensive patterns

Strategy: try-catch

Validate before calling

import shutil
if not shutil.which(winrar_cmd):
    raise RuntimeError('WinRAR not available; choose another extractor')

Try / catch

try:
    extract_with_winrar(archive, out, relative_to=rel)
except ChildProcessError:
    logger.exception('WinRAR extraction failed; falling back')
    extract_with_7z(archive, out, relative_to=rel)

Prevention

When it happens

Trigger: WinRAR not licensed/expired (trial nag blocks automation), corrupt archive, unsupported format, or output path problems; only reachable on Windows setups configured to use WinRAR.

Common situations: WinRAR evaluation expired so the GUI nag interrupts batch mode, archive password-protected, or path contains characters WinRAR mishandles.

Related errors


AI-assisted analysis of ungoogled-software/ungoogled-chromium@f85e84a480 (2026-08-29). Data as JSON: /api/errors/03dd3938c72bc9f6. Report an issue: GitHub.