Page MenuHomePhabricator

ArgumentCountError: Too few arguments to function MediaWiki\Extension\OATHAuth\OATHUserRepository::remove(), 2 passed in /srv/mediawiki/php-1.38.0-wmf.25/extensions/WebAuthn/src/HTMLForm/WebAuthnDisableForm.php on line 114 and exactly 3 expected
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   ArgumentCountError: Too few arguments to function MediaWiki\Extension\OATHAuth\OATHUserRepository::remove(), 2 passed in /srv/mediawiki/php-1.38.0-wmf.25/extensions/WebAuthn/src/HTMLForm/WebAuthnDisableForm.php on line 114 and
exception.trace
from /srv/mediawiki/php-1.38.0-wmf.25/extensions/OATHAuth/src/OATHUserRepository.php(176)
#0 /srv/mediawiki/php-1.38.0-wmf.25/extensions/WebAuthn/src/HTMLForm/WebAuthnDisableForm.php(114): MediaWiki\Extension\OATHAuth\OATHUserRepository->remove(MediaWiki\Extension\OATHAuth\OATHUser, string)
#1 /srv/mediawiki/php-1.38.0-wmf.25/extensions/WebAuthn/src/HTMLForm/WebAuthnDisableForm.php(74): MediaWiki\Extension\WebAuthn\HTMLForm\WebAuthnDisableForm->authenticate(string)
#2 /srv/mediawiki/php-1.38.0-wmf.25/includes/htmlform/HTMLForm.php(726): MediaWiki\Extension\WebAuthn\HTMLForm\WebAuthnDisableForm->onSubmit(array, MediaWiki\Extension\WebAuthn\HTMLForm\WebAuthnDisableForm)
#3 /srv/mediawiki/php-1.38.0-wmf.25/includes/htmlform/HTMLForm.php(616): HTMLForm->trySubmit()
#4 /srv/mediawiki/php-1.38.0-wmf.25/includes/htmlform/HTMLForm.php(632): HTMLForm->tryAuthorizedSubmit()
#5 /srv/mediawiki/php-1.38.0-wmf.25/extensions/OATHAuth/src/HTMLForm/OATHAuthOOUIHTMLForm.php(81): HTMLForm->show()
#6 /srv/mediawiki/php-1.38.0-wmf.25/extensions/OATHAuth/src/Special/OATHManage.php(263): MediaWiki\Extension\OATHAuth\HTMLForm\OATHAuthOOUIHTMLForm->show(NULL)
#7 /srv/mediawiki/php-1.38.0-wmf.25/extensions/OATHAuth/src/Special/OATHManage.php(194): MediaWiki\Extension\OATHAuth\Special\OATHManage->addCustomContent(MediaWiki\Extension\WebAuthn\Module\WebAuthn)
#8 /srv/mediawiki/php-1.38.0-wmf.25/extensions/OATHAuth/src/Special/OATHManage.php(106): MediaWiki\Extension\OATHAuth\Special\OATHManage->addModuleHTML(MediaWiki\Extension\WebAuthn\Module\WebAuthn)
#9 /srv/mediawiki/php-1.38.0-wmf.25/includes/specialpage/SpecialPage.php(671): MediaWiki\Extension\OATHAuth\Special\OATHManage->execute(NULL)
#10 /srv/mediawiki/php-1.38.0-wmf.25/includes/specialpage/SpecialPageFactory.php(1378): SpecialPage->run(NULL)
#11 /srv/mediawiki/php-1.38.0-wmf.25/includes/MediaWiki.php(315): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#12 /srv/mediawiki/php-1.38.0-wmf.25/includes/MediaWiki.php(910): MediaWiki->performRequest()
#13 /srv/mediawiki/php-1.38.0-wmf.25/includes/MediaWiki.php(564): MediaWiki->main()
#14 /srv/mediawiki/php-1.38.0-wmf.25/index.php(53): MediaWiki->run()
#15 /srv/mediawiki/php-1.38.0-wmf.25/index.php(46): wfIndexMain()
#16 /srv/mediawiki/w/index.php(3): require(string)
#17 {main}
Notes

