DIYgod/RSSHub · error
Login required
Error message
Login required
What it means
Thrown by the dida365 habit-checkins route when module-level `loginFlag` is falsy at request time. loginFlag becomes true only if config.dida365.username and password are both set AND the async login fired at module load eventually succeeds. Note the login is not awaited at request time, so a very early request can also see loginFlag undefined.
Source
Thrown at lib/routes-deprecated/dida365/habit-checkins.js:82
const record = records.habitRecords[checkin.habitId].find((re) => re.stamp === checkin.checkinStamp);
return {
title: `第${index + 1}天${info.name}打卡`,
description: record && record.content,
pubDate: `${(checkin.checkinStamp + '').slice(0, 4)}-${(checkin.checkinStamp + '').slice(4, 6)}-${(checkin.checkinStamp + '').slice(6, 8)}`,
link: `https://dida365.com/webapp/#q/all/habit/${checkin.habitId}`,
guid: checkin.id,
};
}),
];
}
ctx.state.data = {
title: '滴答清单打卡',
link: 'https://dida365.com/webapp/#q/all/habit/',
item: list,
};
} else {
throw new Error('Login required');
}
};
View on GitHub (pinned to bed535e087)
Solutions
- Set both DIDA365_USERNAME and DIDA365_PASSWORD env vars and restart.
- Check logs for 'Dida365 login fail.' and verify the credentials log in at dida365.com.
- After restart, wait a moment for the background login to resolve before requesting the route.
- Ensure outbound network to api.dida365.com is allowed.
Example fix
# .env before # (nothing) # .env after DIDA365_USERNAME=your@email DIDA365_PASSWORD=yourpassword
Defensive patterns
Strategy: validation
Validate before calling
const credsOk =
!!config.dida365?.username && !!config.dida365?.password;
if (!credsOk) throw new Error('Login required');
// plus: gate requests until the background login resolves
if (!loginFlag) throw new Error('Login required'); Type guard
const hasDidaCreds = (c: any): boolean => !!c?.dida365?.username && !!c?.dida365?.password;
Prevention
- Set both DIDA365 env vars before enabling the route.
- Watch logs for 'Dida365 login fail.' on startup.
- After restart, probe the route once before exposing it to readers.
When it happens
Trigger: DIDA365_USERNAME or DADA365_PASSWORD not configured; credentials wrong so the login promise rejects and logs 'Dida365 login fail.'; request arrives before the background login promise resolves; dida365 API temporarily unreachable at startup.
Common situations: Operator forgot to set the env vars; password rotated on dida365.com; instance restarted and the request hit within the login window; network egress to api.dida365.com blocked.
Related errors
- Disqus RSS is disabled due to the lack of <a href="https://d
- Fanfou RSS is disabled due to the lack of <a href="https://d
- Fanfou RSS is disabled due to the lack of <a href="https://d
- Fanfou RSS is disabled due to the lack of <a href="https://d
- Fanfou RSS is disabled due to the lack of <a href="https://d
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/cb54210a778765b5.
Report an issue: GitHub.