jackwener/OpenCLI · warning · CommandExecutionError

Please verify your linux.do session is still valid

Error message

Please verify your linux.do session is still valid

What it means

When the fetch succeeded (result.ok true) but result.error is still set, the library treats it as a session-quality problem and throws CommandExecutionError with the hint 'Please verify your linux.do session is still valid'. It signals the response may be unreliable because of a degraded login state.

Source

Thrown at clis/linux-do/topic-content.js:119

        ok: false,
        error: error instanceof Error ? error.message : String(error),
      };
    }
  })()`);
    if (!result) {
        throw new CommandExecutionError('linux.do returned an empty browser response');
    }
    if (result.status === 401 || result.status === 403) {
        throw new AuthRequiredError(LINUX_DO_DOMAIN, 'linux.do requires an active signed-in browser session');
    }
    if (result.error === 'Response is not valid JSON') {
        throw new AuthRequiredError(LINUX_DO_DOMAIN, 'linux.do requires an active signed-in browser session');
    }
    if (!result.ok) {
        throw new CommandExecutionError(result.error || `linux.do request failed: HTTP ${result.status ?? 'unknown'}`);
    }
    if (result.error) {
        throw new CommandExecutionError(result.error, 'Please verify your linux.do session is still valid');
    }
    return result.data;
}
cli({
    site: 'linux-do',
    name: 'topic-content',
    access: 'read',
    description: 'Get the main topic body as Markdown',
    domain: LINUX_DO_DOMAIN,
    strategy: Strategy.COOKIE,
    browser: true,
    defaultFormat: 'plain',
    args: [
        { name: 'id', positional: true, type: 'int', required: true, help: 'Topic ID' },
    ],
    columns: ['content'],
    func: async (page, kwargs) => {
        const id = Number(kwargs.id);

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Re-authenticate: sign out and sign in again in the CLI's browser.
  2. Clear linux.do cookies for the managed profile and log in fresh.
  3. Reduce concurrent sessions on the same account.
  4. Retry the request after refreshing the session.

Example fix

// before
cli --site linux-do --name topic-content 12345   // session-hint error
// after
cli --site linux-do logout && cli --site linux-do login
cli --site linux-do --name topic-content 12345
Defensive patterns

Strategy: try-catch

Validate before calling

const stale = await page.evaluate(() => document.body?.innerText?.includes('log in') ?? false);
if (stale) console.warn('linux.do session looks stale; re-login recommended');

Type guard

const isSessionHintError = (e) => /verify your linux\.do session/.test(e?.message ?? '');

Try / catch

try {
  return await fetchTopicPayload(page, id);
} catch (e) {
  if (isSessionHintError(e)) {
    console.error('Refresh your linux.do login and retry.');
  } else throw e;
}

Prevention

When it happens

Trigger: The in-page fetch wrapper sets result.error despite ok — e.g. partial response parse issues, cookie refresh prompts, or the wrapper flagging anomalies while still returning data.

Common situations: Session about to expire (linux.do forced-logout imminent); concurrent sessions invalidating cookies; site serving degraded content to a stale session.

Related errors


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