ankitpokhrel / jira-cli

🔥 Feature-rich interactive Jira command line.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: invalid character '<' looking for beginning of value when trying to fetch any commands

csamcharles opened this issue · comments

Describe the bug
When performing any commands I get this error

~ 1m 34s ❯ jira issue list
Error: invalid character '<' looking for beginning of value

Please provide following details

  1. JiraCLI Version:
~ ❯ jira version
(Version="1.4.0", GitCommit="eb842e18014303a575fde8e19508b3c7c13982c5", CommitDate="2023-05-09T07:09:45+00:00", GoVersion="go1.19.4", Compiler="gc", Platform="darwin/amd64")   
  1. Are you using Jira cloud or on-premise jira server?
SERVER INFO
-----------

Version:         8.20.11
Build Number:    820011
Deployment Type: Server
Default Locale:    
  1. What operating system are you using? Also mention version.
macOs Ventura 13.3.1 (a)    
  1. What terminal are you using? Also mention version.
iTerm 2 Build 3.4.19

To Reproduce

Steps to reproduce the behavior:

  1. install latest jira-cli
  2. configure server via jira init
  3. try any fetch of issues etc
  4. See error:
    ~ 1m 16s ❯ jira issue list -a$(jira me)
    Error: invalid character '<' looking for beginning of value
commented

Hi @csamcharles, I believe your instance is returning a HTML response because of some error (probably 404). Could you please check which endpoint is failing with jira issue list -a$(jira me) --debug?

Hi @ankitpokhrel , thanks for the reply. Redacted the host and bearer which both look correct. Query looks correct also:

~ ❯ jira issue list -q "summary ~ test" --debug
Using config file: /Users/chcharles/.config/.jira/.config.yml
JQL: project="TBX3" AND summary ~ test ORDER BY created DESC
⠧ Fetching issues...

REQUEST DETAILS
------------------------------------------------------------

GET /rest/api/3/search?jql=project%3D%22TBX3%22+AND+summary+~+test+ORDER+BY+created+DESC&startAt=0&maxResults=100 HTTP/1.1

I'm seeing the same, and this was working at some point previously... I can directly query with the host, request, and bearer auth reported by --debug and I get the expected JSON response.
In my case it may be related to differences when using a corporate VPN, but I don't see why httpie works fine when I'm connected and jira-cli does not.

Hi, I've had the same and realized my instance does not support the v3 REST requests.

The solution in my case was doing jira init over and choosing "Local" Jira instance.

Hi, I've had the same and realized my instance does not support the v3 REST requests.

The solution in my case was doing jira init over and choosing "Local" Jira instance.

This has solved this issue for me.

Thank you!