jira-cli
jira-cli copied to clipboard
Jira init fails at `configuring metadata` step
jira init fails when running /rest/api/2/issue/createmeta endpoint. I am not sure if it's my work instance's specifics, but I get a 404 at that step after choosing a board (even if I choose None). I think this is related due to the createmeta endpoint getting deprecated (https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1304) If you could confirm this, I'd be happy to try and undertake the task of migrating to /rest/api/2/issue/createmeta/{projectIdOrKey}/issuetypes and /rest/api/2/issue/createmeta/{projectIdOrKey}/issuetypes/{issueTypeId}
Please provide following details
- JiraCLI Version:
(Version="v1.5.1", GitCommit="", CommitDate="", GoVersion="go1.22.3", Compiler="gc", Platform="linux/amd64") - Are you using Jira cloud or on-premise jira server? Jira cloud enterprise instance
- What operating system are you using? Also mention version.
Debian Linux on WSL2
Output when running jira init --debug --installation cloud --server https://jira-instance.com --login [email protected] --project DMGTM --board 'None' --auth-type bearer
GET /rest/api/2/myself HTTP/1.1
Host: jira-instance.com
Authorization: Bearer <token>
â ¹ Fetching projects...
REQUEST DETAILS
------------------------------------------------------------
GET /rest/api/2/project?expand=lead HTTP/1.1
Host: jira-instance.com
Authorization: Bearer <token>
â § Fetching boards for project 'DMGTM'...
REQUEST DETAILS
------------------------------------------------------------
GET /rest/agile/1.0/board?projectKeyOrId=DMGTM HTTP/1.1
Host: jira-instance.com
Authorization: Bearer <token>
â ™ Configuring metadata. Please wait...
REQUEST DETAILS
------------------------------------------------------------
GET /rest/api/2/issue/createmeta?projectKeys=DMGTM&expand=projects.issuetypes.fields HTTP/1.1
Host: jira-instance.com
Authorization: Bearer <token>
✗ Received unexpected response '404 ' from jira. Please try again.
Related #742 #726
This was fixed with https://github.com/ankitpokhrel/jira-cli/pull/447 🤔.
Are you sure you are on a cloud instance?
I experience the same behavior with Go: 1.23.0 Jira cloud: v9.4.23 Jira cli: 1.5.1
Interestingly, I don't get a 404 when I try to run it with curl: curl -H "Authorization: Bearer $JIRA_API_TOKEN" "https://jira.mycompany.com/rest/api/2/issue/createmeta?projectKeys=MYPROJ&expand=projects.issuetypes.fields" {"errorMessages":["Issue Does Not Exist"],"errors":{}}%
Still experiencing the following:
$ jira init --debug --installation cloud --server https://issues.redhat.com --login [email protected] --project "RHOAIENG" --board "RHOAI IDE+Docs (standup-optimized)" --auth-type bearer
â ™ Verifying login details...
REQUEST DETAILS
------------------------------------------------------------
GET /rest/api/2/myself HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer <token>
â § Fetching projects...
REQUEST DETAILS
------------------------------------------------------------
GET /rest/api/2/project?expand=lead HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer <token>
â ¹ Fetching boards for project 'RHOAIENG'...
REQUEST DETAILS
------------------------------------------------------------
GET /rest/agile/1.0/board?projectKeyOrId=RHOAIENG HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer <token>
â ‹ Configuring metadata. Please wait...
REQUEST DETAILS
------------------------------------------------------------
GET /rest/api/2/issue/createmeta?projectKeys=RHOAIENG&expand=projects.issuetypes.fields HTTP/1.1
Host: issues.redhat.com
Authorization: Bearer <token>
✗ Received unexpected response '404 Not Found' from jira. Please try again.
System info:
$ jira version
(Version="1.5.2", GitCommit="34221786aaa12d5bc66039d164b6d9587b0799c7", CommitDate="2024-09-20T08:29:56+00:00", GoVersion="go1.23.1", Compiler="gc", Platform="darwin/arm64")
Cloud info:
License Information for Jira
Jira v9.12.15
w.r.t @johnnylambada 's observation above - I think that IS evidence of the 404 error being discussed.. I see similar behavior but when I pass -I to curl - you can see its a 404 response code plainly (the body of the response just happens to return JSON as described above)
$ curl -I -H "Authorization: Bearer $JIRA_API_TOKEN" "https://issues.redhat.com/rest/api/2/issue/createmeta?projectKeys=RHOAIENG&expand=projects.issuetypes.fields"
HTTP/2 404
x-arequestid: 1029x33167465x24
...
@ankitpokhrel I'm facing the same issue. Appreciate your help on this. Thanks!
I'm seeing the same error during this step:
GET /jira/rest/api/2/issue/createmeta?projectKeys=UA&expand=projects.issuetypes.fields HTTP/1.1
✗ Received unexpected response '404 ' from jira. Please try again.