{"record":{"id":"a322ff5bc5f1a417","repo":"jackwener/OpenCLI","slug":"facebook-feed","errorCode":null,"errorMessage":"facebook feed","messagePattern":"facebook feed","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/facebook/feed.js","lineNumber":391,"sourceCode":"  }\n\n  if (payload.rows.length > 0) {\n    return payload.rows;\n  }\n\n  if (payload.status === 'empty') {\n    throw new EmptyResultError('facebook feed', 'Facebook did not show any feed posts for this account.');\n  }\n\n  const diagnostics = payload.diagnostics || {};\n  if (diagnostics.articleCount || diagnostics.actionMenuCount || diagnostics.fallbackActionCount || diagnostics.mainTextLength > 200) {\n    throw new CommandExecutionError(\n      'facebook feed page rendered but no feed rows could be extracted',\n      `Diagnostics: articles=${diagnostics.articleCount || 0}, actions=${diagnostics.fallbackActionCount || 0}, mainTextLength=${diagnostics.mainTextLength || 0}.`,\n    );\n  }\n\n  throw new EmptyResultError('facebook feed', 'No Facebook feed content was visible in the current browser session.');\n}\n\nconst command = {\n  site: 'facebook',\n  name: 'feed',\n  access: 'read',\n  description: 'Get your Facebook news feed',\n  domain: 'www.facebook.com',\n  strategy: Strategy.COOKIE,\n  browser: true,\n  navigateBefore: false,\n  args: [\n    { name: 'limit', type: 'int', default: 10, help: 'Number of posts' },\n  ],\n  columns: ['index', 'author', 'content', 'likes', 'comments', 'shares'],\n  func: getFacebookFeed,\n};\n","sourceCodeStart":373,"sourceCodeEnd":409,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/facebook/feed.js#L373-L409","documentation":"If the feed page rendered nothing recognizable — zero rows, status not 'empty', and diagnostics all low/absent — the library throws EmptyResultError('facebook feed', 'No Facebook feed content was visible in the current browser session.'). It is the catch-all 'page was basically blank' outcome after auth and markup checks are ruled out.","triggerScenarios":"payload.rows empty, status not 'empty' or 'auth', and diagnostics show articleCount=0, actionMenuCount=0, fallbackActionCount=0, mainTextLength <= 200.","commonSituations":"Page failed to render before extraction ran (slow network inside the 4s settle window); Facebook served a blank or consent wall; browser tab throttled/backgrounded so the feed never painted; extension captured the DOM too early.","solutions":["Increase wait/settle time or scroll the page so content paints, then re-run.","Check in the connected browser that facebook.com actually displays the feed for this session.","Disable data-saver/consent walls (accept cookie banner) which can leave the page nearly blank.","Retry the command; transient render timing is the most common cause."],"exampleFix":"// before\nconst rows = await getFacebookFeed(page, { limit: 10 });\n// after\nlet rows;\ntry {\n  rows = await getFacebookFeed(page, { limit: 10 });\n} catch (err) {\n  if (err.name === 'EmptyResultError') { await page.wait(5); rows = await getFacebookFeed(page, { limit: 10 }); }\n  else throw err;\n}","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const rows = await getFacebookFeed(page, { limit: 10 });\n} catch (err) {\n  if (/No Facebook feed content was visible/i.test(err.message)) {\n    await page.wait(5); // let the page paint, then retry once\n    const rows = await getFacebookFeed(page, { limit: 10 });\n  } else throw err;\n}","preventionTips":["Increase settle/wait time on slow networks.","Accept cookie/consent banners that can leave the page blank.","Keep the tab foregrounded so the browser renders the feed.","Retry once before treating the result as a hard failure."],"tags":["empty-result","render","facebook","blank-page"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}