{"record":{"id":"86f412e6294e6d5a","repo":"jackwener/OpenCLI","slug":"error-86f412","errorCode":null,"errorMessage":"无法在聊天列表中找到该用户，请确认聊天列表中有此人","messagePattern":"无法在聊天列表中找到该用户，请确认聊天列表中有此人","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"clis/boss/resume.js","lineNumber":40,"sourceCode":"    browser: true,\n    args: [\n        { name: 'uid', required: true, positional: true, help: 'Encrypted UID of the candidate (from chatlist)' },\n    ],\n    columns: [\n        'name', 'gender', 'age', 'experience', 'degree', 'active_time',\n        'work_history', 'education',\n        'job_chatting', 'expect',\n    ],\n    func: async (page, kwargs) => {\n        requirePage(page);\n        await navigateToChat(page, 3);\n        const friend = await findFriendByUid(page, kwargs.uid, { maxPages: 5 });\n        if (!friend)\n            throw new Error('未找到该候选人，请确认 uid 是否正确');\n        const numericUid = friend.uid;\n        const clicked = await clickCandidateInList(page, numericUid);\n        if (!clicked) {\n            throw new Error('无法在聊天列表中找到该用户，请确认聊天列表中有此人');\n        }\n        await page.wait({ time: 2 });\n        // Scrape the right panel\n        const resumeInfo = await page.evaluate(`\n      (() => {\n        const container = document.querySelector('.base-info-single-container') || document.querySelector('.base-info-content');\n        if (!container) return { error: 'no container found' };\n\n        const nameEl = container.querySelector('.base-name');\n        const name = nameEl ? nameEl.textContent.trim() : '';\n\n        let gender = '';\n        const detailDiv = container.querySelector('.base-info-single-detial');\n        if (detailDiv) {\n          const uses = detailDiv.querySelectorAll('use');\n          for (const u of uses) {\n            const href = u.getAttribute('xlink:href') || u.getAttribute('href') || '';\n            if (href.includes('icon-men')) { gender = '男'; break; }","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/boss/resume.js#L22-L58","documentation":"Thrown by the boss resume command when findFriendByUid found the candidate record by uid but clickCandidateInList could not locate and click that user in the visible chat list. The library throws because the right-panel resume scraper needs the candidate's chat opened first; without the click there is no resume panel to scrape. It is a UI-state error, not a data error.","triggerScenarios":"Calling boss resume with a uid that resolves in the friend index but whose chat entry is not present in the loaded chat list (list not scrolled to that entry, chat never initiated with that candidate, or candidate no longer appears in the conversation list).","commonSituations":"Developers resume-scraping a candidate who was contacted long ago and fell off the first pages of the chat list; candidates whose conversation was deleted; stale uids reused after the recruiter account changed; the chat list being filtered or still loading when the click is attempted.","solutions":["Confirm an actual chat/conversation exists with that candidate in the BOSS web app; resume scraping requires it","Send the candidate a message first (or use boss send) so they appear in the chat list, then retry","Verify the uid with findFriendByUid / candidate search and use the exact uid returned","Increase scrolling coverage (the helper scans up to maxPages: 5) by checking manually whether the candidate is deeper in the list","Re-check that the account is logged in and the chat list is fully rendered before running"],"exampleFix":"// before: scraping resume for a uid with no conversation\nawait cli('boss', 'resume', { uid: '12345678' });\n// after: ensure conversation exists first, then scrape\nconst friend = await findFriendByUid(page, uid, { maxPages: 5 });\nif (!friend) throw new Error('uid not found');\nif (!await clickCandidateInList(page, friend.uid)) {\n  // open chat programmatically or message the candidate first\n  await navigateToChat(page, 3);\n  await sendMessage(page, uid, 'hello');\n}\nconst resume = await cli('boss', 'resume', { uid });","handlingStrategy":"validation","validationCode":"const friend = await findFriendByUid(page, uid, { maxPages: 5 });\nif (!friend) throw new Error(`uid ${uid} not found; check the uid`);\n// optionally pre-check the chat list contains friend.uid before invoking resume","typeGuard":"function canClick(friend) {\n  return Boolean(friend && typeof friend.uid === 'string' && friend.uid.length > 0);\n}","tryCatchPattern":"try {\n  const resume = await cli('boss', 'resume', { uid });\n} catch (e) {\n  if (String(e.message).includes('无法在聊天列表中找到该用户')) {\n    // ensure conversation exists (send a message) or skip candidate\n    return null;\n  }\n  throw e;\n}","preventionTips":["Only scrape resumes for candidates you have an open conversation with","Freshly resolve uids with findFriendByUid instead of caching","Manually verify the chat list in the browser when a uid fails","Handle missing candidates gracefully in batch scripts"],"tags":["dom-click","ui-state","boss-zhipin"],"backgroundTag":"dom-element-not-clickable","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}