{"record":{"id":"a8f1019626d814d8","repo":"XX-net/XX-Net","slug":"check-appid-s-r","errorCode":null,"errorMessage":"check_appid %s %r","messagePattern":"check_appid (.+?) %r","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"code/default/gae_proxy/local/web_control.py","lineNumber":83,"sourceCode":"\n    content = response.read()\n    if b\"GoAgent\" not in content:\n        # xlog.warn(\"app check %s content:%s\", appid, content)\n        return False\n\n    return True\n\n\ndef test_appid(appid):\n    for i in range(0, 3):\n        ssl_sock = direct_front.connect_manager.get_ssl_connection()\n        if not ssl_sock:\n            continue\n\n        try:\n            return test_appid_exist(ssl_sock, appid)\n        except Exception as e:\n            xlog.warn(\"check_appid %s %r\", appid, e)\n            continue\n\n    return False\n\n\ndef test_appids(appids):\n    appid_list = appids.split(\"|\")\n    fail_appid_list = []\n    for appid in appid_list:\n        if not test_appid(appid):\n            fail_appid_list.append(appid)\n        else:\n            # return success if one appid is work\n            # just reduce wait time\n            # here can be more ui friendly.\n            return []\n    return fail_appid_list\n","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/gae_proxy/local/web_control.py#L65-L101","documentation":"test_appid wraps test_appid_exist; any exception during the probe (SSL handshake failure, connection reset, timeout, response read error) is caught, logged with this warning, and the next IP/socket is tried. It means the probe itself blew up rather than returning a clean boolean.","triggerScenarios":"Establishing an SSL connection to Google IP fails mid-request, response.read() raises, or the appid check throws for network reasons while iterating candidate sockets.","commonSituations":"Unstable network to Google servers, IP blocking, TLS interception by a firewall, transient resets during appid testing at startup.","solutions":["Retry the test (transient network errors are common)","Check general connectivity to Google IPs; switch network or enable IPv6/other transport","Verify SSL/TLS works (no MITM proxy breaking cert chain)"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"for attempt in range(3):\n    try:\n        return test_appid(ssl_sock, appid)\n    except Exception as e:\n        xlog.warn('check_appid %s %r', appid, e)\n        time.sleep(1)","preventionTips":["Treat appid probes as flaky; retry with backoff","Test basic connectivity to Google IPs before probing appids"],"tags":["network","ssl","gae","appid"],"backgroundTag":"app-probe-connection-failed","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}