{"record":{"id":"9699c44dc9027b70","repo":"jackwener/OpenCLI","slug":"authentication-required-please-sign-in-to-manus","errorCode":null,"errorMessage":"Authentication required — please sign in to Manus in the browser","messagePattern":"Authentication required — please sign in to Manus in the browser","errorType":"validation","errorClass":"AuthRequiredError","httpStatus":null,"severity":"error","filePath":"clis/manus/_utils.js","lineNumber":64,"sourceCode":"    }\n    return payload;\n}\n\nfunction extractErrorMessage(payload) {\n    if (!payload || typeof payload !== 'object') return '';\n    const candidates = [\n        payload.message,\n        payload.error,\n        payload.errorMessage,\n        payload.details,\n    ];\n    return candidates.find((value) => typeof value === 'string' && value.trim())?.trim() || '';\n}\n\nexport function requireObject(payload, label) {\n    const value = unwrapEvaluateResult(payload);\n    if (value?.__authRequired) {\n        throw new AuthRequiredError(MANUS_DOMAIN, value.message || 'Authentication required — please sign in to Manus in the browser');\n    }\n    if (value?.__httpError) {\n        const message = extractErrorMessage(value);\n        throw new CommandExecutionError(message ? `Manus ${label} failed (HTTP ${value.__httpError}): ${message}` : `Manus ${label} failed (HTTP ${value.__httpError})`);\n    }\n    if (value?.__error) {\n        throw new CommandExecutionError(`Manus ${label} failed: ${value.message || value.__error}`);\n    }\n    if (!value || typeof value !== 'object' || Array.isArray(value)) {\n        throw new CommandExecutionError(`Manus ${label} returned a malformed API payload`);\n    }\n    return value;\n}\n\nexport function requireArray(value, label) {\n    if (!Array.isArray(value)) {\n        throw new CommandExecutionError(`Manus ${label} returned a malformed API payload`);\n    }","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/manus/_utils.js#L46-L82","documentation":"AuthRequiredError thrown by requireObject() when the in-page payload contains __authRequired, meaning Manus's site JS reported the user is not signed in. The message is taken from the payload or defaults to this sign-in prompt for the manus.com domain.","triggerScenarios":"Any manus command (data, connectors, sessions, skills, user) whose browser-evaluate call returns {__authRequired: true} because Manus API responses are 401 without a valid session.","commonSituations":"Session cookie expired, logged out in the browser, using a fresh browser profile the CLI can't see cookies from, Manus rotating auth requiring re-login.","solutions":["Open manus.com in the automated/browser profile and sign in.","Re-run the command after confirming the dashboard loads in that same browser.","Clear stale cookies and log in again if the session is corrupt.","Check you are pointing the CLI at the correct browser profile with Manus cookies."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function isAuthRequired(v) { return v != null && typeof v === 'object' && v.__authRequired === true; }","tryCatchPattern":"try {\n  const data = await manusData();\n} catch (e) {\n  if (e instanceof AuthRequiredError || /Authentication required/.test(e.message)) {\n    console.error('Open manus.com in the browser and sign in, then re-run.');\n    process.exitCode = 1;\n  } else throw e;\n}","preventionTips":["Check Manus login state in the target browser profile before batch runs.","Re-authenticate periodically; cookies expire.","Ensure the CLI drives the same browser profile that holds your Manus session."],"tags":["authentication","session","browser"],"backgroundTag":"authentication-required","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}