jackwener/OpenCLI · error · Error
${data.error}. Are you logged into creator.xiaohongshu.com?
Error message
${data.error}. Are you logged into creator.xiaohongshu.com? What it means
The creator-profile command throws this generic Error when the in-page fetch of /api/galaxy/creator/home/personal_info returns an { error } object — either an HTTP status ('HTTP 401', 'HTTP 403', ...) serialized from !resp.ok, or a caught JS exception message from inside page.evaluate. The message is suffixed with a login hint because the internal cookie-auth API fails primarily when the session is missing or expired.
Source
Thrown at clis/xiaohongshu/creator-profile.js:38
args: [],
columns: ['field', 'value'],
func: async (page, _kwargs) => {
await page.goto('https://creator.xiaohongshu.com/new/home');
const data = await page.evaluate(`
async () => {
try {
const resp = await fetch('/api/galaxy/creator/home/personal_info', {
credentials: 'include',
});
if (!resp.ok) return { error: 'HTTP ' + resp.status };
return await resp.json();
} catch (e) {
return { error: e.message };
}
}
`);
if (data?.error) {
throw new Error(data.error + '. Are you logged into creator.xiaohongshu.com?');
}
if (!data?.data) {
throw new Error('Unexpected response structure');
}
const d = data.data;
const grow = d.grow_info || {};
return [
{ field: 'Name', value: d.name ?? '' },
{ field: 'Followers', value: d.fans_count ?? 0 },
{ field: 'Following', value: d.follow_count ?? 0 },
{ field: 'Likes & Collects', value: d.faved_count ?? 0 },
{ field: 'Creator Level', value: grow.level ?? 0 },
{ field: 'Level Progress', value: `${grow.fans_count ?? 0}/${grow.max_fans_count ?? 0} fans` },
{ field: 'Bio', value: (d.personal_desc ?? '').replace(/\\n/g, ' | ') },
];
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Open creator.xiaohongshu.com/new/home in the connected Chrome and complete login (and any verification/captcha), then retry.
- Confirm the logged-in account is a creator account with access to the creator dashboard.
- If the message starts with 'HTTP', decode it: 401 → login, 403 → permissions/verification, 5xx → retry later.
- Check browser network/proxy settings if the error is a fetch exception (e.g. 'Failed to fetch').
- Retry after a pause if risk control is intercepting; reduce run frequency.
Example fix
// before
const rows = await run('xiaohongshu creator-profile', {});
// after
try {
return await run('xiaohongshu creator-profile', {});
} catch (e) {
if (/HTTP 40[13]/.test(e.message) || /logged into/.test(e.message)) {
await loginCreatorXhs(page); // interactive login + captcha
return await run('xiaohongshu creator-profile', {});
}
throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
// probe the session before running the command
const res = await fetch('https://creator.xiaohongshu.com/api/galaxy/creator/home/personal_info', { credentials: 'include' });
if (res.status === 401 || res.status === 403) await loginCreatorXhs(); Type guard
function hasNoError(d) {
return typeof d === 'object' && d !== null && !('error' in d);
} Try / catch
try {
return await run('xiaohongshu creator-profile', {});
} catch (e) {
if (/HTTP 40[13]/.test(e.message) || /logged into creator\.xiaohongshu\.com/.test(e.message)) {
await loginCreatorXhs(); // interactive: complete captcha/verification
return await run('xiaohongshu creator-profile', {});
}
throw e;
} Prevention
- Log in to creator.xiaohongshu.com (including any captcha/verification) before running the command.
- Use a creator account, not a plain personal account.
- Decode the 'HTTP <status>' prefix in the message to pick the right fix.
- Probe personal_info with a lightweight fetch before automating.
- If the error is a fetch exception, check browser network/proxy health.
When it happens
Trigger: Not logged into creator.xiaohongshu.com (401/302-to-login), cookies rejected/expired (403), risk control blocking the direct fetch, network failure inside evaluate, or the /new/home page didn't finish loading so the request failed.
Common situations: Chrome profile never logged in or session expired; using a personal (non-creator) account; captcha/verification wall intercepting the API; DNS/proxy issues in the browser; cookie auth strategy run without navigateBefore completing.
Related errors
- xiaohongshu creator-note-detail: signed API ${suffix} return
- Failed to fetch followers: HTTP ' + r2.status
- No note detail data found. Check note_id and login status fo
- No notes found. Ensure you are logged into creator.xiaohongs
- No notes found. Ensure you are logged into creator.xiaohongs
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/c0bb69af3b490ba4.
Report an issue: GitHub.