{"record":{"id":"f71af23a5077627c","repo":"DIYgod/RSSHub","slug":"weibo-friends-timeline-is-not-available-due-to-the","errorCode":null,"errorMessage":"Weibo Friends Timeline is not available due to the absense of [Weibo Cookies]. Check <a href=\"https://docs.rsshub.app/deploy/config#route-specific-configurations\">relevant config tutorial</a>","messagePattern":"Weibo Friends Timeline is not available due to the absense of \\[Weibo Cookies\\]\\. Check <a href=\"https://docs\\.rsshub\\.app/deploy/config#route-specific-configurations\">relevant config tutorial</a>","errorType":"exception","errorClass":"ConfigNotFoundError","httpStatus":null,"severity":"error","filePath":"lib/routes/weibo/friends.ts","lineNumber":52,"sourceCode":"            target: '/friends',\n        },\n    ],\n    name: '最新关注时间线',\n    maintainers: ['CaoMeiYouRen'],\n    handler,\n    url: 'weibo.com/',\n    description: `::: warning\n此方案必须使用用户\\`Cookie\\`进行抓取\n\n因微博 cookies 的过期与更新方案未经验证，部署一次 Cookie 的有效时长未知\n\n微博用户 Cookie 的配置可参照部署文档\n:::`,\n};\n\nasync function handler(ctx) {\n    if (!config.weibo.cookies) {\n        throw new ConfigNotFoundError('Weibo Friends Timeline is not available due to the absense of [Weibo Cookies]. Check <a href=\"https://docs.rsshub.app/deploy/config#route-specific-configurations\">relevant config tutorial</a>');\n    }\n\n    let displayVideo = '1';\n    let displayArticle = '0';\n    let displayComments = '0';\n    if (ctx.req.param('routeParams')) {\n        if (ctx.req.param('routeParams') === '1' || ctx.req.param('routeParams') === '0') {\n            displayVideo = ctx.req.param('routeParams');\n        } else {\n            const routeParams = querystring.parse(ctx.req.param('routeParams'));\n            displayVideo = fallback(undefined, queryToBoolean(routeParams.displayVideo), true) ? '1' : '0';\n            displayArticle = fallback(undefined, queryToBoolean(routeParams.displayArticle), false) ? '1' : '0';\n            displayComments = fallback(undefined, queryToBoolean(routeParams.displayComments), false) ? '1' : '0';\n        }\n    }\n\n    const uid = await cache.tryGet(\n        'weibo:friends:login-user',","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/weibo/friends.ts#L34-L70","documentation":"Thrown by the Weibo friends timeline route when `config.weibo.cookies` is not set in the RSSHub configuration. This route requires authenticated Weibo cookies to access the friends feed API (`https://m.weibo.cn/feed/friends`), which is a private timeline. This is a `ConfigNotFoundError`, which RSSHub maps to an HTTP configuration-error response.","triggerScenarios":"A request to `/weibo/friends` on an RSSHub instance where the `WEIBO_COOKIES` environment variable is not configured. The check happens at the very top of the handler (line 51) before any API call.","commonSituations":"The RSSHub instance was deployed without setting `WEIBO_COOKIES`; the environment variable was removed or commented out; or the user is using a public RSSHub instance that doesn't support cookie-dependent routes.","solutions":["Set the `WEIBO_COOKIES` environment variable in the RSSHub configuration with a valid Weibo cookie string obtained from a logged-in browser session.","Follow the configuration tutorial linked in the error message: https://docs.rsshub.app/deploy/config#route-specific-configurations.","If you cannot provide cookies (e.g. using a public instance), use a different Weibo route that doesn't require authentication."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// In RSSHub config (environment variables):\n// WEIBO_COOKIES=SUB=_2A25...; SCF=...; SUHB=...; SSOLock=...\n// Verify before deploying:\nif (!process.env.WEIBO_COOKIES) {\n    console.warn('WEIBO_COOKIES not set — /weibo/friends will fail');\n}","typeGuard":null,"tryCatchPattern":"try {\n    const feed = await fetchRss('/weibo/friends');\n} catch (e) {\n    if (e.name === 'ConfigNotFoundError') {\n        console.error('Weibo cookies not configured. Set WEIBO_COOKIES env var.');\n    }\n    throw e;\n}","preventionTips":["Set WEIBO_COOKIES in the RSSHub environment before subscribing to cookie-dependent Weibo routes.","Monitor cookie expiry — Weibo cookies have limited validity; set up alerts for ConfigNotFoundError.","Extract cookies from a browser session logged into m.weibo.cn using devtools Network tab.","Do not use public RSSHub instances for cookie-dependent routes; self-host."],"tags":["config-error","config-not-found","authentication","weibo","cookies","rss-route"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}