jackwener/OpenCLI · error · Error

Not logged in — open jimeng.jianying.com in Chrome and sign

Error message

Not logged in — open jimeng.jianying.com in Chrome and sign in first

What it means

Thrown by the `jimeng workspaces` (list) command when the API envelope returns ret 1014 (as string or number), which Jimeng uses to mean 'no valid session'. The CLI relies on Chrome cookies (Strategy.COOKIE, credentials: 'include'), so 1014 means the cookies sent with the request were absent, expired, or not accepted.

Source

Thrown at clis/jimeng/workspaces.js:22

    name: 'workspaces',
    access: 'read',
    description: '即梦AI 查看所有工作区(会话窗口)',
    domain: 'jimeng.jianying.com',
    strategy: Strategy.COOKIE,
    browser: true,
    columns: ['workspace_id', 'name', 'is_pinned', 'updated_at'],
    pipeline: [
        { navigate: 'https://jimeng.jianying.com/ai-tool/generate?type=image&workspace=0' },
        { evaluate: `(async () => {
  const res = await fetch('/mweb/v1/workspace/list?aid=513695&web_version=7.5.0&da_version=3.3.12', {
    method: 'POST',
    credentials: 'include',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({})
  });
  const data = await res.json();
  if (data.ret === '1014' || data.ret === 1014) {
    throw new Error('Not logged in — open jimeng.jianying.com in Chrome and sign in first');
  }
  if (data.ret !== '0' && data.ret !== 0) {
    throw new Error('workspace/list failed: ret=' + data.ret + ' errmsg=' + (data.errmsg || ''));
  }
  return (data.data?.workspaces || []).map(ws => ({
    workspace_id: String(ws.workspace_id),
    name: ws.name || '',
    is_pinned: ws.is_pinned ? 'yes' : 'no',
    updated_at: ws.update_time ? new Date(ws.update_time).toLocaleString('zh-CN') : '',
  }));
})()
` },
        { map: {
                workspace_id: '${{ item.workspace_id }}',
                name: '${{ item.name }}',
                is_pinned: '${{ item.is_pinned }}',
                updated_at: '${{ item.updated_at }}',
            } },

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Open https://jimeng.jianying.com in Chrome and sign in, then rerun the command.
  2. Confirm you are signed into the same Chrome profile the CLI uses to read cookies.
  3. Verify cookies are not blocked for jimeng.jianying.com (third-party/cookie settings or extensions).
  4. Clear site cookies and sign in fresh if the session is corrupt.

Example fix

// No code fix; operational:
// before: CLI run with expired session -> ret 1014
// after: sign in at jimeng.jianying.com in Chrome, rerun `jimeng workspaces`
Defensive patterns

Strategy: validation

Validate before calling

// Pre-check session before running the CLI:
// open https://jimeng.jianying.com in Chrome; if redirected to a login page, sign in first.
// Programmatic check of cookies is not exposed, so verify in the browser.

Try / catch

try {
  await run(['jimeng', 'workspaces']);
} catch (e) {
  if (String(e.message).includes('Not logged in')) {
    console.error('Sign in to jimeng.jianying.com in Chrome, then retry.');
    // optionally: await open('https://jimeng.jianying.com');
  } else throw e;
}

Prevention

When it happens

Trigger: Running `jimeng workspaces` without being signed in to jimeng.jianying.com in Chrome; session expired since last login; cookies blocked or cleared; running in a Chrome profile different from the one used to sign in.

Common situations: First run of the CLI before ever signing in; overnight session expiry; incognito or a second Chrome profile; corporate browser policies clearing cookies.

Related errors


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