Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
csamcharles opened this issue Jun 15, 2023 · 5 comments

Comments

@csamcharles
Copy link

csamcharles commented Jun 15, 2023

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
@ankitpokhrel
Copy link
Owner

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?

@csamcharles
Copy link
Author

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

@glucas
Copy link

glucas commented Jul 6, 2023

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.

@akozumpl
Copy link

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.

@miloslavnosek
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants