DIYgod/RSSHub · error · ConfigNotFoundError

manhuagui RSS is disabled due to the lack of <a href="https:

Error message

manhuagui RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>

What it means

Thrown as ConfigNotFoundError by the manhuagui subscribe route when either config.manhuagui is undefined or config.manhuagui.cookie is unset/empty. The route scrapes the authenticated bookshelf page which requires a valid MHGUI_COOKIE environment variable. Without it, the personal subscription feed cannot be built. This route is explicitly self-host-only.

Source

Thrown at lib/routes/manhuagui/subscribe.tsx:48

    },
    radar: [
        {
            source: ['www.mhgui.com/user/book/shelf'],
        },
    ],
    name: '漫画个人订阅',
    maintainers: ['shininome'],
    handler,
    url: 'www.mhgui.com/user/book/shelf',
    description: `::: tip
个人订阅需要自建
环境变量需要添加 MHGUI\\_COOKIE
:::`,
};

async function handler() {
    if (!config.manhuagui || !config.manhuagui.cookie) {
        throw new ConfigNotFoundError('manhuagui RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>');
    }
    const cookie = config.manhuagui.cookie;
    const response = await got({
        method: 'get',
        url: web_url,
        headers: {
            Cookie: cookie,
        },
    });
    const $ = load(response.data);
    const user_name = $('.avatar-box').find('h3').text();
    const title = `${user_name} 的 漫画订阅`;
    const link = web_url;
    const description = `${user_name} 的 漫画订阅`;

    const item = $('.dy_content_li')
        .toArray()
        .map((item) => {

View on GitHub (pinned to bed535e087)

Solutions

  1. Set the MHGUI_COOKIE environment variable to your authenticated manhuagui session cookie (obtain from browser devtools after logging in).
  2. For Docker, pass -e MHGUI_COOKIE='...' or add it to your env file.
  3. Verify the config schema in lib/config.ts includes the manhuagui.cookie field if you are extending configuration.
  4. This route is intentionally disabled on the public RSSHub instance — you must self-host.

Example fix

// before
if (!config.manhuagui || !config.manhuagui.cookie) {
    throw new ConfigNotFoundError('manhuagui RSS is disabled ...');
}

// after — clearer message naming the exact env var (no change to logic)
if (!config.manhuagui || !config.manhuagui.cookie) {
    throw new ConfigNotFoundError('manhuagui personal-subscribe RSS requires the MHGUI_COOKIE environment variable. See https://docs.rsshub.app/deploy/config for setup. This route is self-host only.');
}
Defensive patterns

Strategy: validation

Validate before calling

import { config } from '@/config';
if (!config.manhuagui?.cookie) {
    throw new ConfigNotFoundError('This route requires MHGUI_COOKIE. Set it in your environment. Self-host only.');
}
// Optionally validate the cookie format before using it
if (!/^[\w\s=;,.!-]+$/.test(config.manhuagui.cookie)) {
    throw new ConfigNotFoundError('MHGUI_COOKIE appears malformed.');
}

Prevention

When it happens

Trigger: Running the route on a public/shared RSSHub instance that has not configured MHGUI_COOKIE. The env var is set but empty string. The env var name is misspelled (e.g. MANHUAGUI_COOKIE vs MHGUI_COOKIE). config.manhuagui exists but the cookie field is missing from the config schema.

Common situations: New self-hoster forgets to set MHGUI_COOKIE. The cookie has expired and returns a login page (but that fails later, not here — here it is purely a config-presence check). A docker deploy that doesn't pass the env var through.

Related errors


AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12). Data as JSON: /api/errors/09be6a172b6bd573. Report an issue: GitHub.