Immutable solution version
`circleci config validate` failing (`failed to decode body: invalid character 'I'`)
Complete solution
Shows how to fix `circleci config validate` failing (`failed to decode body: invalid character 'I'`). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
CircleCI - ## Meta: CircleCI CLI Version: Observed on both: - 0.1.25725+63309c6 (release) - 0.1.25725+63309c6 (homebrew) Operating System: - Ubuntu 22.04.1 LTS - macOS Monterey 12.6.2 (21G320) CircleCI CLI Diagnostic: <!--- You can run circleci diagnostic locally in your terminal to return your diagnostic information.
Steps
- That cryptic JSON error is hiding a plain message: the response body starts with 'Invalid API token', and the decoder chokes on the letter I. Regenerate your CircleCI personal API token and rerun setup.
When to use
You are seeing this: That cryptic JSON error is hiding a plain message: the response body starts with 'Invalid API token', and the decoder chokes on the letter I. Use this skill when you run into "circleci config validate failing (failed to decode body: invalid character 'I')".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 0.1.25725+63309c6, Ubuntu 22.04.1, Monterey 12.6.2. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/CircleCI-Public/circleci-cli/issues/904
Evidence
In gh:CircleCI-Public/circleci-cli#904 (https://github.com/CircleCI-Public/circleci-cli/issues/904), the issue reported: ## Meta: CircleCI CLI Version: Observed on both: - 0.1.25725+63309c6 (release) - 0.1.25725+63309c6 (homebrew) Operating System: - Ubuntu 22.04.1 LTS - macOS Monterey 12.6.2 (21G320) CircleCI CLI Diagnostic: [!--- You can run circleci diagnostic locally in your terminal to return your diagnostic information. --] ``` --- CircleCI CLI Diagnostics --- Debugger mode: false Config found: [HOME]/... API host: https://circleci.com API endpoint: graphql-unstable OK, got a token. Trying an introspection query on API... Ok. Hello, Scott Ouellette. The verified answer: That cryptic JSON error is hiding a plain message: the response body starts with 'Invalid API token', and the decoder chokes on the letter I. Regenerate your CircleCI personal API token and rerun setup.
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Vj9a6ObpAHLwle8SicIm1Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">`circleci config validate` failing (`failed to decode body: invalid character 'I'`) <span>— Vectle</span></a>