jackwener/OpenCLI · error · AuthRequiredError
1point3acres Discuz *_auth cookie missing
Error message
1point3acres Discuz *_auth cookie missing
What it means
verify1Point3AcresIdentity requires a Discuz *_auth cookie for 1point3acres.com in the shared Chrome profile; if has1Point3AcresAuthCookie finds none it throws AuthRequiredError. The Discuz _auth cookie is what proves you are logged in to the forum, so without it the library cannot scrape authenticated pages and fails immediately with the missing-prerequisite message.
Source
Thrown at clis/1point3acres/auth.js:37
kind: hasLoggedInMenu ? 'shape' : 'auth',
detail: hasLoggedInMenu
? '1point3acres bbs rendered logged-in menus but no identity link'
: '1point3acres bbs rendered but no logged-in identity',
};
}
return { ok: true, user_id: uid, username };
})()
`;
async function has1Point3AcresAuthCookie(page) {
const host = await page.getCookies({ url: 'https://www.1point3acres.com' });
const root = await page.getCookies({ url: 'https://.1point3acres.com' });
return [...host, ...root].some(c => /_auth$/.test(c.name) && c.value);
}
async function verify1Point3AcresIdentity(page) {
if (!await has1Point3AcresAuthCookie(page)) {
throw new AuthRequiredError('1point3acres.com', '1point3acres Discuz *_auth cookie missing');
}
await page.goto('https://www.1point3acres.com/bbs/');
await page.wait(2);
const probe = await page.evaluate(IDENTITY_PROBE_JS);
if (probe?.kind === 'auth') throw new AuthRequiredError('1point3acres.com', probe.detail);
if (probe?.kind === 'shape') throw new CommandExecutionError(probe.detail);
if (!probe?.ok) throw new CommandExecutionError(`Unexpected 1point3acres probe: ${JSON.stringify(probe)}`);
return { user_id: probe.user_id, username: probe.username };
}
registerSiteAuthCommands({
site: '1point3acres',
domain: '1point3acres.com',
loginUrl: 'https://auth.1point3acres.com/login',
columns: ['user_id', 'username'],
quickCheck: has1Point3AcresAuthCookie,
verify: verify1Point3AcresIdentity,
poll: async (page) => {View on GitHub (pinned to 49907e53dc)
Solutions
- Log in to https://www.1point3acres.com/bbs/ in the shared Chrome instance so a *_auth cookie is set, then rerun the command.
- Verify the CDP-attached browser is the same profile that holds the login (getCookies reads the attached browser's jar).
- Check cookies are not being cleared on exit (disable 'clear cookies on close' / extensions) and that the domain cookie exists: document.cookie or DevTools → Application → Cookies → .1point3acres.com.
Example fix
// before // shared Chrome never logged into 1point3acres opencli 1point3acres favorites // -> AuthRequiredError: *_auth cookie missing // after logging into the forum in shared Chrome opencli 1point3acres favorites
Defensive patterns
Strategy: try-catch
Validate before calling
// precheck for the Discuz auth cookie before running the flow
const cookies = await page.getCookies({ url: 'https://.1point3acres.com' });
const hasAuth = cookies.some(c => /_auth$/.test(c.name) && c.value);
if (!hasAuth) throw new Error('Log into 1point3acres.com/bbs in shared Chrome first'); Type guard
function hasDiscuzAuthCookie(cookies) {
return Array.isArray(cookies) && cookies.some(c => /_auth$/.test(c.name) && typeof c.value === 'string' && c.value.length > 0);
} Try / catch
try {
await run1Point3AcresCommand();
} catch (e) {
if (e instanceof AuthRequiredError) {
console.error('1point3acres login required: open the forum in shared Chrome and log in so a *_auth cookie is set.');
} else throw e;
} Prevention
- Log into 1point3acres.com/bbs in the same Chrome profile the CLI attaches to.
- Ensure cookies persist (disable clear-on-exit and cookie-wiping extensions).
- Re-check the cookie before long-running jobs; Discuz sessions expire.
- Confirm CDP is attached to the logged-in browser instance, not a fresh profile.
When it happens
Trigger: Calling the 1point3acres flow when the browser attached via CDP has no *_auth cookie for https://.1point3acres.com — never logged in, logged out, cookies cleared, or attached to the wrong browser profile.
Common situations: Fresh Chrome profile without a 1point3acres login; forum session expired and Discuz rotated/cleared cookies; cookie cleanup extensions or incognito profile wiping cookies; attaching CDP to a different Chrome instance than the one with the login.
Related errors
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/4fcf8a6a7e4b5ee2.
Report an issue: GitHub.