DIYgod/RSSHub · error · ConfigNotFoundError
newrank RSS is disabled due to the lack of <a href="https://
Error message
newrank 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
A ConfigNotFoundError thrown by the newrank Douyin route when config.newrank or config.newrank.cookie is falsy. RSSHub declares NEWRANK_COOKIE as a required route-specific config; without it the route cannot authenticate against newrank's anti-crawler API and refuses to run. The message is HTML-formatted to link users to the deploy config docs.
Source
Thrown at lib/routes/newrank/douyin.ts:36
},
],
requirePuppeteer: false,
antiCrawler: true,
supportBT: false,
supportPodcast: false,
supportScihub: false,
},
name: '抖音短视频',
maintainers: ['lessmoe'],
handler,
description: `::: warning
免费版账户抖音每天查询次数 20 次,如需增加次数可购买新榜会员或等待未来多账户支持
:::`,
};
async function handler(ctx) {
if (!config.newrank || !config.newrank.cookie) {
throw new ConfigNotFoundError('newrank RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>');
}
const uid = ctx.req.param('dyid');
const nonce = utils.random_nonce(9);
const url_detail = 'https://xd.newrank.cn/xdnphb/nr/cloud/douyin/detail/aweme?xyz=' + utils.decrypt_douyin_detail_xyz(nonce) + '&nonce=' + nonce;
const cookie = config.newrank.cookie;
const response_detail = await got({
method: 'post',
url: url_detail,
headers: {
Connection: 'keep-alive',
Cookie: cookie,
'Content-Type': 'application/json',
},
data: JSON.stringify({
create_time_end: '',
create_time_start: '',
date_type: '',
is_promotion: '0',View on GitHub (pinned to bed535e087)
Solutions
- Set NEWRANK_COOKIE in your RSSHub environment (export NEWRANK_COOKIE='your_cookie_string') and restart the service.
- If using docker-compose/.env, add NEWRANK_COOKIE to the env file and recreate the container.
- Verify the cookie is current by logging into newrank.cn in a browser and copying the full Cookie header; expired cookies will pass the config check but fail downstream.
- If you do not need newrank, leave the route disabled and ignore the error.
Example fix
// before
if (!config.newrank || !config.newrank.cookie) {
throw new ConfigNotFoundError('newrank RSS is disabled ...');
}
// after — no code change needed; set env instead
// export NEWRANK_COOKIE='<full cookie from newrank.cn>' Defensive patterns
Strategy: validation
Validate before calling
// RSSHub operator check before enabling the route.
if (!process.env.NEWRANK_COOKIE) {
console.error('NEWRANK_COOKIE is not set — /newrank/douyin/* will throw ConfigNotFoundError.');
} Type guard
const isNewrankConfigured = (): boolean => Boolean(config.newrank && typeof config.newrank.cookie === 'string' && config.newrank.cookie.trim());
Try / catch
// If you consume RSSHub programmatically, treat ConfigNotFoundError as non-retryable.
try { await fetch('/newrank/douyin/<id>'); }
catch (e) {
if (/disabled due to the lack/.test(e.message)) { /* config issue — do not retry, alert operator */ }
else throw e;
} Prevention
- Always set NEWRANK_COOKIE via env, never hard-code it.
- Document cookie expiry: newrank cookies expire — schedule periodic refresh.
- Health-check the route after deploy so a missing env is caught early.
When it happens
Trigger: Calling /newrank/douyin/:dyid without NEWRANK_COOKIE set in the environment (NEW_RANK_COOKIE or the config.newrank.cookie key). Also triggers when config.newrank exists but cookie is an empty string, or when the deployment uses a config preset that omits the newrank block.
Common situations: Fresh RSSHub deployment without route-specific env vars; container rebuild that dropped the env; the cookie expired and was cleared; self-hosted instance where the operator never configured newrank.
Related errors
- newrank RSS is disabled due to the lack of <a href="https://
- BAIDU_COOKIE must contain BDUSS. Please check your cookie co
- 缺少对应 loginUid 的 Bilibili 用户登录后的 Cookie 值 <a href="https://do
- 缺少对应 uid 的 Bilibili 用户登录后的 Cookie 值
- 缺少对应 uid 的 Bilibili 用户登录后的 Cookie 值
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/16121866a0c39efb.
Report an issue: GitHub.