{"record":{"id":"391abfd30e362e16","repo":"XX-net/XX-Net","slug":"download-xxnet-zip-fail-s","errorCode":null,"errorMessage":"download xxnet zip fail:%s","messagePattern":"download xxnet zip fail:(.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"code/default/launcher/update_from_github.py","lineNumber":288,"sourceCode":"\n    except Exception as e:\n        xlog.warn(\"update overwrite fail:%r\", e)\n        progress[\"update_status\"] = \"Overwrite Fail:%r\" % e\n        raise e\n    xlog.info(\"update file finished.\")\n\n\ndef download_overwrite_new_version(xxnet_version, checkhash=1):\n    global update_progress\n\n    xxnet_url = 'https://codeload.github.com/XX-net/XX-Net/zip/%s' % xxnet_version\n    xxnet_zip_file = os.path.join(download_path, \"XX-Net-%s.zip\" % xxnet_version)\n    xxnet_unzip_path = os.path.join(download_path, \"XX-Net-%s\" % xxnet_version)\n\n    progress[\"update_status\"] = \"Downloading %s\" % xxnet_url\n    if not download_file(xxnet_url, xxnet_zip_file):\n        progress[\"update_status\"] = \"Download Fail.\"\n        raise Exception(\"download xxnet zip fail:%s\" % xxnet_zip_file)\n\n    if checkhash:\n        hash_sum = get_hash_sum(xxnet_version)\n        if len(hash_sum) and hash_file_sum(xxnet_zip_file) != hash_sum:\n            progress[\"update_status\"] = \"Download Checksum Fail.\"\n            xlog.warn(\"downloaded xxnet zip checksum fail:%s\" % xxnet_zip_file)\n            raise Exception(\"downloaded xxnet zip checksum fail:%s\" % xxnet_zip_file)\n    else:\n        xlog.debug(\"skip checking downloaded file hash\")\n\n    xlog.info(\"update download %s finished.\", download_path)\n\n    xlog.info(\"update start unzip\")\n    progress[\"update_status\"] = \"Unziping\"\n    try:\n        with zipfile.ZipFile(xxnet_zip_file, \"r\") as dz:\n            dz.extractall(download_path)\n            dz.close()","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/launcher/update_from_github.py#L270-L306","documentation":"Exception raised in download_overwrite_new_version when download_file fails to fetch the XX-Net release zip (https://github.com/XX-net/XX-Net/releases/download/.../XX-Net-<version>.zip). Progress status is set to 'Download Fail.' and the zip path is embedded in the message. Like error 17, download_file returns False on any internal error and this is the surfaced failure.","triggerScenarios":"update_version -> download_overwrite_new_version when the large release zip download fails mid-way (timeout, reset, proxy error) or the release URL is unavailable.","commonSituations":"GitHub release downloads blocked/throttled, connection reset on multi-MB transfers, release asset renamed/removed for that version tag, insufficient disk space.","solutions":["Retry the update; partial zips are re-downloaded from scratch","Verify the release URL exists for that version (open in browser)","Use a proxy or mirror for github.com release downloads","Free disk space in the download directory; large zips need room for zip + unzip"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"import os\ndef can_update(download_dir, version):\n    zip_path = os.path.join(download_dir, 'XX-Net-%s.zip' % version)\n    return os.access(download_dir, os.W_OK) and free_bytes(download_dir) > 500*1024*1024","typeGuard":null,"tryCatchPattern":"try:\n    update_version(new_version)\nexcept Exception as e:\n    if 'download xxnet zip fail' in str(e):\n        remove_partial_zip(download_path)\n        update_version(new_version)  # retry once\n    else:\n        raise","preventionTips":["Ensure >500MB free disk space before updating","Remove partial zips before retrying so the download starts clean","Use a proxy/mirror for github.com release downloads in censored networks"],"tags":["launcher","update","github","download-failed"],"backgroundTag":"download-failed","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}