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

  1. Increase the wait after clicking the candidate (e.g. page.wait({ time: 5 })) or poll for '.base-info-content' before evaluating
  2. Re-run the command once — transient render delays are the most common cause
  3. Inspect the live page and update the scraped selectors if BOSS changed its DOM
  4. Verify the candidate's profile actually renders in the browser manually
  5. 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

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


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/65e8c33bb9002add. Report an issue: GitHub.