{"record":{"id":"b21e2d8884236c9a","repo":"ccfddl/ccf-deadlines","slug":"error","errorCode":null,"errorMessage":"加载失败","messagePattern":"加载失败","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/chrome/chrome/popup.js","lineNumber":637,"sourceCode":"    const repoResponse = await fetch(\n      \"https://ccfddl.github.io/conference/allconf.yml\"\n    );\n    if (repoResponse.ok) {\n      const repoText = await repoResponse.text();\n      const now = Date.now();\n      const parsedItems = mergeCcfddlItems(parseAllConfYaml(repoText))\n        .filter((item) => toTimestamp(item.datetime) >= now)\n        .sort((a, b) => toTimestamp(a.datetime) - toTimestamp(b.datetime));\n      applyLoadedCcfddlItems(parsedItems);\n      return;\n    }\n\n    const [zhResponse, enResponse] = await Promise.all([\n      fetch(\"https://ccfddl.com/conference/deadlines_zh.ics\"),\n      fetch(\"https://ccfddl.com/conference/deadlines_en.ics\"),\n    ]);\n    const responses = [zhResponse, enResponse].filter((res) => res.ok);\n    if (responses.length === 0) throw new Error(\"加载失败\");\n    const texts = await Promise.all(responses.map((res) => res.text()));\n    const now = Date.now();\n    const parsedItems = mergeCcfddlItems(texts.flatMap((text) => parseIcs(text)))\n      .filter((item) => toTimestamp(item.datetime) >= now)\n      .sort((a, b) => toTimestamp(a.datetime) - toTimestamp(b.datetime));\n    applyLoadedCcfddlItems(parsedItems);\n  } catch (error) {\n    if (ccfddlItems.length === 0) {\n      ccfddlEmpty.textContent = t(\"load_failed\", \"加载失败，请稍后重试。\");\n      ccfddlEmpty.style.display = isCcfddlExpanded && isCcfddlDropdownOpen ? \"block\" : \"none\";\n    }\n  } finally {\n    isCcfddlLoading = false;\n  }\n}\n\nasync function openCcfddlDropdown() {\n  if (!isCcfddlExpanded) return;","sourceCodeStart":619,"sourceCodeEnd":655,"githubUrl":"https://github.com/ccfddl/ccf-deadlines/blob/dedf5e76ab05c38b3cba2ba4f1fbf4d04fd403ba/extensions/chrome/chrome/popup.js#L619-L655","documentation":"This error is thrown by the popup's deadline loader when neither of the two ICS feeds from ccfddl.com (deadlines_zh.ics and deadlines_en.ics) returned an HTTP OK response; after filtering with res.ok, the responses array is empty and Error('加载失败') is raised. It means the remote conference-deadline data could not be fetched, so the popup cannot render any CCF deadlines.","triggerScenarios":"Both fetch() calls to https://ccfddl.com/conference/deadlines_zh.ics and https://ccfddl.com/conference/deadlines_en.ics resolve with res.ok === false (e.g. HTTP 4xx/5xx), or the site is down; if either fetch rejects (network error/DNS failure/CORS), Promise.all rejects instead and this specific message is not thrown.","commonSituations":"User is offline or behind a captive portal/proxy that returns non-200 responses; ccfddl.com is temporarily down, rate-limiting, or returning 403/503 via CDN; corporate firewall blocks the domain; the site changed URL structure so the endpoints return 404.","solutions":["Check network connectivity and retry loading the popup later, since the error is usually transient on ccfddl.com's side.","Open https://ccfddl.com/conference/deadlines_en.ics directly in a browser to confirm the endpoint is healthy and returns 200.","Check whether a proxy, VPN, or firewall is intercepting requests and returning non-200 responses; whitelist ccfddl.com.","Patch popup.js to surface res.status in the error message and fall back to cached deadlines instead of failing outright."],"exampleFix":"// before\nconst responses = [zhResponse, enResponse].filter((res) => res.ok);\nif (responses.length === 0) throw new Error(\"加载失败\");\n// after\nconst responses = [zhResponse, enResponse].filter((res) => res.ok);\nif (responses.length === 0) {\n  throw new Error(`加载失败 (zh=${zhResponse.status}, en=${enResponse.status})`);\n}","handlingStrategy":"try-catch","validationCode":"const res = await fetch(url, { method: \"HEAD\" }).catch(() => null);\nif (!res || !res.ok) console.warn(\"ccfddl feed unavailable, status:\", res?.status);","typeGuard":"function hasOkResponses(responses) {\n  return Array.isArray(responses) && responses.some((res) => res && res.ok);\n}","tryCatchPattern":"try {\n  await loadCcfddlDeadlines();\n} catch (err) {\n  if (err.message === \"加载失败\") {\n    showCachedDeadlinesOrMessage(\"无法加载会议截止时间，请稍后重试\");\n  } else {\n    throw err;\n  }\n}","preventionTips":["Cache the last successful ICS parse in chrome.storage and render it when fetches fail.","Retry the fetch once or twice with backoff before giving up.","Log response statuses (res.status) to distinguish 4xx/5xx from network outages.","Show a retry button in the popup instead of a dead '加载失败' state."],"tags":["network","fetch","http","chrome-extension","ics"],"backgroundTag":"http-error-response","analyzedSha":"dedf5e76ab05c38b3cba2ba4f1fbf4d04fd403ba","analyzedAt":"2026-09-11T16:18:10.249Z","contentChangedAt":"2026-09-11T16:18:10.249Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}