{"record":{"id":"82f930eea7651609","repo":"XX-net/XX-Net","slug":"time-out-82f930","errorCode":null,"errorMessage":"time out","messagePattern":"time out","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"code/default/launcher/update_from_github.py","lineNumber":114,"sourceCode":"        try:\n            xlog.info(\"download %s to %s, retry:%d\", url, filename, i)\n            req = request(url, i, timeout=120)\n            if not req:\n                continue\n\n            start_time = time.time()\n            timeout = 300\n\n            if req.chunked:\n                # don't known the file size, set to large for show the progress\n                progress[url][\"size\"] = 20 * 1024 * 1024\n\n                downloaded = 0\n                with open(filename, 'wb') as fp:\n                    while global_var.running:\n                        time_left = timeout - (time.time() - start_time)\n                        if time_left < 0:\n                            raise Exception(\"time out\")\n\n                        dat = req.read(timeout=time_left)\n                        if not dat:\n                            break\n\n                        fp.write(dat)\n                        downloaded += len(dat)\n                        progress[url][\"downloaded\"] = downloaded\n\n                progress[url][\"status\"] = \"finished\"\n                return True\n            else:\n                file_size = progress[url][\"size\"] = int(req.getheader(b'Content-Length', 0))\n\n                left = file_size\n                downloaded = 0\n                with open(filename, 'wb') as fp:\n                    while global_var.running:","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/launcher/update_from_github.py#L96-L132","documentation":"Timeout exception from update_from_github.download_file: while global_var.running, if timeout - elapsed < 0 the download of a GitHub file (version manifest or release zip) aborts with Exception('time out'). Used by get_github_versions and download_overwrite_new_version for the auto-updater.","triggerScenarios":"Auto-update flow downloading update_v5.txt or the XX-Net release zip when GitHub is slow/blocked and the deadline expires; stalling connections also trigger it once the budget is spent.","commonSituations":"GitHub access blocked or throttled (GFW), release zip is tens of MB and timeout too small, flaky Wi-Fi during update.","solutions":["Retry the update later; transient GitHub slowness is the most common cause","Increase the timeout argument to download_file","Configure a proxy for GitHub access in launcher settings","Download the release zip manually and update offline if updates keep failing"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    versions = get_github_versions()\nexcept Exception as e:\n    if 'time out' in str(e):\n        time.sleep(60)\n        versions = get_github_versions()\n    else:\n        raise","preventionTips":["Don't trigger auto-update on a metered/throttled connection","Increase the update download timeout in launcher settings if customizable","Disable auto-update and update manually when GitHub is consistently slow"],"tags":["launcher","update","github","timeout"],"backgroundTag":"download-timeout","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}