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 command: fetchCreatorNotes returned nothing (or a non-array), so there are no note rows to rank and output. Like the summary variant, the library fails loudly instead of emitting an empty table, because zero rows nearly always indicates an auth or account problem.

Source

Thrown at clis/xiaohongshu/creator-notes.js:452

}
cli({
    site: 'xiaohongshu',
    name: 'creator-notes',
    access: 'read',
    description: '小红书创作者笔记列表 + 每篇数据 (标题/日期/观看/点赞/收藏/评论)',
    domain: 'creator.xiaohongshu.com',
    strategy: Strategy.COOKIE,
    browser: true,
    navigateBefore: false,
    args: [
        { name: 'limit', type: 'int', default: 20, help: 'Number of notes to return' },
    ],
    columns: ['rank', 'id', 'title', 'date', 'views', 'likes', 'collects', 'comments', 'url'],
    func: async (page, kwargs) => {
        const limit = kwargs.limit || 20;
        const notes = await fetchCreatorNotes(page, limit);
        if (!Array.isArray(notes) || notes.length === 0) {
            throw new EmptyResultError('xiaohongshu creator-notes', 'No notes found. Ensure you are logged into creator.xiaohongshu.com and the account has published notes.');
        }
        return notes
            .slice(0, limit)
            .map((n, i) => ({
            rank: i + 1,
            id: n.id,
            title: n.title,
            date: n.date,
            views: n.views,
            likes: n.likes,
            collects: n.collects,
            comments: n.comments,
            url: n.url,
        }));
    },
});
export const __test__ = {
    harvestAnalyzeListCaptures,

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Verify login to creator.xiaohongshu.com in the connected Chrome and that notes are visible in the note manager.
  2. Confirm the account has published notes; test with a different account.
  3. Re-login to refresh cookies and retry.
  4. Inspect earlier errors in the run (HTTP/capture failures) for the root cause of the empty result.
  5. Check that kwargs.limit isn't 0 or an invalid value in your invocation.

Example fix

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

Strategy: validation

Validate before calling

const limit = Number(kwargs.limit ?? 20);
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');

Type guard

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

Try / catch

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

Prevention

When it happens

Trigger: The analyze capture path found zero rows (all pages empty), fetchCreatorNotes fell back to an empty array after capture issues, the account has no published notes, or a non-array came back from the fetch path.

Common situations: Logged-out or expired cookie session; wrong Chrome profile connected; new account with no notes; login-verification/redirect wall during navigation; prior capture errors suppressed and surfaced as empty results.

Related errors


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