jira-cli: `404 Not Found` on selecting the default board

Describe the bug

Hello! ๐Ÿ‘‹๐Ÿผ Iโ€™m trying to set this up for an internal board thatโ€™s under a project, but this fails with a 404.

โ”Œ[rexagod@nebuchadnezzar] [/dev/pts/0] [1]
โ””[~]> jira init
? Installation type: Cloud
? Link to Jira server: https://issues.redhat.com
? Login email: <email>
? Default project: <project>
? Default board: <board>

โœ— Received unexpected response '404 Not Found' from jira. Please try again.

Please provide following details

  1. JiraCLI Version:
    (Version="main", GitCommit="eb842e18014303a575fde8e19508b3c7c13982c5", CommitDate="2023-05-09T07:09:45+00:00", GoVersion="go1.20.4", Compiler="gc", Platform="linux/amd64")
    
  2. Are you using Jira cloud or on-premise jira server?
    โœ— Missing configuration file.
    Run 'jira init' to configure the tool.
    
  3. What operating system are you using? Also mention version.
    NAME="Fedora Linux"
    VERSION="38 (Workstation Edition)"
    ID=fedora
    VERSION_ID=38
    
  4. What terminal are you using? Also mention version.
    kitty 0.28.1
    

To Reproduce

Steps to reproduce the behavior:

  1. I encountered some errors initially, so I followed https://github.com/ankitpokhrel/jira-cli/issues/477#issuecomment-1258364716 to fix them.
  2. On selecting a board, it still seems to fail (with a different error, 404).

Expected behavior It successfully fetches the board details and creates the config.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 17 (5 by maintainers)

Most upvoted comments

@rexagod I just noticed that youโ€™ve selected Installation type as Cloud, https://issues.redhat.com is a Local installation so please select Local as an installation type during jira init. That should solve your issue.

@jonathf Interestingly I couldnโ€™t reproduce the issue in the same Jira version as yours v9.4.7. Could you check the output of jira init --debug, is it also failing on createmeta endpoint?

@ankitpokhrel Thank you for looking into this! Please find the answers to your questions below, and feel free to let me know if I can help with anything else from my side! ๐Ÿ˜ƒ

To make sure I understand the problem correctly, are you are getting 404 after selecting the board that is listed in Default board dropdown?

Correct.

Could you please check which API fails using the --debug flag?

โ”Œ[rexagod@nebuchadnezzar] [/dev/pts/0] 
โ””[~]> jira init --debug
? Installation type: Cloud
? Link to Jira server: https://issues.redhat.com
? Login email: <email>
โ น Verifying login details...

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

GET /rest/api/2/myself HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer [redacted]

โ ‡ Fetching projects...

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

GET /rest/api/2/project?expand=lead HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer [redacted]

? Default project: <project>
โ ‡ Fetching boards for project <project>...

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

GET /rest/agile/1.0/board?projectKeyOrId=<project> HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer [redacted]

? Default board: <board>
โ ธ Configuring metadata. Please wait...

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

GET /rest/api/2/issue/createmeta?projectKeys=<project>&expand=projects.issuetypes.fields HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer [redacted]


โœ— Received unexpected response '404 Not Found' from jira. Please try again.

There is a --board flag available in the init cmd that can be used to skip board selection step. That should help you with config generation. Does this temporarily solve your problem?

Doesnโ€™t seem like it. ๐Ÿ˜•

โ”Œ[rexagod@nebuchadnezzar] [/dev/pts/0] [1]
โ””[~]> jira init --board "<board>" --debug
? Installation type: Cloud
? Link to Jira server: https://issues.redhat.com
? Login email: <email>
โ  Verifying login details...

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

GET /rest/api/2/myself HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer [redacted]

โ ฆ Fetching projects...

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

GET /rest/api/2/project?expand=lead HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer [redacted]

? Default project: <project>
โ  Fetching boards for project '<project>'...

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

GET /rest/agile/1.0/board?projectKeyOrId=<project> HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer [redacted]

โ ผ Configuring metadata. Please wait...

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

GET /rest/api/2/issue/createmeta?projectKeys=<project>&expand=projects.issuetypes.fields HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer [redacted]

โœ— Received unexpected response '404 Not Found' from jira. Please try again.

@ankitpokhrel Thanks again for the timely responses and all the work you put into this! ๐Ÿš€

Facinating, I missed that as well. All three of us assumed that the server should be cloud. It now works here as well.

Thank you for the help everyone.

I guess we can close the issue now.