{"record":{"id":"0838d46372017765","repo":"XX-net/XX-Net","slug":"no-quota","errorCode":null,"errorMessage":"no quota","messagePattern":"no quota","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"code/default/x_tunnel/local/proxy_session.py","lineNumber":1288,"sourceCode":"    }\n\n    try:\n        center_login_process = True\n        if g.tls_relay_front:\n            g.tls_relay_front.set_x_tunnel_account(account, password)\n        if g.seley_front:\n            g.seley_front.set_x_tunnel_account(account, password)\n\n        res, info = call_api(login_path, req_info)\n        if not res:\n            return False, info\n\n        g.quota_list = info[\"quota_list\"]\n        g.quota = calculate_quota_left(g.quota_list)\n        g.paypal_button_id = info[\"paypal_button_id\"]\n        g.plans = info[\"plans\"]\n        if g.quota <= 0:\n            xlog.warn(\"no quota\")\n\n        if g.config.server_host:\n            xlog.info(\"use server:%s specify in config.\", g.config.server_host)\n            g.server_host = str(g.config.server_host)\n        elif update_server or not g.server_host:\n            g.server_host = str(info[\"host\"])\n            g.server_port = info[\"port\"]\n            xlog.info(\"update xt_server %s:%d\", g.server_host, g.server_port)\n\n        g.selectable = info[\"selectable\"]\n\n        if g.config.update_cloudflare_domains:\n            g.http_client.save_cloudflare_domain(info.get(\"cloudflare_domains\"))\n\n        g.promote_code = utils.to_str(info[\"promote_code\"])\n        g.promoter = info[\"promoter\"]\n        g.balance = info[\"balance\"]\n        g.openai_balance = info[\"openai_balance\"]","sourceCodeStart":1270,"sourceCodeEnd":1306,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/x_tunnel/local/proxy_session.py#L1270-L1306","documentation":"Warning printed by request_balance in x_tunnel when the account's remaining quota (calculated from the quota_list returned by the login/balance API) is less than or equal to zero. It is informational only — the function continues and updates host/plans — but signals that paid traffic for the x_tunnel account is exhausted.","triggerScenarios":"Calling request_balance (directly or via login_process, update_quota_loop, get_openai_proxy, req_token_login_handler, req_login_handler) when calculate_quota_left(g.quota_list) returns <= 0. This happens with an expired plan, fully consumed quota, or a new/unpaid account.","commonSituations":"Free-tier accounts after heavy use, subscription lapse, or using the wrong login_account/login_password in the config so the returned account has no active plan.","solutions":["Log in to the x_tunnel (XX-Net) provider dashboard and check the plan/quota for the account; top up or renew if exhausted.","Verify g.config.login_account and g.config.login_password match the account with an active plan.","Wait for quota reset (monthly plans) or switch to a different account.","If quota should be positive, re-run request_balance — the value may be stale after a server-side grant."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from x_tunnel.local import proxy_session as ps\nquota = ps.calculate_quota_left(ps.g.quota_list) if ps.g.quota_list else 0\nif quota <= 0:\n    # skip x_tunnel path, fall back to direct or another proxy\n    use_x_tunnel = False","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check quota before routing traffic into x_tunnel.","Set up monitoring on the account dashboard with quota alerts.","Renew plans before expiry; keep a fallback proxy configured."],"tags":["x-tunnel","quota","account","billing","login"],"backgroundTag":"quota-exhausted","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}