{"record":{"id":"b22f75b1827d36b8","repo":"jackwener/OpenCLI","slug":"not-logged-in-open-jimeng-jianying-com-in-chrome-b22f75","errorCode":null,"errorMessage":"Not logged in — open jimeng.jianying.com in Chrome and sign in first","messagePattern":"Not logged in — open jimeng\\.jianying\\.com in Chrome and sign in first","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"clis/jimeng/workspaces.js","lineNumber":22,"sourceCode":"    name: 'workspaces',\n    access: 'read',\n    description: '即梦AI 查看所有工作区（会话窗口）',\n    domain: 'jimeng.jianying.com',\n    strategy: Strategy.COOKIE,\n    browser: true,\n    columns: ['workspace_id', 'name', 'is_pinned', 'updated_at'],\n    pipeline: [\n        { navigate: 'https://jimeng.jianying.com/ai-tool/generate?type=image&workspace=0' },\n        { evaluate: `(async () => {\n  const res = await fetch('/mweb/v1/workspace/list?aid=513695&web_version=7.5.0&da_version=3.3.12', {\n    method: 'POST',\n    credentials: 'include',\n    headers: { 'Content-Type': 'application/json' },\n    body: JSON.stringify({})\n  });\n  const data = await res.json();\n  if (data.ret === '1014' || data.ret === 1014) {\n    throw new Error('Not logged in — open jimeng.jianying.com in Chrome and sign in first');\n  }\n  if (data.ret !== '0' && data.ret !== 0) {\n    throw new Error('workspace/list failed: ret=' + data.ret + ' errmsg=' + (data.errmsg || ''));\n  }\n  return (data.data?.workspaces || []).map(ws => ({\n    workspace_id: String(ws.workspace_id),\n    name: ws.name || '',\n    is_pinned: ws.is_pinned ? 'yes' : 'no',\n    updated_at: ws.update_time ? new Date(ws.update_time).toLocaleString('zh-CN') : '',\n  }));\n})()\n` },\n        { map: {\n                workspace_id: '${{ item.workspace_id }}',\n                name: '${{ item.name }}',\n                is_pinned: '${{ item.is_pinned }}',\n                updated_at: '${{ item.updated_at }}',\n            } },","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/jimeng/workspaces.js#L4-L40","documentation":"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.","triggerScenarios":"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.","commonSituations":"First run of the CLI before ever signing in; overnight session expiry; incognito or a second Chrome profile; corporate browser policies clearing cookies.","solutions":["Open https://jimeng.jianying.com in Chrome and sign in, then rerun the command.","Confirm you are signed into the same Chrome profile the CLI uses to read cookies.","Verify cookies are not blocked for jimeng.jianying.com (third-party/cookie settings or extensions).","Clear site cookies and sign in fresh if the session is corrupt."],"exampleFix":"// No code fix; operational:\n// before: CLI run with expired session -> ret 1014\n// after: sign in at jimeng.jianying.com in Chrome, rerun `jimeng workspaces`","handlingStrategy":"validation","validationCode":"// Pre-check session before running the CLI:\n// open https://jimeng.jianying.com in Chrome; if redirected to a login page, sign in first.\n// Programmatic check of cookies is not exposed, so verify in the browser.","typeGuard":null,"tryCatchPattern":"try {\n  await run(['jimeng', 'workspaces']);\n} catch (e) {\n  if (String(e.message).includes('Not logged in')) {\n    console.error('Sign in to jimeng.jianying.com in Chrome, then retry.');\n    // optionally: await open('https://jimeng.jianying.com');\n  } else throw e;\n}","preventionTips":["Sign in to jimeng.jianying.com in the Chrome profile the CLI reads cookies from.","Re-authenticate periodically; sessions expire.","Don't run from incognito or a different profile.","Avoid extensions/policies that clear cookies for the domain."],"tags":["auth","cookie","session-expired","cli"],"backgroundTag":"not-logged-in","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}