DIYgod/RSSHub · error · ConfigNotFoundError
Miyoushe Timeline is not available due to the absense of [Mi
Error message
Miyoushe Timeline is not available due to the absense of [Miyoushe Cookie]. Check <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config tutorial</a>
What it means
ConfigNotFoundError thrown when the Miyoushe timeline route requires config.mihoyo.cookie but it is not set. The personalized follow-feed timeline (米游社 用户关注动态) needs a logged-in cookie, so only self-hosted instances with MIHOYO_COOKIE configured can serve it.
Source
Thrown at lib/routes/mihoyo/bbs/timeline.ts:42
supportPodcast: false,
supportScihub: false,
},
radar: [
{
source: ['miyoushe.com/:game/timeline'],
},
],
name: '米游社 - 用户关注动态',
maintainers: ['CaoMeiYouRen'],
handler,
description: `::: warning
用户关注动态需要米游社登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。
:::`,
};
async function handler(ctx) {
if (!config.mihoyo.cookie) {
throw new ConfigNotFoundError('Miyoushe Timeline is not available due to the absense of [Miyoushe Cookie]. Check <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config tutorial</a>');
}
const page_size = ctx.req.query('limit') || '20';
const searchParams = {
gids: 2,
page_size,
};
const link = 'https://www.miyoushe.com/ys/timeline';
const url = 'https://bbs-api.miyoushe.com/painter/wapi/timeline/list';
const response = await got({
method: 'get',
url,
searchParams,
headers: {
Referer: link,
Cookie: config.mihoyo.cookie,
},
});View on GitHub (pinned to bed535e087)
Solutions
- Set MIHOYO_COOKIE env var to the Cookie header from a logged-in miyoushe.com session.
- Restart RSSHub after setting the env var.
- Verify the env var name (MIHOYO_COOKIE) against current docs.
- Confirm the cookie is fresh — login to miyoushe.com and recopy.
Example fix
// before // .env: no MIHOYO_COOKIE // after MIHOYO_COOKIE=account_id=12345; cookie_token=...; ltoken=...
Defensive patterns
Strategy: validation
Validate before calling
if (!config.mihoyo.cookie) {
throw new ConfigNotFoundError('Set MIHOYO_COOKIE to use the Miyoushe timeline route');
} Type guard
function hasMihoyoCookie(): boolean {
return typeof config.mihoyo.cookie === 'string' && config.mihoyo.cookie.length > 0;
} Prevention
- Document MIHOYO_COOKIE as required for timeline routes.
- Validate env vars at RSSHub startup with a clear missing-config error.
- Keep a runbook for refreshing the Miyoushe cookie.
When it happens
Trigger: !config.mihoyo.cookie at the top of the handler — the global mihoyo cookie env var is absent, so the route refuses to call the timeline API.
Common situations: Self-hosted RSSHub without MIHOYO_COOKIE; public instance (never sets it); env var typo; cookie removed during an upgrade.
Related errors
- GetUserFullInfo is not available due to the absense of [Miyo
- 缺少 Medium 用户 ${user} 登录后的 Cookie 值
- 缺少 Medium 用户 ${user} 登录后的 Cookie 值
- 缺少 Medium 用户 ${user} 登录后的 Cookie 值
- 缺少雪球用户登录后的 Cookie 值
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/67e61075e95e8dc6.
Report an issue: GitHub.