jackwener/OpenCLI · error · Error
无法获取简历面板:
Error message
无法获取简历面板:
What it means
Thrown after the in-page evaluate() scrapes the resume panel; if the injected script returned an error property (selectors missing, page not loaded), the command surfaces it as '无法获取简历面板: <inner error>'. It means the right-hand resume panel DOM was not in the expected state when scraping ran.
Source
Thrown at clis/boss/resume.js:135
if (eduTimes[i]) parts.push(eduTimes[i]);
if (eduDetails[i]) parts.push(eduDetails[i]);
if (parts.length) education.push(parts.join(' '));
}
const positionContent = container.querySelector('.position-content');
let jobChatting = '', expect = '';
if (positionContent) {
const posNameEl = positionContent.querySelector('.position-name');
if (posNameEl) jobChatting = posNameEl.textContent.trim();
const expectEl = positionContent.querySelector('.position-item.expect .value');
if (expectEl) expect = expectEl.textContent.trim();
}
return { name, gender, age, experience, degree, activeTime, workHistory, education, jobChatting, expect };
})()
`);
if (resumeInfo.error) {
throw new Error('无法获取简历面板: ' + resumeInfo.error);
}
return [{
name: resumeInfo.name || friend.name || '',
gender: resumeInfo.gender || '',
age: resumeInfo.age || '',
experience: resumeInfo.experience || '',
degree: resumeInfo.degree || '',
active_time: resumeInfo.activeTime || '',
work_history: (resumeInfo.workHistory || []).join('\\n') || '(未获取到)',
education: (resumeInfo.education || []).join('\\n') || '(未获取到)',
job_chatting: resumeInfo.jobChatting || '',
expect: resumeInfo.expect || '',
}];
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Increase the wait after clicking the candidate (e.g. page.wait({ time: 5 })) or poll for '.base-info-content' before evaluating
- Re-run the command once — transient render delays are the most common cause
- Inspect the live page and update the scraped selectors if BOSS changed its DOM
- Verify the candidate's profile actually renders in the browser manually
- Check the inner error text appended after the colon to identify the specific scrape failure
Example fix
// before
const clicked = await clickCandidateInList(page, numericUid);
await page.wait({ time: 2 });
const resumeInfo = await page.evaluate(`...`);
// after
await clickCandidateInList(page, numericUid);
await page.waitForSelector('.base-info-content', { timeout: 10000 });
const resumeInfo = await page.evaluate(`...`); Defensive patterns
Strategy: try-catch
Try / catch
try {
const resume = await cli('boss', 'resume', { uid });
} catch (e) {
if (String(e.message).startsWith('无法获取简历面板')) {
await sleep(3000); // give the panel more time, retry once
return retryResume(uid);
}
throw e;
} Prevention
- Wait for '.base-info-content' to appear before scraping rather than relying on fixed waits
- Re-run once on transient render failures
- Watch for BOSS DOM changes and update selectors
- Use verbose mode to see which selector failed from the inner error
When it happens
Trigger: clickCandidateInList succeeded but the resume panel had not rendered yet (the fixed 2s wait was insufficient), BOSS changed its panel class names (.base-info-single-container / .base-info-content), or the click opened the wrong/empty view.
Common situations: Slow network or heavy page making 2 seconds insufficient; BOSS front-end redesign renaming CSS classes; candidate profile page layout differs (e.g. greeting overlay blocking render); running headless where lazy content never loads.
Related errors
- Dianping member page rendered but no user_id link found — st
- Google Scholar result cards were present but no rows could b
- google images returned an unexpected row shape.
- google images returned a result row without stable external
- Could not find logged-in user profile link. Are you logged i
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/65e8c33bb9002add.
Report an issue: GitHub.