{"record":{"id":"5a10cd16aaa893c5","repo":"jackwener/OpenCLI","slug":"auth-5a10cd","errorCode":null,"errorMessage":"auth","messagePattern":"auth","errorType":"exception","errorClass":"AuthRequiredError","httpStatus":null,"severity":"error","filePath":"clis/dribbble/auth.js","lineNumber":27,"sourceCode":"    await page.goto(DRIBBBLE_ORIGIN);\n    // Dribbble serves an AWS WAF challenge before the real document on fresh\n    // tabs. Three seconds is not enough consistently; probing early turns a\n    // valid session into a false AUTH_REQUIRED result.\n    await page.wait(5);\n    const result = await page.evaluate(`(() => {\n        const profile = document.querySelector('a[title=\"Open profile\"]');\n        const signOut = document.querySelector('form[action$=\"/session\"] input[name=\"_method\"][value=\"delete\"]');\n        const href = profile?.getAttribute('href') || '';\n        if (!signOut || !/^\\\\/[^/]+$/.test(href)) {\n            return { kind: 'auth', detail: 'Dribbble header does not show a logged-in profile' };\n        }\n        return {\n            ok: true,\n            username: href.slice(1),\n            profile_url: new URL(href, location.href).href,\n        };\n    })()`);\n    if (result?.kind === 'auth') throw new AuthRequiredError(DRIBBBLE_HOST, result.detail);\n    if (!result?.ok) throw new CommandExecutionError(`Unexpected Dribbble identity response: ${JSON.stringify(result)}`);\n    return { username: result.username, profile_url: result.profile_url };\n}\n\nregisterSiteAuthCommands({\n    site: 'dribbble',\n    domain: DRIBBBLE_HOST,\n    loginUrl: `${DRIBBBLE_ORIGIN}/session/new`,\n    columns: ['username', 'profile_url'],\n    quickCheck: hasDribbbleSessionCookie,\n    verify: verifyDribbbleIdentity,\n    poll: async (page) => {\n        if (!await hasDribbbleSessionCookie(page)) {\n            throw new AuthRequiredError(DRIBBBLE_HOST, 'Waiting for Dribbble session cookies');\n        }\n        return verifyDribbbleIdentity(page);\n    },\n});","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/dribbble/auth.js#L9-L45","documentation":"An AuthRequiredError raised by verifyDribbbleIdentity when the in-page identity probe returns { kind: 'auth' }, meaning the page loaded but Dribbble redirected the user to a login state — the session cookie exists or the page loaded, but the identity endpoint reports an unauthenticated visitor. The wrapped result.detail explains what the page reported.","triggerScenarios":"Calling `dribbble auth` where the in-page script detects a login redirect/auth wall (result.kind === 'auth') — typically a session cookie that is present but expired/invalid, or the AWS WAF challenge page replacing the real document.","commonSituations":"Expired Dribbble session (cookie survives but token invalid server-side); the 5-second WAF wait insufficient so the probe ran against the challenge page; login revoked from another device.","solutions":["Re-login to dribbble.com in the managed browser and retry the command.","Retry after a longer delay so the AWS WAF challenge completes before the identity probe runs.","Clear stale dribbble.com cookies and perform a fresh login.","Check result.detail in the error message for the specific auth wall the page reported."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await run('dribbble auth');\n} catch (e) {\n  if (e.name === 'AuthRequiredError') {\n    await run('dribbble login'); // session present but rejected — re-authenticate\n    return run('dribbble auth');\n  }\n  throw e;\n}","preventionTips":["Re-login periodically; Dribbble sessions expire server-side even when cookies persist.","Allow extra time for the AWS WAF challenge before probing identity.","Recover from 'auth' results by treating them as an expired session, not a bug."],"tags":["auth-required","dribbble","session-expired","waf-challenge"],"backgroundTag":"auth-required","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}