Error unmarshalling response: invalid character '\x1b'
patrickclarkfish opened this issue · 6 comments
Description
Recently gh poi started returning this error error unmarshaling response: invalid character '\x1b' looking for beginning of value
when it reaches the Fetching pull requests step. This happens regardless of repo, org, or PR status. Running with the debug flag doesn't seem to provide any additional helpful info.
Environment
- OS: mac OS Ventura 13.4
- gh (Check with
gh --version
): gh version 2.30.0 (2023-05-30) - gh-poi (Check with
gh ext ls
): gh poi seachicken/gh-poi v0.9.1
Thank you for reporting!
I seem to be having a problem similar to this issue.
#79 (comment)
This error is failed GitHub API response parsing. I would like to know the gh command that caused the error, so can you run gh poi --debug
and tell me the output of run gh [xxxx]
?
run gh [repo view github.com/myorg/coolrepo --json owner,name,parent,defaultBranchRef --jq .]
seems to be the culprit. The output looks like this (with some details obscured):
{ "defaultBranchRef": { "name": "dev" }, "name": "coolrepo", "owner": { "id": "abcd123...xyz==", "login": "myorg" }, "parent": null }
Thanks for the information!
This problem is affected by the change in output with escape sequences by gh since v2.29.0.
cli/cli#7236
$ gh repo view --json name --jq .
I will figure out how to fix it.
Fixed gh poi v0.9.2 has been released.
If you still have problems, please let me know the contents of --debug
again, as I have changed the log format.
I did start with problems again, but a little digging showed that CLICOLOR_FORCE
was enabled which was overriding your changes. I tracked down where that was set and cleaned it up and it works now!
Wow, thank you for your sharing.
I'm reproducing with CLICOLOR_FORCE=1 gh poi
.
Ideally, we would like to avoid the influence of environmental variables, so I will try to figure out how to modify it.