When clicking on F2 to search for assignee, 404 error appears
Desktop:
- OS: MacOS Ventura
- Terminal: warp or default
- Architecture: Apple
- Fjira version: 0.8.3
Describe the bug When clicking on F2 to search for assignee, 404 error appears
To Reproduce Clicking on F2 to search for assignee
Expected behavior Click on f2 and a user will appear to run the filter
@felipereisdev thanks for reporting! I will have a look on that
@felipereisdev thanks for reporting! I will have a look on that
Thank you for this amazing app. I hate Jira. This same 404 error also appears when entering a board.
@felipereisdev mhmm interesting problem - in general Jira API retrurn 404 when you don't have access to the resource.
Could you check underlaying api directly? that's the HTTP request that's sent via app to get list of users:
Users:
curl --location '$YOUR_JIRA_URL/rest/api/2/user/assignable/search?project=$CHOSEN_PROJECT&maxResults=10000' --header 'Authorization: Basic $BASIC_AUTH_TOKEN'
Boards:
curl --location '$YOUR_JIRA_URL/rest/agile/1.0/board?projectKeyOrId=$CHOSEN_PROJECT' --header 'Authorization: Basic $BASIC_AUTH_TOKEN'
BASIC_AUTH_TOKEN is base64(username+":"+token)
@felipereisdev mhmm interesting problem - in general Jira API retrurn 404 when you don't have access to the resource.
Could you check underlaying api directly? that's the HTTP request that's sent via app to get list of users:
Users:
curl --location '$YOUR_JIRA_URL/rest/api/2/user/assignable/search?project=$CHOSEN_PROJECT&maxResults=10000' --header 'Authorization: Basic $BASIC_AUTH_TOKEN'Boards:
curl --location '$YOUR_JIRA_URL/rest/agile/1.0/board?projectKeyOrId=$CHOSEN_PROJECT' --header 'Authorization: Basic $BASIC_AUTH_TOKEN'
BASIC_AUTH_TOKENis base64(username+":"+token)
It's returning Forbidden (403)
@felipereisdev it looks that it's more related to your user permissions, or Jira instance setup. Could you try to access any of those Jira REST API using your credentials?
I would also double-check auth token, I think that in some cases (including that one) - Jira API is returning 404 - not 403 - if there is no access to the resource.
I'm closing it - due to no response from the author
I have the same problem as reported in this issue. I could help out with trouble-shooting. Would love for this to work 😀 Same problem appears when trying to filter on a user. I click F2 to open up user list and that works but then I get the error when I click enter on a user.
I ran the above curl commands, users got 401 back and boards got 403.
@antonbasic okay! if you can help with investigation I think we will manage to solve it 😄 I'm re-opening that issue - but it could be something different. The reported issue was about 404, and I think it's similar to recent comments here: https://github.com/mk-5/fjira/issues/48. It should be fixed already.
but, okay! let us hunt that issue down 😄 - soo those curls are 1:1 the same requests that are sent from the application. Maybe you can play-around using postman or something? Both request should return valid response, examples:
My 401 and 403 seems to was a result of me trying Basic auth first which didn't work. With Bearer token it works fine.
I'm connecting to a on-premise install. Version number of Jira looks to be v9.4.5
Now using 0.11.5 of fjira. Problems are still there. In postman I get successfull response but the payload of the response seems different from yours.
/rest/api/2/user/assignable/search?project=ABC&maxresults=100
@antonbasic there is an open issue about 'on-premise' installation - https://github.com/mk-5/fjira/issues/48
I'm investigating it right now. The current topic is do-assignment API. It looks that 'on-premise' installation, and Jira Cloud have totally different apis - in that one point.
About tokens - you need to change type of access token, to "personal access token".
? Jira Token Type:
1. api token
2. personal token
Enter a number (Default is 1):
You can do it during workspace configuration, or you can edit the existing one: fjira --edit-workspace workspace. You can also go directly to the configuration file, and change it there. ~/.fjira/fjira.yaml
I've tested 'on-premise' installation using that dockerized version: https://github.com/mk-5/fjira/blob/master/scripts/docker-compose-jira-server.yml - and everything looks just fine. I need to check if there is any difference in API between jira versions. That problem, and problem described in #48 will be easily fixable I believe - but I need to reproduce it somehow.
@antonbasic assignment error should be fixed now. I will check boards 403
As you say it might be a problem of the API's being different between versions. Bad on Atlassians part to break the API within the same major version 🤦♂️ I have used personal token the whole time in fjira. assignment works for me as well now, nicely done 👌
Since the version of Jira we are using is an older version and it seems to be quite a few differences between versions I don't think I will bother you with bugs for this version. I just realised that not all tasks are showing in the board view as well. We are moving to Jira cloud at our company, although I'm not sure when the final move is happening, so I will revisit this tool when we do so. Really like the projekt 🙌
@antonbasic I will try to reproduce that issue using dockerized version of Jira :) you know .. reproducing the error is 90% of success 😅