{"record":{"id":"25a564acb29510e2","repo":"XX-net/XX-Net","slug":"update-version-s-fail-r","errorCode":null,"errorMessage":"update version %s fail:%r","messagePattern":"update version (.+?) fail:%r","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"code/default/launcher/update_from_github.py","lineNumber":412,"sourceCode":"\n    xlog.info(\"Exit old process...\")\n    os._exit(0)\n\n\ndef update_version(version, checkhash=1):\n    global update_progress, update_info\n    _update_info = update_info\n    update_info = \"\"\n    try:\n        download_overwrite_new_version(version, checkhash)\n\n        update_current_version(version)\n\n        progress[\"update_status\"] = \"Restarting\"\n        xlog.info(\"update try restart xxnet\")\n        restart_xxnet(version)\n    except Exception as e:\n        xlog.warn(\"update version %s fail:%r\", version, e)\n        update_info = _update_info\n\n\ndef start_update_version(version, checkhash=1):\n    if progress[\"update_status\"] != \"Idle\" and \"Fail\" not in progress[\"update_status\"]:\n        return progress[\"update_status\"]\n\n    progress[\"update_status\"] = \"Start update\"\n    th = threading.Thread(target=update_version, args=(version, checkhash), name=\"update_version\")\n    th.start()\n    return True\n\n\ndef cleanup():\n    def rm_paths(path_list):\n        del_fullpaths = []\n        for ps in path_list:\n            pt = os.path.join(top_path, ps)","sourceCodeStart":394,"sourceCodeEnd":430,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/launcher/update_from_github.py#L394-L430","documentation":"Top-level catch around the whole update_version flow (download, checksum, unzip, overwrite, update_current_version, restart). Any step raising lands here: status is set to '<previous status> Fail' style and the exception logged with the target version.","triggerScenarios":"Any of: zip download failure, checksum mismatch, unzip failure, overwrite file error, missing start.py, or restart_xxnet error, while updating to `version`.","commonSituations":"Same root causes as errors 122-127; the log line preceding this one identifies the actual failing step.","solutions":["Read the log lines immediately before this warning to find the real failing step (download/checksum/unzip/overwrite).","Fix that underlying cause (network, permissions, disk space).","Retry the update from the web UI after clearing the download directory.","Ensure XX-Net can restart itself (not running as a restricted service)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    update_version(v)\nexcept Exception:\n    log.exception('update pipeline failed for %s; status=%s', v, progress['update_status'])\n    progress['update_status'] = 'Idle'  # allow retry","preventionTips":["Read the first failing log line, not just this aggregate warning.","Pre-flight: disk space, permissions, GitHub reachability.","Keep the launcher able to restart itself."],"tags":["update","orchestration","pipeline"],"backgroundTag":"self-update-failed","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}