{"record":{"id":"03dd3938c72bc9f6","repo":"ungoogled-software/ungoogled-chromium","slug":"winrar-command-returned-s","errorCode":null,"errorMessage":"WinRAR command returned %s","messagePattern":"WinRAR command returned (.+?)","errorType":"exception","errorClass":"ChildProcessError","httpStatus":null,"severity":"error","filePath":"utils/_extraction.py","lineNumber":136,"sourceCode":"    result = subprocess.run(cmd, check=False)\n    if result.returncode != 0:\n        get_logger().error('tar command returned %s', result.returncode)\n        raise ChildProcessError()\n\n    # for gnu tar, the --transform option could be used. but to keep compatibility with\n    # bsdtar on macos, we just do this ourselves\n    _process_relative_to(output_dir, relative_to)\n\n\ndef _extract_tar_with_winrar(binary, archive_path, output_dir, relative_to):\n    get_logger().debug('Using WinRAR extractor')\n    output_dir.mkdir(exist_ok=True)\n    cmd = (binary, 'x', '-o+', str(archive_path), str(output_dir))\n    get_logger().debug('WinRAR command line: %s', ' '.join(cmd))\n    result = subprocess.run(cmd, check=False)\n    if result.returncode != 0:\n        get_logger().error('WinRAR command returned %s', result.returncode)\n        raise ChildProcessError()\n\n    _process_relative_to(output_dir, relative_to)\n\n\ndef _extract_tar_with_python(archive_path, output_dir, relative_to):\n    get_logger().debug('Using pure Python tar extractor')\n\n    class NoAppendList(list):\n        \"\"\"Hack to workaround memory issues with large tar files\"\"\"\n\n        def append(self, obj):\n            pass\n\n    # Simple hack to check if symlinks are supported\n    symlink_supported = False\n    try:\n        os.symlink('', '')\n    except FileNotFoundError:","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/ungoogled-software/ungoogled-chromium/blob/f85e84a480e2e17c103de7013de94320f9a2ba39/utils/_extraction.py#L118-L154","documentation":"_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.","triggerScenarios":"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.","commonSituations":"WinRAR evaluation expired so the GUI nag interrupts batch mode, archive password-protected, or path contains characters WinRAR mishandles.","solutions":["Run the exact WinRAR command line manually and check its exit code / messages","Buy/activate a WinRAR license or switch extractors to 7z/tar","Verify the archive is not password-protected or corrupt","Confirm output_dir exists and is writable"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import shutil\nif not shutil.which(winrar_cmd):\n    raise RuntimeError('WinRAR not available; choose another extractor')","typeGuard":null,"tryCatchPattern":"try:\n    extract_with_winrar(archive, out, relative_to=rel)\nexcept ChildProcessError:\n    logger.exception('WinRAR extraction failed; falling back')\n    extract_with_7z(archive, out, relative_to=rel)","preventionTips":["Ensure WinRAR is licensed (expired trial breaks automation)","Prefer 7z or tar extractors in automated environments","Check archive is not password-protected","Run the WinRAR command once manually to verify exit codes"],"tags":["subprocess","archive-extraction","winrar","nonzero-exit"],"backgroundTag":"extractor-nonzero-exit-code","analyzedSha":"f85e84a480e2e17c103de7013de94320f9a2ba39","analyzedAt":"2026-08-29T10:07:17.606Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}