jackwener/OpenCLI · warning · EmptyResultError

No notes found. Ensure you are logged into creator.xiaohongs

Error message

No notes found. Ensure you are logged into creator.xiaohongshu.com and the account has published notes.

What it means

EmptyResultError from the creator-notes-summary command: fetchCreatorNotes returned an empty list, so there were no note rows to summarize. The library raises this instead of producing an empty table because it almost always means the session is not actually authenticated to creator.xiaohongshu.com or the account has no published notes.

Source

Thrown at clis/xiaohongshu/creator-notes-summary.js:65

cli({
    site: 'xiaohongshu',
    name: 'creator-notes-summary',
    access: 'read',
    description: '小红书最近笔记批量摘要 (列表 + 单篇关键数据汇总)',
    domain: 'creator.xiaohongshu.com',
    strategy: Strategy.COOKIE,
    browser: true,
    navigateBefore: false,
    args: [
        { name: 'limit', type: 'int', default: 3, help: 'Number of recent notes to summarize' },
        { name: 'timeout', type: 'int', required: false, default: 180, help: 'Max seconds for the overall command (default: 180)' },
    ],
    columns: ['rank', 'id', 'title', 'views', 'likes', 'collects', 'comments', 'shares', 'avg_view_time', 'rise_fans', 'top_source', 'top_interest', 'url'],
    func: async (page, kwargs) => {
        const limit = kwargs.limit || 3;
        const notes = await fetchCreatorNotes(page, limit);
        if (!notes.length) {
            throw new EmptyResultError('xiaohongshu creator-notes-summary', 'No notes found. Ensure you are logged into creator.xiaohongshu.com and the account has published notes.');
        }
        const results = [];
        for (const [index, note] of notes.entries()) {
            if (index > 0) {
                await page.wait({ time: 1 + Math.random() * 2 });
            }
            if (!note.id) {
                results.push({
                    rank: index + 1,
                    id: note.id,
                    title: note.title,
                    published_at: note.date,
                    views: String(note.views),
                    likes: String(note.likes),
                    collects: String(note.collects),
                    comments: String(note.comments),
                    shares: '',
                    avg_view_time: '',

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Open creator.xiaohongshu.com in the connected Chrome and confirm you are logged in and notes appear in the dashboard.
  2. Ensure the logged-in account actually has published notes; test with an account that does.
  3. Re-login and retry to refresh expired cookies.
  4. Check earlier log lines for capture/HTTP errors that explain why fetchCreatorNotes got zero rows.
  5. Verify kwargs.limit isn't 0/negative in your invocation.

Example fix

// before
const rows = await run('xiaohongshu creator-notes-summary', { limit: 3 });
// after
try {
  return await run('xiaohongshu creator-notes-summary', { limit: 3 });
} catch (e) {
  if (/No notes found/.test(e.message)) {
    await ensureCreatorDashboardLogin();
    return await run('xiaohongshu creator-notes-summary', { limit: 3 });
  }
  throw e;
}
Defensive patterns

Strategy: validation

Validate before calling

const limit = Number(kwargs.limit ?? 3);
if (!Number.isInteger(limit) || limit < 1) throw new Error('limit must be a positive integer');
if (!await isLoggedInCreatorXhs()) throw new Error('login required before creator-notes-summary');

Type guard

function isNonEmptyArray(v) {
  return Array.isArray(v) && v.length > 0;
}

Try / catch

try {
  return await run('xiaohongshu creator-notes-summary', { limit });
} catch (e) {
  if (/No notes found/.test(e.message)) {
    await ensureCreatorLogin();
    return await run('xiaohongshu creator-notes-summary', { limit });
  }
  throw e;
}

Prevention

When it happens

Trigger: The notes/analyze endpoint returned zero rows because the cookie session is logged out, the account has never published a note, or the dashboard filtered everything out (limit smaller than 1 after kwargs.limit override is fine, but zero captured rows always triggers).

Common situations: Cookie expired since last login; connected Chrome profile is the wrong one; brand-new creator account with no published notes; region/login-verification wall; earlier capture errors left notes empty.

Related errors


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