-
Notifications
You must be signed in to change notification settings - Fork 22
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
jipdate thinks 401 Unauthorized is a recoverable error #15
Comments
Yeah, this isn't nice, I will fix it. |
I started look into this, but it seems like @chazy fix here a3dca58 actually took care of this to some degree. But the (new) error message doesn't mention anything about wrong username or password. (I'm starting to wonder if this was actually is what Glen V. also saw in another email thread, i.e., eventually he used wrong credentials and that is the reason we saw the captcha stuff. I can see that too when deliberately giving wrong password). |
I have been having the same issue. I cannot use jipdate at all because of this. It does not matter what I try, whether it's my own issues or those assigned to others. I always get this error. This is the latest master, which I presume includes this fix a3dca58. The fix actually also does not work for me, I do what it is suggested in the message but then the next attempt to run jipdate also fails and asks again to do the same action. I'll try to dig a bit more to figure where it fails. |
Ilias, strange, it very seldom this is showing up for me, it seems to happen either when I haven't been logged into the projects.linaro.org for a while. Occasionally there is a need to enter a Captcha and that is something that the script doesn't handle. But, in those cases I simply go to projects.linaro.org, enter my credentials and the captcha and after that things are working again from the script. The other case when I face issues is when I mistype my password. But most of the time I never have any issues. If you cannot get it to work, please ping me and we can have a Hangout trying to narrow down the problem. Just to be sure, you are running Python2 and not Python3? The latter doesn't work. |
I did another pull this morning and it seems to work now - this included the updates from 13 Oct. |
Just a note that I think it's particularly awkward that jipdate does retries for wrong-password, because that tends to trigger JIRA into "you need to enter a captcha" mode. If you ^C out of the script before it has a chance to do a bunch of wrong-password retries it looks like JIRA doesn't go into captcha mode. So the current behaviour is actively unhelpful rather than merely a UI ugliness... |
Where does jipdate do this retry? I couldn't find that in the code. Is it in the main JIRA module? |
It must be, we're only using the Python "password" module to get the password from the console/shell and then we simply call the login Jira login method. We are not doing any re-tries in the |
It's in ResilientSession's __recoverable method in jira/resilientsession.py. |
pycontribs/jira@e9301fe suggests that retrying on 401 Unauthorized is a deliberate behaviour, attempting to work around Atlassian Cloud sometimes spuriously returning it. |
If you get the password or username wrong then JIRA will give you a 401 Unauthorized response, but jipdate doesn't handle it very gracefully:
...followed by pages and pages of raw HTML/Javascript.
It would be nice to recognize this error code and give the user a helpful error message like "Username or password not recognized".
The text was updated successfully, but these errors were encountered: