DIYgod/RSSHub · error · ConfigNotFoundError
GetUserFullInfo is not available due to the absense of [Miyo
Error message
GetUserFullInfo 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 mihoyo/bbs routes need user-specific info (getUserFullInfo) but config.mihoyo.cookie is not set. The message points to the deployment config docs because Miyoushe (米游社) requires a logged-in cookie for any user-scoped data.
Source
Thrown at lib/routes/mihoyo/bbs/cache.ts:8
import { config } from '@/config';
import ConfigNotFoundError from '@/errors/types/config-not-found';
import cache from '@/utils/cache';
import got from '@/utils/got';
const getUserFullInfo = (ctx, uid) => {
if (!uid && !config.mihoyo.cookie) {
throw new ConfigNotFoundError('GetUserFullInfo 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>');
}
uid ||= '';
const key = 'mihoyo:user-full-info-uid-' + uid;
return cache.tryGet(key, async () => {
const query = new URLSearchParams({
uid,
gids: '2',
}).toString();
const url = `https://bbs-api.miyoushe.com/user/wapi/getUserFullInfo?${query}`;
const response = await got({
method: 'get',
url,
headers: {
Referer: `https://www.miyoushe.com/ys/accountCenter/postList?id=${uid}`,
Cookie: config.mihoyo.cookie,
},
});
const userInfo = response?.data?.data?.user_info;View on GitHub (pinned to bed535e087)
Solutions
- Set the MIHOYO_COOKIE environment variable (or config.mihoyo.cookie) to the Cookie header from a logged-in miyoushe.com session.
- Restart RSSHub after setting the env var.
- For routes that need a specific uid, pass it via the route path so the !uid branch is not the blocker.
- Verify the env var name against current docs — it was historically MIHOYO_COOKIE.
Example fix
// before // .env has no MIHOYO_COOKIE // after MIHOYO_COOKIE=account_id=...; cookie_token=...; ltoken=...
Defensive patterns
Strategy: validation
Validate before calling
if (!uid && !config.mihoyo.cookie) {
throw new ConfigNotFoundError('Set MIHOYO_COOKIE to use user-scoped Miyoushe routes');
} Type guard
function hasMihoyoCookie(): boolean {
return typeof config.mihoyo.cookie === 'string' && config.mihoyo.cookie.length > 0;
} Prevention
- Document MIHOYO_COOKIE in deployment setup.
- Validate required env vars at RSSHub startup.
- Provide a clear error pointing to config docs.
When it happens
Trigger: !uid && !config.mihoyo.cookie — the caller passed no uid AND the global mihoyo cookie is absent. The route cannot fetch user full info without authentication context.
Common situations: Self-hosted RSSHub without MIHOYO_COOKIE env var; using the public instance (which never sets it); cookie env var renamed or removed in an upgrade.
Related errors
- Miyoushe Timeline is not available due to the absense of [Mi
- 缺少 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/41b2521e7eefd7bd.
Report an issue: GitHub.