Describe the bug
When running 'tenv tg install -v' using tenv v4.9.3, a valid TENV_GITHUB_TOKEN, and .terragrunt-version, we occasionally receive "Error: unexpected value returned by API". There is no indication in the verbose and trace-level logs of what the unexpected value is, or what the actual error was.
16:10:35 TENV_GITHUB_TOKEN length: 40
16:10:35 Installing Terragrunt via 'tenv tg install -v'
16:10:36 + tenv tg install -v
16:10:36 Resolved version from /home/jenkins/workspace/iac_repo_name_master/.terragrunt-version : 0.97.0
16:10:36 Installing Terragrunt 0.97.0
16:10:36 2026-03-11T20:10:36.173Z [DEBUG] tenv: Can not read remote configuration file: error="open /home/jenkins/.tenv/remote.yaml: no such file or directory"
16:10:36 2026-03-11T20:10:36.173Z [DEBUG] tenv: Search: assets=["terragrunt_linux_amd64", "SHA256SUMS"]
16:10:36 Fetching release information from https://api.github.com/repos/gruntwork-io/terragrunt/releases/tags/v0.97.0
16:10:36 Error: unexpected value returned by API
Similar bugs and lack of error information have been reported before:
To Reproduce
This issue has been observed intermittently, but we do not currently have a reliable set of steps to reproduce it consistently.
Expected behavior
Include more detail in error messages, for example:
- Value received: display the unexpected value returned by the API
- Expected value: example of the expected value (if applicable)
Logs for any errors that occurred, such as:
Screenshots
N/A
Environment (please complete the following information):
Docker Container:
- platform=linux/amd64 debian:stable
- TENV_VERSION=v4.9.3
Additional context
We have attempted reasonable waits and retries to avoid the error, but without luck.
16:10:35 TENV_GITHUB_TOKEN length: 40
16:10:35 Installing Terragrunt via 'tenv tg install -v'
16:10:36 + tenv tg install -v
16:10:36 Resolved version from /home/jenkins/workspace/iac_repo_name_master/.terragrunt-version : 0.97.0
16:10:36 Installing Terragrunt 0.97.0
16:10:36 2026-03-11T20:10:36.173Z [DEBUG] tenv: Can not read remote configuration file: error="open /home/jenkins/.tenv/remote.yaml: no such file or directory"
16:10:36 2026-03-11T20:10:36.173Z [DEBUG] tenv: Search: assets=["terragrunt_linux_amd64", "SHA256SUMS"]
16:10:36 Fetching release information from https://api.github.com/repos/gruntwork-io/terragrunt/releases/tags/v0.97.0
16:10:36 Error: unexpected value returned by API
16:10:36 Retrying in 10 seconds...
...
waits and tries few more times, same results
...
16:11:18 + tenv tg install -v
16:11:18 Resolved version from /home/jenkins/workspace/iac_repo_name_master/.terragrunt-version : 0.97.0
16:11:18 Installing Terragrunt 0.97.0
16:11:18 2026-03-11T20:11:18.214Z [DEBUG] tenv: Can not read remote configuration file: error="open /home/jenkins/.tenv/remote.yaml: no such file or directory"
16:11:18 2026-03-11T20:11:18.214Z [DEBUG] tenv: Search: assets=["terragrunt_linux_amd64", "SHA256SUMS"]
16:11:18 Fetching release information from https://api.github.com/repos/gruntwork-io/terragrunt/releases/tags/v0.97.0
16:11:18 Error: unexpected value returned by API
Describe the bug
When running 'tenv tg install -v' using tenv v4.9.3, a valid TENV_GITHUB_TOKEN, and .terragrunt-version, we occasionally receive "Error: unexpected value returned by API". There is no indication in the verbose and trace-level logs of what the unexpected value is, or what the actual error was.
Similar bugs and lack of error information have been reported before:
tenv tg install latest#508To Reproduce
This issue has been observed intermittently, but we do not currently have a reliable set of steps to reproduce it consistently.
Expected behavior
Include more detail in error messages, for example:
Logs for any errors that occurred, such as:
Screenshots
N/A
Environment (please complete the following information):
Docker Container:
Additional context
We have attempted reasonable waits and retries to avoid the error, but without luck.