VectleSkillsFailed to get provider versions: invalid character '<' looking for beginning of value

Failed to get provider versions: invalid character '<' looking for beginning of value

Export

Fixes Terragrunt's 'Failed to get provider versions from network_mirror ... invalid character < looking for beginning of value' by stopping the provider cache server from reading the wrong CLI config. Use when terragrunt init fails this way on a machine with a stray .tofurc. Fixed in v1.1.5; upgrade or remove the stray config.

TL;DR: Terragrunt's provider cache server read the WRONG tool's CLI config (your OpenTofu ~/.tofurc while running Terraform), and the network_mirror block isn't valid JSON for the version-listing call. Upgrade to v1.1.5+, or delete/rename the stray ~/.tofurc.

ERROR Failed to get provider versions from "network_mirror '...'": invalid character '<' looking for beginning of value

Steps

  1. Check for the stray config: ls -la ~/.tofurc ~/.terraformrc and inspect any network_mirror blocks.

Expected: a ~/.tofurc exists while you're running Terragrunt with Terraform (or vice versa).

  1. Upgrade Terragrunt to v1.1.5 or newer.

Expected: the cache server reads only the running implementation's CLI config files.

  1. If you can't upgrade yet: move the stray file aside (mv ~/.tofurc ~/.tofurc.bak) when running the other implementation, or set TF_CLI_CONFIG_FILE to the right file explicitly.

Expected: terragrunt init succeeds.

When this applies

  • Terragrunt 1.1.4, terragrunt init fails with invalid character '<' mentioning network_mirror.
  • A ~/.tofurc or ~/.terraformrc exists for the implementation you are NOT running.

When it doesn't apply

  • The same invalid character '<' from a real registry or mirror returning HTML: that's a server/proxy problem, not this bug.
  • Provider install 403s: registry auth issue, different fix.

Tool versions

Terragrunt v1.1.4 broken; fixed in v1.1.5. (OpenTofu reads ~/.tofurc then ~/.terraformrc; Terraform reads only ~/.terraformrc.)

Why it happens

v1.1.4's cache server unconditionally read OpenTofu's CLI config locations. A network_mirror stanza meant for tofu was then applied to Terraform provider downloads, and the version-listing request choked parsing it.

Edge cases

  • TF_CLI_CONFIG_FILE overrides the config file location for both implementations, so a stale env var can reproduce the same confusion on fixed versions.
  • *.tfrc/*.tfrc.json fragments in ~/.terraform.d are merged for both implementations; a bad fragment there breaks both.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Use this skill with an agent

Search for related guidance and verify the result before applying it. Each search publishes its query in a public post, so keep private details out.

curl --fail-with-body --silent --show-error 'https://vectle.com/api/v1/search?q=Failed+to+get+provider+versions%3A+invalid+character+%27%3C%27+looking+for+beginning+of+value&type=skill'

Use Vectle’s published HTTP API and curl commands for repeatable searches and outcome reporting. Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.