{"record":{"id":"c83c52a344b7ab16","repo":"DIYgod/RSSHub","slug":"props","errorCode":null,"errorMessage":"无法解析页面 Props 数据","messagePattern":"无法解析页面 Props 数据","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/routes/comic-fuz/magazine.ts","lineNumber":52,"sourceCode":"\n        const response = await ofetch(openUrl, {\n            headers: {\n                'Accept-Language': 'ja,en-US;q=0.9,en;q=0.8',\n            },\n        });\n\n        const $ = load(response);\n        const nextDataText = $('#__NEXT_DATA__').text();\n\n        if (!nextDataText) {\n            throw new Error('无法解析页面数据，请检查杂志 ID 是否正确或页面结构是否变动');\n        }\n\n        const nextData = JSON.parse(nextDataText);\n        const pageProps = nextData.props?.pageProps;\n\n        if (!pageProps) {\n            throw new Error('无法解析页面 Props 数据');\n        }\n\n        const magazineTitle = pageProps.magazineName || '';\n\n        const magazineDescription = pageProps.pickupMagazineIssue?.longDescription || '';\n\n        const issues = pageProps.magazineIssues || [];\n\n        const items = issues.map((item: any) => {\n            const amount = item.paidPoint || 0;\n            const statusText = amount > 0 ? '付费' : '无料';\n\n            let thumb = item.thumbnailUrl;\n            if (thumb && thumb.startsWith('/')) {\n                thumb = `${imgUrl}${thumb}`;\n            }\n\n            const rawDate = item.updatedDate ? item.updatedDate.replace(/\\s*発売/, '') : '';","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/comic-fuz/magazine.ts#L34-L70","documentation":"Thrown by the comic-fuz magazine route when `__NEXT_DATA__` parses successfully but `nextData.props.pageProps` is missing. This is a partial-parse failure: the outer Next.js shell is present but the page-specific props (which carry `magazineIssues`, `magazineName`, etc.) are absent. Plain `Error`, Chinese message: 'Cannot parse page Props data.'","triggerScenarios":"comic-fuz returns a Next.js error page (which still has __NEXT_DATA__ but with empty/different pageProps), the magazine id resolves to a redirect whose destination page has a different props shape, or an SSR error populates `props.pageProps` with an error object instead of magazine data.","commonSituations":"Magazine ID valid format but refers to a delisted issue, SSR runtime error on comic-fuz side, or a deploy that changed the pageProps schema (e.g. nested under `props.pageProps.initialState.magazine`).","solutions":["Inspect the parsed `nextData.props.pageProps` in a debugger or log it — it often contains an `error` field explaining the SSR failure.","Confirm the magazine ID is valid by browsing the site.","If pageProps has been restructured site-wide, update the field paths (`magazineIssues`, `magazineName`, `pickupMagazineIssue.longDescription`) accordingly.","Combine with the [158] guard: a missing pageProps while __NEXT_DATA__ exists usually means a server-side render error for that specific id."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const nextData = JSON.parse(nextDataText);\nconst pageProps = nextData?.props?.pageProps;\nif (!pageProps) {\n    throw new Error(`pageProps missing at ${openUrl}; SSR may have errored for this magazine id`);\n}","typeGuard":"function hasPageProps(n: unknown): n is { props: { pageProps: Record<string, unknown> } } {\n    return Boolean((n as any)?.props?.pageProps);\n}","tryCatchPattern":null,"preventionTips":["Log the raw `pageProps` (it often contains an `error`/`statusCode` field explaining the SSR failure).","Treat a present __NEXT_DATA__ but missing pageProps as a per-id SSR error, distinct from a site-wide restructure.","Update field paths under pageProps if comic-fuz changes its serializer shape."],"tags":["site-restructure","response-shape","nextjs","partial-parse"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}