{"record":{"id":"6095592a0207cbf7","repo":"remix-run/react-router","slug":"there-was-a-problem-fetching-the-file-from-github-609559","errorCode":null,"errorMessage":"There was a problem fetching the file from GitHub. No asset was found at that url. Please try again later.","messagePattern":"There was a problem fetching the file from GitHub\\. No asset was found at that url\\. Please try again later\\.","errorType":"exception","errorClass":"CopyTemplateError","httpStatus":null,"severity":"error","filePath":"packages/create-react-router/copy-template.ts","lineNumber":244,"sourceCode":"        : `https://api.github.com/repos/${info.owner}/${info.name}/releases/tags/${info.tag}`;\n\n    let response = await fetch(releaseUrl, { headers });\n\n    if (response.status !== 200) {\n      throw new CopyTemplateError(\n        \"There was a problem fetching the file from GitHub. The request \" +\n          `responded with a ${response.status} status. Please try again later.`,\n      );\n    }\n\n    let body = (await response.json()) as { assets: GitHubApiReleaseAsset[] };\n    if (\n      !body ||\n      typeof body !== \"object\" ||\n      !body.assets ||\n      !Array.isArray(body.assets)\n    ) {\n      throw new CopyTemplateError(\n        \"There was a problem fetching the file from GitHub. No asset was \" +\n          \"found at that url. Please try again later.\",\n      );\n    }\n\n    let assetId = body.assets.find((asset) => {\n      // If the release is \"latest\", the url won't match the download url\n      return info.tag === \"latest\"\n        ? asset?.browser_download_url?.includes(info.asset)\n        : asset?.browser_download_url === tarballUrl;\n    })?.id;\n    if (assetId == null) {\n      throw new CopyTemplateError(\n        \"There was a problem fetching the file from GitHub. No asset was \" +\n          \"found at that url. Please try again later.\",\n      );\n    }\n    resourceUrl = `https://api.github.com/repos/${info.owner}/${info.name}/releases/assets/${assetId}`;","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/remix-run/react-router/blob/1fd704a7dabcbe3ae09d7387b460e6acaba30ec1/packages/create-react-router/copy-template.ts#L226-L262","documentation":"Thrown when the GitHub Releases API returned 200 but the JSON body does not contain a usable assets array — body is falsy, not an object, lacks assets, or assets is not an Array. This is a contract violation: GitHub normally returns { assets: [...] } for a release. It typically indicates an unexpected response (a redirect HTML page captured as JSON, an upstream proxy injecting content, or a GitHub Enterprise instance with a different schema).","triggerScenarios":"An intercepting proxy/captive portal returns HTML with status 200; GitHub Enterprise returns a different release payload shape; the response was consumed/corrupted upstream; api.github.com returned a maintenance/migration payload that omits assets.","commonSituations":"Corporate proxy/MITM returning a 200 login page; CI behind a registry mirror that caches a stale or malformed response; an extremely old GitHub Enterprise version with a pre-v3 release schema despite the Accept header; network instrumentation that buffers/alters the body.","solutions":["Reproduce the request manually (curl -H 'Accept: application/vnd.github.v3+json' <releaseUrl>) and inspect the raw body to see what replaced assets.","Disable any HTTP proxy or captive portal interfering with api.github.com, or allowlist it.","Retry later if GitHub returned a transient malformed payload.","If on GitHub Enterprise, ensure it supports the v3 releases API and returns { assets: [...] }.","As a workaround, point --template at a codeload.github.com tarball of the repo instead of a release asset URL."],"exampleFix":"// diagnose the malformed response\ncurl -sI -H 'Accept: application/vnd.github.v3+json' \\\n  https://api.github.com/repos/:owner/:repo/releases/latest\n// if proxy interferes, bypass it and retry the CLI","handlingStrategy":"try-catch","validationCode":"// Probe that the API actually returns an assets array before invoking the CLI\nasync function releaseHasAssets(owner: string, repo: string, tag: string, token?: string) {\n  const url = `https://api.github.com/repos/${owner}/${repo}/releases/${tag === 'latest' ? 'latest' : 'tags/' + tag}`;\n  const h: HeadersInit = { Accept: 'application/vnd.github.v3+json' };\n  if (token) h.Authorization = `token ${token}`;\n  const r = await fetch(url, { headers: h });\n  if (!r.ok) return false;\n  const body = await r.json();\n  return Array.isArray((body as any)?.assets);\n}","typeGuard":"function isGitHubReleaseBody(b: unknown): b is { assets: unknown[] } {\n  return typeof b === 'object' && b !== null && Array.isArray((b as any).assets);\n}","tryCatchPattern":"try { await copyTemplate(url, dest, opts); }\ncatch (e) {\n  if (e instanceof CopyTemplateError && /No asset was found/.test(e.message)\n      && !/(asset)/.test(e.message)) {\n    // likely a malformed/proxy response — bypass proxy or switch host\n  } else throw e;\n}","preventionTips":["Bypass HTTP proxies that intercept api.github.com in CI.","Use --token to reduce the chance of an unauthenticated redirect/login page.","Prefer codeload.github.com tarball URLs over release asset URLs when you don't need a specific binary."],"tags":["network","github-api","release","proxy","create-react-router"],"backgroundTag":null,"analyzedSha":"1fd704a7dabcbe3ae09d7387b460e6acaba30ec1","analyzedAt":"2026-08-12T13:54:57.804Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}