2021-08-12 02:32:54 [2b2da985-852d-4164-910d-3fca6ec239f0] mw2269 votewiki 1.37.0-wmf.18 exception ERROR: [2b2da985-852d-4164-910d-3fca6ec239f0] /wiki/Special:SecurePoll/create Error: Call to a member function getId() on null {"exception_url":"/wiki/Special:SecurePoll/create","reqId":"2b2da985-852d-4164-910d-3fca6ec239f0","caught_by":"entrypoint"} [Error Error] (/srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/Crypt/GpgCrypt.php:216) Call to a member function getId() on null #0 /srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/Crypt/GpgCrypt.php(157): MediaWiki\Extensions\SecurePoll\Crypt\GpgCrypt->setupHome() #1 /srv/mediawiki/php-1.37.0-wmf.18/includes/htmlform/HTMLFormField.php(322): MediaWiki\Extensions\SecurePoll\Crypt\GpgCrypt::checkEncryptKey(string, array, OOUIHTMLForm) #2 /srv/mediawiki/php-1.37.0-wmf.18/includes/htmlform/HTMLForm.php(693): HTMLFormField->validate(string, array) #3 /srv/mediawiki/php-1.37.0-wmf.18/includes/htmlform/HTMLForm.php(608): HTMLForm->trySubmit() #4 /srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/Pages/CreatePage.php(508): HTMLForm->tryAuthorizedSubmit() #5 /srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/SpecialSecurePoll.php(70): MediaWiki\Extensions\SecurePoll\Pages\CreatePage->execute(array) #6 /srv/mediawiki/php-1.37.0-wmf.18/includes/specialpage/SpecialPage.php(646): MediaWiki\Extensions\SecurePoll\SpecialSecurePoll->execute(string) #7 /srv/mediawiki/php-1.37.0-wmf.18/includes/specialpage/SpecialPageFactory.php(1365): SpecialPage->run(string) #8 /srv/mediawiki/php-1.37.0-wmf.18/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext) #9 /srv/mediawiki/php-1.37.0-wmf.18/includes/MediaWiki.php(925): MediaWiki->performRequest() #10 /srv/mediawiki/php-1.37.0-wmf.18/includes/MediaWiki.php(559): MediaWiki->main() #11 /srv/mediawiki/php-1.37.0-wmf.18/index.php(53): MediaWiki->run() #12 /srv/mediawiki/php-1.37.0-wmf.18/index.php(46): wfIndexMain() #13 /srv/mediawiki/w/index.php(3): require(string)
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T277226 Make Echo notification for when tallying is done | |||
Resolved | Tchanders | T277224 Check on TallyPage.php for tally results and display them | |||
Resolved | • AGueyte | T277222 Create job to tally elections [M] | |||
Resolved | phuedx | T288361 SecurePoll: Tallying an encrypted election on votewiki produces no results | |||
Resolved | STran | T288366 Add more logging to determine what happens to jobs in the wild | |||
Resolved | tstarling | T288711 /wiki/Special:SecurePoll/create Error: Call to a member function getId() on null |
Event Timeline
2 instantiations of GpgCrypt do...
$that = new GpgCrypt( null, null ); $status = $that->setupHome();
Which then means things like this immediately fail (like seen above)...
LoggerFactory::getInstance( 'AdHocDebug' )->info( 'Created the temp directory for GPG decryption', [ 'electionId' => $this->election->getId(), 'tmpDir' => $this->homeDir, ] );
Beacause $this->election is only ever null.
Change 711709 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/extensions/SecurePoll@master] Partial Revert \"Add ad-hoc logging to tally process\"
I don't know if we want to backport this to .17/.18 for prod... Or someone wants to propose another patch to have the logging work in the conditions where $this->election is null
Change 711945 had a related patch set uploaded (by Phuedx; author: Phuedx):
[mediawiki/extensions/SecurePoll@master] Make ad-hoc logging handle election not being set
I'm going to backport it. It looks like it only needs to go to .18 because it was only cherry-picked to .18 in the first place.
Hmm, looks like there was another patch 3 minutes ago. I can backport that one too I guess.
Change 711945 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Make ad-hoc logging handle election not being set
Change 711711 had a related patch set uploaded (by Tim Starling; author: Phuedx):
[mediawiki/extensions/SecurePoll@wmf/1.37.0-wmf.18] Make ad-hoc logging handle election not being set
Change 711711 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@wmf/1.37.0-wmf.18] Make ad-hoc logging handle election not being set
Mentioned in SAL (#wikimedia-operations) [2021-08-12T06:49:28Z] <tstarling@deploy1002> Synchronized php-1.37.0-wmf.18/extensions/SecurePoll/includes/Crypt/GpgCrypt.php: fix for T288711 failure of election creation (duration: 01m 09s)
Change 711709 abandoned by Reedy:
[mediawiki/extensions/SecurePoll@master] Partial Revert \"Add ad-hoc logging to tally process\"
Reason: