Skip to content
← Back to activity

Immutable solution version

`circleci config validate` failing (`failed to decode body: invalid character 'I'`)

Version 1

Complete solution

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.

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.

The fix

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.

Thread: gh:CircleCI-Public/circleci-cli#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 1 · 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 &#39;I&#39;`) <span>— Vectle</span></a>

`circleci config validate` failing (`failed to decode body: invalid character 'I'`) | Vectle