Saw two errors like these for officewiki in the last 15 minutes.

Event Timeline

From WebAuthnDisableForm.php:

			$this->oathRepo->remove( $this->oathUser, $this->getRequest()->getIP() );

From OATHUserRepository.php:

	public function remove( OATHUser $user, $clientInfo, bool $self ) {

Looks like a regression caused by change 763190 (T210075, T210963; /cc @Legoktm, @Reedy). And somehow missed by Phan, or has the WebAuthn repo simply not had a CI run since the change in OATHAuth?

WebAuthn and OATHAuth haven't changed in wmf.25 o.O

It has been in wmf.24 it seems. Nice catch. I can do the backport if needed

And somehow missed by Phan, or has the WebAuthn repo simply not had a CI run since the change in OATHAuth?

The latter. New commits do fail (example).

Change 769475 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/WebAuthn@master] WebAuthnDisableForm: Mark removal as done by self

https://gerrit.wikimedia.org/r/769475

Change 769298 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/WebAuthn@wmf/1.38.0-wmf.25] Mark removals of WebAuthn as done by self

https://gerrit.wikimedia.org/r/769298

Change 769299 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/WebAuthn@wmf/1.38.0-wmf.24] Mark removals of WebAuthn as done by self

https://gerrit.wikimedia.org/r/769299

Change 769300 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/WebAuthn@REL1_37] Mark removals of WebAuthn as done by self

https://gerrit.wikimedia.org/r/769300

Change 769301 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/WebAuthn@REL1_36] Mark removals of WebAuthn as done by self

https://gerrit.wikimedia.org/r/769301

Change 769302 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/WebAuthn@REL1_35] Mark removals of WebAuthn as done by self

https://gerrit.wikimedia.org/r/769302

Change 769475 merged by jenkins-bot:

[mediawiki/extensions/WebAuthn@master] Mark removals of WebAuthn as done by self

https://gerrit.wikimedia.org/r/769475

Change 769299 merged by jenkins-bot:

[mediawiki/extensions/WebAuthn@wmf/1.38.0-wmf.24] Mark removals of WebAuthn as done by self

https://gerrit.wikimedia.org/r/769299

Change 769298 merged by jenkins-bot:

[mediawiki/extensions/WebAuthn@wmf/1.38.0-wmf.25] Mark removals of WebAuthn as done by self

https://gerrit.wikimedia.org/r/769298

Change 769300 merged by jenkins-bot:

[mediawiki/extensions/WebAuthn@REL1_37] Mark removals of WebAuthn as done by self

https://gerrit.wikimedia.org/r/769300

Change 769301 merged by jenkins-bot:

[mediawiki/extensions/WebAuthn@REL1_36] Mark removals of WebAuthn as done by self

https://gerrit.wikimedia.org/r/769301

Mentioned in SAL (#wikimedia-operations) [2022-03-09T17:28:39Z] <reedy@deploy1002> Synchronized php-1.38.0-wmf.24/extensions/WebAuthn/: T303404 (duration: 00m 51s)

Mentioned in SAL (#wikimedia-operations) [2022-03-09T17:29:37Z] <reedy@deploy1002> Synchronized php-1.38.0-wmf.25/extensions/WebAuthn/: T303404 (duration: 00m 53s)

Sorry about this :(( We should probably make OATHAuth and WebAuthn circular dependencies in CI. I think we could also benefit from just merging the WebAuthn repo into OATHAuth, except that WebAuthn requires the gmp extension, which isn't required by core yet...

I'll file follow-up tasks later today.

Krinkle assigned this task to Reedy.

Follow-up tasks:

Change 769302 merged by jenkins-bot:

[mediawiki/extensions/WebAuthn@REL1_35] Mark removals of WebAuthn as done by self

https://gerrit.wikimedia.org/r/769302