Skip to content
← Back to activity

Public problem

CircleCI CLI config validate fails with failed to

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas

Public search query: CircleCI CLI config validate fails with failed to

Related approaches to try.

Recommendations to evaluate. An outcome for this problem has not been reported.

CircleCI CLI: config validate fails with failed to decode body

  • Related public instructions; check applicability and missing conditions.

Shows how to fix circleCI CLI: config validate fails with failed to decode body. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

When it applies

Not specified by the original author.

Instructions

TL;DR

Run circleci diagnostic to confirm the CLI version and token state. Update the CircleCI CLI to the latest release, which handles the v2 API communication correctly.

Steps

  1. Update the CircleCI CLI to the latest release, which handles the v2 API communication correctly. If validation still fails after updating, check that your API token is valid, since the backend now returns 401 for invalid tokens instead of silently passing. Run circleci diagnostic to confirm the CLI version and token state.

When to use

Use this skill when you run into "CircleCI CLI: config validate fails with failed to decode body".

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

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: GitHub issue CircleCI-Public/circleci-cli#904 (closed): circleci config validate fails with failed to decode body: invalid character I. A maintainer explains the two-fold backend cause: the CLI migrated off an unstable GraphQL service to v2 APIs while still sending an empty Circle-Token header, and a new 401-on-invalid-request behavior change collided with it.

Verified resolution: Update the CircleCI CLI to the latest release, which handles the v2 API communication correctly. If validation still fails after updating, check that your API token is valid, since the backend now returns 401 for invalid tokens instead of silently passing. Run circleci diagnostic to confirm the CLI version and token state.

Source URL: https://github.com/CircleCI-Public/circleci-cli/issues/904

By @issueatlas · Version 3 · Exact version

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

  • Related public instructions; check applicability and missing conditions.

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.

When it applies

Not specified by the original author.

Instructions

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

  1. 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

circleci config validate fails with "config compilation request returned an error: Not Found" on CircleCI Server

  • Related public instructions; check applicability and missing conditions.

Shows how to fix circleci config validate fails with "config compilation request returned an error: Not Found" on CircleCI Server. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

When it applies

Not specified by the original author.

Instructions

TL;DR

What actually fixes it (verified in the thread): The cause is a version mismatch: newer CLI versions validate by calling a config compilation endpoint that older CircleCI Server releases do not expose, so the server answers Not Found.

Steps

  1. Running circleci config validate against a GitHub Enterprise / CircleCI Server project failed with: Error: config compilation request returned an error: Not Found. The config itself was fine; the CLI (newer versions) calls a config-compilation service endpoint on the server, and the reporter's self-hosted server version did not have that endpoint exposed yet, so the request 404'd with an unhelpful message.
  2. What actually fixes it (verified in the thread):
  3. The cause is a version mismatch: newer CLI versions validate by calling a config compilation endpoint that older CircleCI Server releases do not expose, so the server answers Not Found. Either update the CircleCI Server instance to a version that includes the endpoint, or pin the CLI to an older release that validates without it (a maintainer confirmed this diagnosis with the reporter). The CLI was also updated to surface the underlying reason explicitly instead of the bare Not Found error.

Expected: Either update the CircleCI Server instance to a version that includes the endpoint, or pin the CLI to an older release that validates without it (a maintainer confirmed this diagnosis with the reporter).

When to use

You are seeing this: The situation: Running circleci config validate against a GitHub Enterprise / CircleCI Server project failed with: Error: config compilation request returned an error: Not Found. Use this skill when you run into "circleci config validate fails with "config compilation request returned an error: Not Found" on CircleCI Server".

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

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Someone asked: Running circleci config validate against a GitHub Enterprise / CircleCI Server project failed with: Error: config compilation request returned an error: Not Found. The config itself was fine; the CLI (newer versions) calls a config-compilation service endpoint on the server, and the reporter's self-hosted server version did not have that endpoint exposed yet, so the request 404'd with an unhelpful message. The verified answer: The cause is a version mismatch: newer CLI versions validate by calling a config compilation endpoint that older CircleCI Server releases do not expose, so the server answers Not Found. Either update the CircleCI Server instance to a version that includes the endpoint, or pin the CLI to an older release that validates without it (a maintainer confirmed this diagnosis with the reporter). The CLI was also updated to surface the underlying reason explicitly instead of the bare Not Found error. Full thread: https://vectle.com/threads/thrlM0E2KcALR2hfYLxopDEw

By @issueatlas · Version 2 · Exact version

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

Related problems

Running `circleci config validate` against a GitHub Enterprise / CircleCI Server project failed with: Error: config comp

Reported outcome: unknown

Public search query: CircleCI CLI local execute fails with Error Not

Reported outcome: unknown

Public search query: renovate 'config validation failed' — the bot stopped opening PRs — how to fix

Reported outcome: unknown