{"record":{"id":"724ecd9719645462","repo":"DIYgod/RSSHub","slug":"pixiv-not-login-724ecd","errorCode":null,"errorMessage":"pixiv not login","messagePattern":"pixiv not login","errorType":"error_code","errorClass":"ConfigNotFoundError","httpStatus":503,"severity":"error","filePath":"lib/routes/pixiv/user.ts","lineNumber":44,"sourceCode":"    radar: [\n        {\n            source: ['www.pixiv.net/users/:id', 'www.pixiv.net/en/users/:id'],\n        },\n    ],\n    name: 'User Activity',\n    maintainers: ['DIYgod'],\n    handler,\n};\n\nasync function handler(ctx) {\n    if (!config.pixiv || !config.pixiv.refreshToken) {\n        throw new ConfigNotFoundError('pixiv RSS is disabled due to the lack of <a href=\"https://docs.rsshub.app/deploy/config#route-specific-configurations\">relevant config</a>');\n    }\n\n    const id = ctx.req.param('id');\n    const token = await getToken();\n    if (!token) {\n        throw new ConfigNotFoundError('pixiv not login');\n    }\n\n    const response = await getIllusts(id, token);\n\n    const illusts = response.data.illusts;\n    const username = illusts[0].user.name;\n\n    return {\n        title: `${username} 的 pixiv 动态`,\n        link: `https://www.pixiv.net/users/${id}`,\n        image: pixivUtils.getProxiedImageUrl(illusts[0].user.profile_image_urls.medium),\n        description: `${username} 的 pixiv 最新动态`,\n        item: illusts.map((illust) => {\n            const images = pixivUtils.getImgs(illust);\n            return {\n                title: illust.title,\n                author: username,\n                pubDate: parseDate(illust.create_date),","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/pixiv/user.ts#L26-L62","documentation":"ConfigNotFoundError thrown by the user-activity handler when getToken() returns falsy. The config guard already passed, meaning the OAuth token refresh failed and no bearer token is available for getIllusts.","triggerScenarios":"PIXIV_REFRESHTOKEN set but invalid/expired; oauth refresh rejected; region-blocked reachability; cached null token under 'pixiv:accessToken'.","commonSituations":"Expired refresh token; server moved to a blocked region; cache returning a previous failed refresh.","solutions":["Regenerate PIXIV_REFRESHTOKEN and update config.","Verify reachability to oauth.secure.pixiv.net (use a proxy if blocked).","Flush the 'pixiv:accessToken' cache key.","Check logs for the pixiv oauth response body."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { getToken } from './token';\nconst token = await getToken();\nif (!token) {\n  // abort; refresh-token invalid, prompt regeneration\n}","typeGuard":"const isUsableToken = (t: unknown): t is string => typeof t === 'string' && t.length > 0;","tryCatchPattern":"try {\n  const token = await getToken();\n  if (!token) throw new ConfigNotFoundError('pixiv not login');\n} catch (e) {\n  if (e instanceof ConfigNotFoundError) {\n    // refresh failed: clear cache, advise regenerating token\n  }\n}","preventionTips":["Do not call getIllusts with a null token.","Clear 'pixiv:accessToken' on null to force a re-refresh.","Track oauth failures to detect token expiry early."],"tags":["pixiv","authentication","oauth","token","user"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}