Bug 1445703 - fedora.client.bodhi.BodhiClientException: You must provide a captcha_key
Summary: fedora.client.bodhi.BodhiClientException: You must provide a captcha_key
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: python-fedora
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Infrastructure SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1447348 1458163 1464655 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-26 10:42 UTC by Kamil Páral
Modified: 2017-12-12 10:11 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1494644 (view as bug list)
Environment:
Last Closed: 2017-12-12 10:11:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kamil Páral 2017-04-26 10:42:22 UTC
Description of problem:

<snip>
  https://bodhi.fedoraproject.org/updates/FEDORA-2017-cb3894a567

 inst. RPMS: gtk-update-icon-cache-3.22.12-2.fc25.x86_64 - Icon theme caching utility (installed 2 days ago)
           : gtk3-3.22.12-2.fc25.x86_64 - The GIMP ToolKit (GTK+), a library for creating GUIs for X (installed 2 days ago)
           : gtk3-3.22.12-2.fc25.i686 - The GIMP ToolKit (GTK+), a library for creating GUIs for X (installed 2 days ago)
           : gtk3-devel-3.22.12-2.fc25.x86_64 - Development files for GTK+ (installed 2 days ago)

Comment? -1/0/1 -> karma, 'i' -> ignore, other -> skip> 1
Comment> gtk apps work fine
Traceback (most recent call last):
  File "/usr/bin/fedora-easy-karma", line 831, in <module>
    fek = FedoraEasyKarma()
  File "/usr/bin/fedora-easy-karma", line 690, in __init__
    karma)
  File "/usr/bin/fedora-easy-karma", line 815, in send_comment
    res = bc.comment(update["title"], comment, karma=karma)
  File "/usr/lib/python2.7/site-packages/fedora/client/bodhi.py", line 93, in wrapper
    raise BodhiClientException(problems)
fedora.client.bodhi.BodhiClientException: You must provide a captcha_key.


Happens every time I try it. Weird is that abrt doesn't detect it, so I had to report this manually.


Version-Release number of selected component (if applicable):
fedora-easy-karma-0-0.28.20150921gitc932687a.fc25.noarch

How reproducible:
always

Comment 1 Christian Dersch 2017-04-26 16:49:36 UTC
I get the same on Fedora 26, fedora-easy-karma-0-0.30.20160408gitb5cdbc7f.fc26.noarch

Comment 2 Björn 'besser82' Esser 2017-04-26 17:19:48 UTC
Can confirm for f25 and f26.

Comment 3 Pete Walter 2017-04-27 09:32:14 UTC
I was able to get it to work again with:

rm -rf ~/.fedora-easy-karma/ ~/.fedora/

Comment 4 Sandro Bonazzola 2017-04-27 13:28:50 UTC
Same here on fedora-easy-karma-0-0.30.20160408gitb5cdbc7f.fc26.noarch
IMHO ~/.fedora-easy-karma/ is not relevant since the only file included was the ignored cpickle.

