{"record":{"id":"e78867283eacc682","repo":"jackwener/OpenCLI","slug":"facebook-com","errorCode":null,"errorMessage":"facebook.com","messagePattern":"facebook\\.com","errorType":"exception","errorClass":"AuthRequiredError","httpStatus":null,"severity":"error","filePath":"clis/facebook/marketplace-inbox.js","lineNumber":65,"sourceCode":"        const snippet = lines[i + 2] || '';\n        const time = timeRe.test(lines[i + 3] || '') ? lines[i + 3] : '';\n        const key = buyer + '|' + listing;\n        if (seen.has(key)) continue;\n        seen.add(key);\n        const nearby = lines.slice(Math.max(0, i - 2), i + 5).join(' ');\n        out.push({\n          buyer,\n          listing,\n          snippet,\n          time,\n          unread: /Unread/i.test(nearby),\n        });\n      }\n      return { authRequired: false, rows: out };\n    })()`);\n\n    if (result?.authRequired) {\n      throw new AuthRequiredError('facebook.com', 'Facebook Marketplace inbox requires an active signed-in Facebook session.');\n    }\n    const items = Array.isArray(result?.rows) ? result.rows : [];\n    if (items.length === 0) {\n      throw new EmptyResultError('facebook marketplace-inbox', 'No Marketplace inbox conversations were visible. Check that Marketplace inbox is available for this account.');\n    }\n    return items.slice(0, limit).map((item, index) => ({\n      index: index + 1,\n      buyer: item.buyer || '',\n      listing: item.listing || '',\n      snippet: item.snippet || '',\n      time: item.time || '',\n      unread: Boolean(item.unread),\n    }));\n  },\n});\n\nexport const __test__ = {\n  normalizeLimit,","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/facebook/marketplace-inbox.js#L47-L83","documentation":"After extracting Marketplace inbox rows, if the page script sets authRequired: true, the command throws AuthRequiredError('facebook.com', 'Facebook Marketplace inbox requires an active signed-in Facebook session.'). The script detected a login wall on the Marketplace inbox page.","triggerScenarios":"page.evaluate returned { authRequired: true } because https://www.facebook.com/marketplace/inbox/ rendered a login/checkout interstitial instead of conversation rows.","commonSituations":"Facebook session cookies expired; Marketplace inbox unavailable or region-locked prompting a login gate; account logged out of the connected profile; Facebook forcing checkpoint before showing Marketplace.","solutions":["Open the connected Chrome and sign in to Facebook (confirm Marketplace inbox loads manually), then retry.","Complete any Facebook checkpoint/2FA prompt in the browser.","Confirm the account has Marketplace inbox access (not region/age restricted).","Log into the same browser profile the extension uses; don't rely on cookies from a different profile."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// verify a signed-in session before invoking\nconst signedIn = await fetch('https://www.facebook.com/marketplace/inbox/', { credentials: 'include' })\n  .then(r => !/login/.test(r.url)).catch(() => false);\nif (!signedIn) throw new Error('Sign in to Facebook in the connected browser first');","typeGuard":"function isAuthRequiredError(e) { return e instanceof Error && /signed-in facebook session/i.test(e.message); }","tryCatchPattern":"try {\n  const items = await cli.run(['facebook', 'marketplace-inbox']);\n} catch (err) {\n  if (/signed-in Facebook session/i.test(err.message)) {\n    // prompt operator to log into the connected Chrome profile, then retry\n  } else throw err;\n}","preventionTips":["Maintain an active Facebook login in the extension's browser profile.","Resolve checkpoints/2FA as soon as Facebook prompts.","Confirm the account has Marketplace inbox access for its region.","Re-verify the session after any logout or cookie clearance."],"tags":["auth","session","marketplace","facebook"],"backgroundTag":"auth-session-required","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}