{"record":{"id":"5ce47e397cbd7772","repo":"jackwener/OpenCLI","slug":"xianyu-inbox-is-blocked-by-verification-or-risk-co","errorCode":null,"errorMessage":"Xianyu inbox is blocked by verification or risk control","messagePattern":"Xianyu inbox is blocked by verification or risk control","errorType":"error_code","errorClass":"AuthRequiredError","httpStatus":null,"severity":"error","filePath":"clis/xianyu/inbox.js","lineNumber":51,"sourceCode":"        const resolveIds = Boolean(kwargs['resolve-ids']);\n        let currentUrl = '';\n        if (page.getCurrentUrl) {\n            try {\n                currentUrl = await page.getCurrentUrl();\n            } catch {\n                currentUrl = '';\n            }\n        }\n        if (!/https:\\/\\/www\\.goofish\\.com\\/im\\b/.test(currentUrl)) {\n            await page.goto(buildInboxUrl());\n        }\n        await page.wait(4);\n        const payload = requireEvaluateObject(await page.evaluate(buildExtractInboxEvaluate(limit)), 'inbox');\n        if (payload?.requiresAuth) {\n            throw new AuthRequiredError('www.goofish.com', 'Xianyu inbox requires a logged-in browser session');\n        }\n        if (payload?.blocked) {\n            throw new AuthRequiredError('www.goofish.com', 'Xianyu inbox is blocked by verification or risk control');\n        }\n        if (!Array.isArray(payload.items)) {\n            throw new CommandExecutionError('Xianyu inbox returned malformed conversation list');\n        }\n        const items = payload.items;\n        if (!items.length) {\n            throw new EmptyResultError('xianyu inbox', 'No Xianyu inbox conversations were found');\n        }\n        let conversations = items.slice(0, limit);\n        if (unreadOnly) {\n            conversations = conversations.filter((item) => Boolean(item.unread));\n        }\n        if (resolveIds) {\n            for (const item of conversations) {\n                if (item.item_id && item.peer_user_id) continue;\n                const rowIndex = Number(item.row_index);\n                if (!Number.isInteger(rowIndex) || rowIndex < 0) continue;\n                requireClickResult(await page.evaluate(buildClickInboxConversationEvaluate(rowIndex)), 'inbox resolve-ids click');","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/xianyu/inbox.js#L33-L69","documentation":"An AuthRequiredError thrown when the injected page script detects risk-control/verification text (验证码, 安全验证, 异常访问 and mojibake variants) in the body of www.goofish.com/im. Goofish/Xianyu is serving a captcha or security-verification page instead of the inbox, so the command cannot scrape the conversation list and reports it as an access-block condition.","triggerScenarios":"Running 'xianyu inbox' when goofish.com's risk control has flagged the session: too-frequent scraping, requests from a datacenter/VPN IP, a suspicious cookie profile, or an account under review — the page body matches the blocked-pattern regex and blocked=true is returned.","commonSituations":"Polling the inbox in a tight loop from a server IP; running many parallel browser sessions against goofish; using a VPN/proxy flagged for abuse; account flagged after unusual activity (mass messaging).","solutions":["Solve the captcha/verification manually in the automation browser, then re-run the command","Switch to a residential IP or disable the VPN/proxy the browser is using","Slow down request rate — add delays/backoff between inbox polls and avoid parallel sessions","Wait it out: risk-control blocks are often temporary (minutes to hours)","If the account itself is restricted, resolve the restriction in the Xianyu app first"],"exampleFix":"// before (aggressive polling triggers risk control)\nsetInterval(() => runInbox(), 2000);\n// after\nasync function pollInbox() {\n  try { return await runInbox(); }\n  catch (e) {\n    if (String(e).includes('blocked by verification')) await sleep(5 * 60_000);\n    return pollInbox();\n  }\n}","handlingStrategy":"retry","validationCode":"null","typeGuard":"null","tryCatchPattern":"try {\n  const convos = await runInbox();\n} catch (e) {\n  if (String(e).includes('blocked by verification or risk control')) {\n    await sleep(backoffMs); // exponential backoff, minutes-scale\n    // optionally alert operator to solve the captcha manually\n  } else throw e;\n}","preventionTips":["Rate-limit inbox polls; use exponential backoff instead of fixed short intervals","Use a residential IP; avoid VPN/datacenter egress for goofish traffic","Avoid running many parallel browser sessions with the same account","If blocked, solve the verification manually in the automation browser before retrying"],"tags":["risk-control","captcha","rate-limiting","scraping"],"backgroundTag":"captcha-challenge","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}