XX-net/XX-Net · error · Exception

download xxnet zip fail:%s

Error message

download xxnet zip fail:%s

What it means

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.

Source

Thrown at code/default/launcher/update_from_github.py:288

    except Exception as e:
        xlog.warn("update overwrite fail:%r", e)
        progress["update_status"] = "Overwrite Fail:%r" % e
        raise e
    xlog.info("update file finished.")


def download_overwrite_new_version(xxnet_version, checkhash=1):
    global update_progress

    xxnet_url = 'https://codeload.github.com/XX-net/XX-Net/zip/%s' % xxnet_version
    xxnet_zip_file = os.path.join(download_path, "XX-Net-%s.zip" % xxnet_version)
    xxnet_unzip_path = os.path.join(download_path, "XX-Net-%s" % xxnet_version)

    progress["update_status"] = "Downloading %s" % xxnet_url
    if not download_file(xxnet_url, xxnet_zip_file):
        progress["update_status"] = "Download Fail."
        raise Exception("download xxnet zip fail:%s" % xxnet_zip_file)

    if checkhash:
        hash_sum = get_hash_sum(xxnet_version)
        if len(hash_sum) and hash_file_sum(xxnet_zip_file) != hash_sum:
            progress["update_status"] = "Download Checksum Fail."
            xlog.warn("downloaded xxnet zip checksum fail:%s" % xxnet_zip_file)
            raise Exception("downloaded xxnet zip checksum fail:%s" % xxnet_zip_file)
    else:
        xlog.debug("skip checking downloaded file hash")

    xlog.info("update download %s finished.", download_path)

    xlog.info("update start unzip")
    progress["update_status"] = "Unziping"
    try:
        with zipfile.ZipFile(xxnet_zip_file, "r") as dz:
            dz.extractall(download_path)
            dz.close()

View on GitHub (pinned to cfa5bc17b6)

Solutions

  1. Retry the update; partial zips are re-downloaded from scratch
  2. Verify the release URL exists for that version (open in browser)
  3. Use a proxy or mirror for github.com release downloads
  4. Free disk space in the download directory; large zips need room for zip + unzip
Defensive patterns

Strategy: retry

Validate before calling

import os
def can_update(download_dir, version):
    zip_path = os.path.join(download_dir, 'XX-Net-%s.zip' % version)
    return os.access(download_dir, os.W_OK) and free_bytes(download_dir) > 500*1024*1024

Try / catch

try:
    update_version(new_version)
except Exception as e:
    if 'download xxnet zip fail' in str(e):
        remove_partial_zip(download_path)
        update_version(new_version)  # retry once
    else:
        raise

Prevention

When it happens

Trigger: 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.

Common situations: GitHub release downloads blocked/throttled, connection reset on multi-MB transfers, release asset renamed/removed for that version tag, insufficient disk space.

Related errors


AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27). Data as JSON: /api/errors/391abfd30e362e16. Report an issue: GitHub.