Comment 5 Björn 'besser82' Esser 2017-04-27 13:42:39 UTC
(In reply to Pete Walter from comment #3)
> I was able to get it to work again with:
> 
> rm -rf ~/.fedora-easy-karma/ ~/.fedora/

Removing the openid cache seems to be enough to get it working again:

$ rm ~/.fedora/openidbaseclient-sessions.cache


Maybe this can be handled by some exception in easy-karma…

Comment 6 Till Maas 2017-05-04 06:33:16 UTC
*** Bug 1447348 has been marked as a duplicate of this bug. ***

Comment 7 Till Maas 2017-05-04 06:39:38 UTC
I am not sure why the captcha key is missing, but it should be handled in python-fedora afaics. The file ~/.fedora/openidbaseclient-sessions.cache
also contains session IDs for different Fedora web apps, so just removing them in f-e-k seems to be quite radical.

Comment 8 Till Maas 2017-05-04 06:39:52 UTC
I am not sure why the captcha key is missing, but it should be handled in python-fedora afaics. The file ~/.fedora/openidbaseclient-sessions.cache
also contains session IDs for different Fedora web apps, so just removing them in f-e-k seems to be quite radical.

Comment 9 Randy Barlow 2017-05-04 18:37:11 UTC
This may be a Bodhi server-side issue, but I'm not sure yet until I investigate. It also happens with the bodhi 2 CLI:

https://github.com/fedora-infra/bodhi/issues/1503

Comment 10 Kamil Páral 2017-07-04 12:17:15 UTC
Folks, any progress on this? We're getting more reports of this in the test list. Also, even when I deleted ~/.fedora/openidbaseclient-sessions.cache, the problem re-occurred after a short time. So this is a complete showstopper for using fedora-easy-karma for me.

Comment 11 Randy Barlow 2017-07-05 17:29:39 UTC
Hello Kamil!

Have you experienced this issue with the bodhi >= 2 CLI installed, or only with the 0.9 CLI? (Fedora 26+ ships wih the Bodhi 2 CLI, and there is a Copr[0] available from me with the Bodhi 2 CLI for F24/25.)

I had seen this problem briefly with the Bodhi 2 CLI but the problem seemed to go away mysteriously and I now cannot reproduce with that version.


[0] https://copr.fedorainfracloud.org/coprs/bowlofeggs/bodhi/

Comment 12 Harald Reindl 2017-07-05 22:31:13 UTC Comment hidden (abuse)
Comment 13 Björn 'besser82' Esser 2017-07-06 07:59:49 UTC
(In reply to Randy Barlow from comment #11)
> Hello Kamil!
> 
> Have you experienced this issue with the bodhi >= 2 CLI installed, or only
> with the 0.9 CLI? (Fedora 26+ ships wih the Bodhi 2 CLI, and there is a
> Copr[0] available from me with the Bodhi 2 CLI for F24/25.)
> 
> I had seen this problem briefly with the Bodhi 2 CLI but the problem seemed
> to go away mysteriously and I now cannot reproduce with that version.
> 
> 
> [0] https://copr.fedorainfracloud.org/coprs/bowlofeggs/bodhi/

I can still perfectly reproduce with Bodhi 2 CLI on fc26:

Traceback (most recent call last):
  File "/usr/bin/fedora-easy-karma", line 834, in <module>
    fek = FedoraEasyKarma()
  File "/usr/bin/fedora-easy-karma", line 693, in __init__
    karma)
  File "/usr/bin/fedora-easy-karma", line 818, in send_comment
    res = bc.comment(update["title"], comment, karma=karma)
  File "/usr/lib/python2.7/site-packages/fedora/client/bodhi.py", line 118, in wrapper
    raise BodhiClientException(problems)
fedora.client.bodhi.BodhiClientException: You must provide a captcha_key.

Comment 14 Björn 'besser82' Esser 2017-07-06 08:00:29 UTC
*** Bug 1464655 has been marked as a duplicate of this bug. ***

Comment 15 Björn 'besser82' Esser 2017-07-06 08:02:08 UTC
*** Bug 1458163 has been marked as a duplicate of this bug. ***

Comment 16 Randy Barlow 2017-07-06 14:30:37 UTC
It just occurred to me by looking at that traceback that fedora-easy-karma is still using python-fedora to get Bodhi Python bindings instead of the Bodhi 2 CLI. (So even though you have the Bodhi 2 CLI installed, it's not being used here.)

The server requires a captcha_key when the client is not authenticated. I did some work recently in the bindings to rework how Bodhi's bindings do authentication that I think would help here.

Anyways, I think we can fix this in at least Fedora 26+ by patching fedora-easy-karma to use the new Bodhi 2 client bindings.

For Fedora < 26, the problem always is that the bodhi 2 CLI is not backwards compatible and I'm not confident that it's feature complete with bodhi 0.9. Sometimes I think about asking for an exception to the backwards compatibility guideline. Perhaps I should start a thread on devel@ to see what the developers think.

Comment 17 Till Maas 2017-07-06 19:52:50 UTC
(In reply to Randy Barlow from comment #16)

> Anyways, I think we can fix this in at least Fedora 26+ by patching
> fedora-easy-karma to use the new Bodhi 2 client bindings.
> 
> For Fedora < 26, the problem always is that the bodhi 2 CLI is not backwards
> compatible and I'm not confident that it's feature complete with bodhi 0.9.
> Sometimes I think about asking for an exception to the backwards
> compatibility guideline. Perhaps I should start a thread on devel@ to see
> what the developers think.

If the code on Fedora < 26 is broken anyhow I am not sure if there is a big objection for the new code not being feature complete. One remaining problem even after updating all of Fedora would be EPEL. I do not have any statistics but in the past people also used it to report update feedback there. Do you see any chance to provide the new bindings there as well?

Comment 18 Randy Barlow 2017-07-06 21:37:16 UTC
(In reply to Till Maas from comment #17)
> If the code on Fedora < 26 is broken anyhow I am not sure if there is a big
> objection for the new code not being feature complete.

That is a good point, but on the other hand the Bodhi client does at least partially function for Fedora 24/25. It's a bit of a grey area to me - it'd be much more obvious what to do if the Bodhi 0.9 client didn't work at all. This is why I decided to provide it via the Copr so that each user could choose for themselves the experience they want for those versions of Fedora.

> One remaining problem
> even after updating all of Fedora would be EPEL. I do not have any
> statistics but in the past people also used it to report update feedback
> there. Do you see any chance to provide the new bindings there as well?

EPEL 7 does have Bodhi 2 - I went through a special process to ask for an exception to the EPEL update policy since it was backwards-incompatible. EPEL 6 does not have Bodhi 2, but also could not due to not having a new enough Python version and other dependencies. I have never heard from anyone using the Bodhi CLI on EPEL 6 though, so I don't have data about whether it is used there or not.

Comment 19 Harald Reindl 2017-07-13 21:23:41 UTC Comment hidden (abuse)
Comment 20 Kamil Páral 2017-07-26 10:00:56 UTC
It just happened to me again on F26 using bodhi-client-2.8.1-1.fc26.noarch. 

Randy, fedora-easy-karma can hardly start using Bodhi2 client when it's not available in F25 (that would require two different codebases, and it wouldn't solve the problem in F25). This either needs to be fixed in python-fedora (it used to work before, even with Bodhi2 server, so there's clearly some regression somewhere), or Bodhi2 client needs to be pushed even to F25 and then fedora-easy-karma patched. Please note that you don't need to replace older Bodhi client in F25 if you're not sure about it - you can introduce it as a parallel package.

Comment 21 Randy Barlow 2017-07-28 03:22:39 UTC
I filed https://pagure.io/fedora-easy-karma/issue/1 about fedora-easy-karma being updated to use bodhi.client.bindings.

Comment 22 Ken Dreyer 2017-09-22 16:15:44 UTC
With fedora-easy-karma Git master (0c81432c4ec207a293cdf633fa93634a003f71c9) I am still seeing this issue.

Comment> no problems noticed
Traceback (most recent call last):
  File "./fedora-easy-karma.py", line 839, in <module>
    fek = FedoraEasyKarma()
  File "./fedora-easy-karma.py", line 699, in __init__
    karma)
  File "./fedora-easy-karma.py", line 823, in send_comment
    res = bc.comment(update["title"], comment, karma=karma)
  File "/usr/lib/python2.7/site-packages/bodhi/client/bindings.py", line 101, in wrapper
    raise BodhiClientException(problems)
bodhi.client.bindings.BodhiClientException: You must provide a captcha_key.

Comment 23 Randy Barlow 2017-09-22 16:34:32 UTC
Hello Ken!

The current release of Bodhi turns out to also have this captcha bug, but I've written a patch upstream that will fix it in a future release:

https://github.com/fedora-infra/bodhi/issues/1787

That fix won't make it into F25 unfortunately, and this ticket is associated with F25.

Comment 24 Ken Dreyer 2017-09-22 17:33:35 UTC
Thanks Randy! I tried a Git clone of bodhi (a87f5a6169a03d3a03df57bbb713ffb0ad8b80b6) in a virtualenv, and it works properly, even with my old credentials in ~/.fedora that were triggering the crash earlier. Thanks!

Comment 25 Randy Barlow 2017-09-22 17:49:14 UTC
Since I can fix this with a Bodhi update in F26+ and EPEL 7, I'm going to clone this bug to F26 and switch it to the Bodhi component. I'll leave this ticket open, since the fix for F25 will need to be in python-fedora.

I also cannot commit to getting that done before F25 EOLs, due to time constraints. Of course, patches welcome for python-fedora if anyone is so inclined!

Comment 26 Randy Barlow 2017-09-22 17:57:48 UTC
For EPEL 7 and F26+, I've filed this against the Bodhi component:

https://bugzilla.redhat.com/show_bug.cgi?id=1494644

(It makes no sense to me that cloning a bug makes the cloned bug block the clonee…)

Comment 27 Randy Barlow 2017-09-23 15:26:55 UTC
If you install the bodhi-client from my copr[0] for F25, it should work with the newest version of f-e-k to solve this problem. I'm not 100% sure if the new f-e-k that can use bodhi-client is in F25 though… Till?


[0] http://copr.fedorainfracloud.org/coprs/bowlofeggs/bodhi/

Comment 28 Till Maas 2017-09-30 11:37:20 UTC
I just submitted the update:
https://bodhi.fedoraproject.org/updates/FEDORA-2017-da6c16bf49

Comment 29 Fedora End Of Life 2017-11-16 18:33:46 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 30 Fedora End Of Life 2017-12-12 10:11:21 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.