jackwener/OpenCLI · error · Error
未找到该候选人,请确认 uid 是否正确
Error message
未找到该候选人,请确认 uid 是否正确
What it means
`opencli boss resume` scans up to 5 chat-list pages (no greet-list check) via findFriendByUid; if the candidate is absent it throws '未找到该候选人,请确认 uid 是否正确'. Because it checks the chat list only, candidates present solely in the greet list are also reported as not found.
Source
Thrown at clis/boss/resume.js:36
description: 'BOSS直聘查看候选人简历(招聘端)',
domain: 'www.zhipin.com',
strategy: Strategy.COOKIE,
navigateBefore: false,
browser: true,
args: [
{ name: 'uid', required: true, positional: true, help: 'Encrypted UID of the candidate (from chatlist)' },
],
columns: [
'name', 'gender', 'age', 'experience', 'degree', 'active_time',
'work_history', 'education',
'job_chatting', 'expect',
],
func: async (page, kwargs) => {
requirePage(page);
await navigateToChat(page, 3);
const friend = await findFriendByUid(page, kwargs.uid, { maxPages: 5 });
if (!friend)
throw new Error('未找到该候选人,请确认 uid 是否正确');
const numericUid = friend.uid;
const clicked = await clickCandidateInList(page, numericUid);
if (!clicked) {
throw new Error('无法在聊天列表中找到该用户,请确认聊天列表中有此人');
}
await page.wait({ time: 2 });
// Scrape the right panel
const resumeInfo = await page.evaluate(`
(() => {
const container = document.querySelector('.base-info-single-container') || document.querySelector('.base-info-content');
if (!container) return { error: 'no container found' };
const nameEl = container.querySelector('.base-name');
const name = nameEl ? nameEl.textContent.trim() : '';
let gender = '';
const detailDiv = container.querySelector('.base-info-single-detial');
if (detailDiv) {View on GitHub (pinned to 49907e53dc)
Solutions
- Verify the uid from `opencli boss recommend` or the chat list and retry.
- Confirm the candidate has an actual chat-list entry (has been chatted) in the browser.
- Re-check the uid for typos/truncation.
- Re-greet/scroll the candidate into the recent chat list, then retry.
Example fix
// before opencli boss resume <greet-list-only-uid> // after opencli boss greet <uid> "你好" # establish chat entry first opencli boss resume <uid>
Defensive patterns
Strategy: try-catch
Validate before calling
const uid = args.uid;
if (!uid || typeof uid !== 'string' || uid.trim() === '') {
throw new Error('uid is required; obtain it from `opencli boss recommend`.');
} Type guard
function isValidUid(v) {
return typeof v === 'string' && v.trim().length > 0;
} Try / catch
try {
await run(['opencli', 'boss', 'resume', uid]);
} catch (e) {
if (e.message.includes('未找到该候选人')) {
console.error('Not in first 5 chat-list pages; verify uid and that the candidate has a chat entry.');
}
throw e;
} Prevention
- Only resume candidates who already appear in the chat list (have been chatted).
- Refresh uids per session via recommend.
- Check uid copy-paste integrity.
- For long lists, ensure the candidate is recent — resume scans at most 5 pages.
When it happens
Trigger: `opencli boss resume <uid>` with a uid not in the first 5 pages of the chat list: stale uid, typo, candidate only in greet list, chat deleted/archived, or candidate deeper than 5 pages.
Common situations: Fetching resumes for candidates from an old session; greeting candidates and immediately trying resume before they appear in the chat list; uid truncated by shell; very long chat lists exceeding the 5-page scan.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- 未找到该候选人
- 未找到该候选人,请确认 uid 是否正确(可从 recommend 命令获取)
- 未找到该候选人
- boss candidate search
- 无法在聊天列表中找到该用户,候选人可能不在当前列表中
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/d29b318ce6486186.
Report an issue: GitHub.