circleci-cli icon indicating copy to clipboard operation
circleci-cli copied to clipboard

Context store-secret and remove-secret fail with Error: invalid character '<'

Open mattvanstone opened this issue 4 years ago • 3 comments

Meta:

CircleCI CLI Version: 0.1.15338+850f9ac (release)

Operating System: cimg/base:2020.01

CircleCI CLI Diagnostic:

---
CircleCI CLI Diagnostics
---
Debugger mode: false
Config found: /home/circleci/.circleci/cli.yml
API host: https://circleci.com
API endpoint: graphql-unstable
OK, got a token.
Trying an introspection query on API...
Ok.

Current behavior:

Running the store-secret or remove-secret commands results in an error message.

echo "test" | circleci context store-secret github myuser mycontext TEST_KEY --token "[REDACTED]"

Results in

Error: invalid character '<' looking for beginning of value

Expected behavior:

The command should complete successfully and a new secret should be added to the context.

When did this begin / Was this previously working?:

Since version 0.1.15338+850f9ac (release) Version v0.1.15224 does not have this issue

Additional Information:

Downgrading to v0.1.15224 resolves the issue.

While troubleshooting this issue I found that in the current version of the circleci-cli orb (0.1.9), the version parameter on the install job does not work. I created a separate issue for that: https://github.com/CircleCI-Public/circleci-cli-orb/issues/13

mattvanstone avatar Jun 14 '21 23:06 mattvanstone

The same happens for 'list' and 'show' commands - context management is completely broken

qbast avatar Jun 18 '21 20:06 qbast

To rollback to latest working version do curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | sudo VERSION="0.1.15224" bash

markovdigital avatar Jun 25 '21 14:06 markovdigital

As a workaround for this we started using the API directly. Periodically we receive the following response from the API, so it looks like the error here may be in the underlying API rather than in this CLI:

<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>

esheppa avatar Aug 18 '21 02:08 esheppa