{"record":{"id":"4b6fcb4753131f02","repo":"JanDeDobbeleer/oh-my-posh","slug":"no-assets-found","errorCode":null,"errorMessage":"no assets found","messagePattern":"no assets found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/font/fonts.go","lineNumber":99,"sourceCode":"\n\tcache.Device.Set(cache.FONTLISTCACHE, assets, cache.ONEDAY)\n\n\treturn assets, nil\n}\n\nfunc getCachedFontData() ([]*Asset, error) {\n\tlist, OK := cache.Device.Get[[]*Asset](cache.FONTLISTCACHE)\n\tif !OK {\n\t\treturn nil, errors.New(\"cache not found\")\n\t}\n\n\treturn list, nil\n}\n\nfunc CascadiaCode() (*Asset, error) {\n\tassets, err := fetchFontAssets(\"microsoft/cascadia-code\")\n\tif err != nil || len(assets) != 1 {\n\t\treturn nil, errors.New(\"no assets found\")\n\t}\n\n\treturn &Asset{\n\t\tName:   CascadiaCodeMS,\n\t\tURL:    assets[0].URL,\n\t\tFolder: \"ttf/\",\n\t}, nil\n}\n\nfunc fetchFontAssets(repo string) ([]*Asset, error) {\n\tctx, cancelF := context.WithTimeout(context.Background(), time.Second*time.Duration(20))\n\tdefer cancelF()\n\n\trepoURL := \"https://api.github.com/repos/\" + repo + \"/releases/latest\"\n\treq, err := httplib.NewRequestWithContext(ctx, \"GET\", repoURL, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/JanDeDobbeleer/oh-my-posh/blob/0976794618c5ed95de0985dded50de1b4dc914cb/src/cli/font/fonts.go#L81-L117","documentation":"CascadiaCode looks up the latest GitHub release of microsoft/cascadia-code and expects exactly one zip asset. If fetchFontAssets returns an error, or the release contains zero or multiple assets, it fails with 'no assets found'. The function has no fallback, so any deviation from the expected single-asset release shape is fatal.","triggerScenarios":"Calling CascadiaCode() (used by the fonts command) when the GitHub API returns an error, is rate-limited, the release has no uploaded zip assets, or microsoft/cascadia-code ships a release with more than one zip asset.","commonSituations":"GitHub rate limiting without auth returning an unexpected body; upstream project changing release packaging (e.g. splitting per-platform zips); network outage or corporate proxy returning an empty/HTML response.","solutions":["Retry later or check network/proxy access to api.github.com.","Check the microsoft/cascadia-code releases page — if the latest release now has multiple zips, wait for or pin to a release with a single asset.","If rate-limited, set a GITHUB_TOKEN so requests are authenticated and less likely throttled.","As a workaround, install the font manually via `oh-my-posh font install <https url to the zip>`."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"resp, err := http.Get(\"https://api.github.com/repos/microsoft/cascadia-code/releases/latest\")\nif err != nil || resp.StatusCode != 200 {\n    // skip CascadiaCode lookup / retry later\n}","typeGuard":null,"tryCatchPattern":"asset, err := font.CascadiaCode()\nif err != nil && err.Error() == \"no assets found\" {\n    // fall back to manual install or a pinned URL\n    asset, err = font.Download(\"https://github.com/microsoft/cascadia-code/releases/download/v2404.23/CascadiaCode-2404.23.zip\", report)\n}","preventionTips":["Authenticate GitHub API calls to avoid rate limiting (GITHUB_TOKEN)","Pin a known-good release URL as a fallback instead of relying on 'latest'","Check the upstream releases page when this error starts appearing — packaging may have changed"],"tags":["font","github-api","network","cli"],"backgroundTag":"release-asset-not-found","analyzedSha":"0976794618c5ed95de0985dded50de1b4dc914cb","analyzedAt":"2026-08-31T23:41:19.708Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}