{"record":{"id":"ecd399ad1b82e702","repo":"XX-net/XX-Net","slug":"check-update-get-version-failed-e-r","errorCode":null,"errorMessage":"check_update get version failed. e:%r","messagePattern":"check_update get version failed\\. e:%r","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"code/default/launcher/update.py","lineNumber":279,"sourceCode":"    elif action == \"ignore\":\n        ignore_module(module, new_version)\n\n\ndef check_update():\n    try:\n        if update_from_github.update_info == \"dont-check\":\n            return\n\n        # check_push_update()  # server broken\n\n        update_rule = config.check_update\n        if update_rule not in (\"stable\", \"notice-stable\", \"test\", \"notice-test\"):\n            return\n\n        try:\n            versions = update_from_github.get_github_versions()\n        except Exception as e:\n            xlog.warn(\"check_update get version failed. e:%r\", e)\n            return\n\n        current_version = update_from_github.current_version()\n        test_version, stable_version = versions[0][1], versions[1][1]\n        if test_version != config.skip_test_version:\n            if update_rule == \"notice-test\":\n                if compare_versions(current_version, test_version) < 0:\n                    xlog.info(\"checked new test version %s\", test_version)\n                    update_from_github.update_info = '{\"type\":\"test\", \"version\":\"%s\"}' % test_version\n            elif update_rule == \"test\":\n                if compare_versions(current_version, test_version) < 0:\n                    xlog.info(\"update to test version %s\", test_version)\n                    update_from_github.update_version(test_version)\n        if stable_version != config.skip_stable_version:\n            if update_rule == \"notice-stable\":\n                if compare_versions(current_version, stable_version) < 0:\n                    xlog.info(\"checked new stable version %s\", stable_version)\n                    update_from_github.update_info = '{\"type\":\"stable\", \"version\":\"%s\"}' % stable_version","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/launcher/update.py#L261-L297","documentation":"check_update wraps update_from_github.get_github_versions() in try/except; any exception while fetching release info from GitHub (network error, DNS, non-200/JSON-decode failure) is logged and the update check silently returns.","triggerScenarios":"check_update called from update_check_loop, req_update_handler, or on_check_update when get_github_versions raises — typically an API request to github.com failing or returning unexpected content.","commonSituations":"GitHub unreachable from the user's region/network; TLS interception; GitHub API rate limiting or schema change breaking parsing; missing network before the proxy is up.","solutions":["Verify connectivity to api.github.com / github.com from the machine (curl -I https://github.com)","Configure a working proxy for the launcher (often required where GitHub is blocked) and retry check update","If behind rate limits, wait and retry later","Update the launcher, since manifest/API format changes are fixed in newer versions"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"def github_reachable(timeout=10):\n    import urllib.request\n    try:\n        urllib.request.urlopen('https://github.com', timeout=timeout)\n        return True\n    except Exception:\n        return False","typeGuard":null,"tryCatchPattern":"try:\n    versions = get_github_versions()\nexcept Exception as e:\n    log.warning('check_update failed: %r', e)\n    return None  # degrade gracefully, retry next cycle","preventionTips":["Configure a working proxy where GitHub is blocked","Retry update checks periodically instead of failing hard","Keep the launcher updated to track GitHub API changes"],"tags":["github","network","update-check"],"backgroundTag":"api-request-failed","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}