Page MenuHomePhabricator

Attempting to install/use OATHAuth extension results in an error with "Class 'Base32\Base32'" not found
Closed, InvalidPublic

Description

Installed the latest OATHAuth into the latest MediaWIki. Attempted to enable TFA for a user. Received this error:

[XrAmQEX1b9@3eajZM1czFAAAAAk] /index.php?title=Special:Manage_Two-factor_authentication&action=enable&module=totp&warn=1 Error from line 67 of /home/awll/mediawiki-1.34.1/extensions/OATHAuth/src/Key/TOTPKey.php: Class 'Base32\Base32' not found

Backtrace:

#0 /home/awll/mediawiki-1.34.1/extensions/OATHAuth/src/HTMLForm/TOTPEnableForm.php(33): MediaWiki\Extension\OATHAuth\Key\TOTPKey::newFromRandom()
#1 /home/awll/mediawiki-1.34.1/extensions/OATHAuth/src/HTMLForm/OATHAuthOOUIHTMLForm.php(66): MediaWiki\Extension\OATHAuth\HTMLForm\TOTPEnableForm->getDescriptors()
#2 /home/awll/mediawiki-1.34.1/extensions/OATHAuth/src/Module/TOTP.php(110): MediaWiki\Extension\OATHAuth\HTMLForm\OATHAuthOOUIHTMLForm->__construct(MediaWiki\Extension\OATHAuth\OATHUser, MediaWiki\Extension\OATHAuth\OATHUserRepository, MediaWiki\Extension\OATHAuth\Module\TOTP)
#3 /home/awll/mediawiki-1.34.1/extensions/OATHAuth/src/Special/OATHManage.php(243): MediaWiki\Extension\OATHAuth\Module\TOTP->getManageForm(string, MediaWiki\Extension\OATHAuth\OATHUser, MediaWiki\Extension\OATHAuth\OATHUserRepository)
#4 /home/awll/mediawiki-1.34.1/extensions/OATHAuth/src/Special/OATHManage.php(187): MediaWiki\Extension\OATHAuth\Special\OATHManage->addCustomContent(MediaWiki\Extension\OATHAuth\Module\TOTP)
#5 /home/awll/mediawiki-1.34.1/extensions/OATHAuth/src/Special/OATHManage.php(100): MediaWiki\Extension\OATHAuth\Special\OATHManage->addModuleHTML(MediaWiki\Extension\OATHAuth\Module\TOTP)
#6 /home/awll/mediawiki-1.34.1/includes/specialpage/SpecialPage.php(575): MediaWiki\Extension\OATHAuth\Special\OATHManage->execute(NULL)
#7 /home/awll/mediawiki-1.34.1/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run(NULL)
#8 /home/awll/mediawiki-1.34.1/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#9 /home/awll/mediawiki-1.34.1/includes/MediaWiki.php(900): MediaWiki->performRequest()
#10 /home/awll/mediawiki-1.34.1/includes/MediaWiki.php(527): MediaWiki->main()
#11 /home/awll/mediawiki-1.34.1/index.php(44): MediaWiki->run()
#12 {main}

Event Timeline

Looks like you don't have some of the required dependencies. You should update them with composer per the installation instructions

Reedy updated the task description. (Show Details)
Reedy subscribed.

Looks like you don't have some of the required dependencies. You should update them with composer per the installation instructions

Almostly certainly.

Also "latest mediawiki" and "latest OATHAuth" are ambiguous

According to the instructions, I should only run composer if I used git, which I did not. I ran composer and it resolve the error, but the instructions are invalid.

MW 1.34
OATHAuth REL1_34-a71bd68

c0ne subscribed.

For some reason, dependencies of this extension are missing from mediawiki 1.38 bundle.

c0ne claimed this task.

Oops, sorry for the noise. It seems I've messed up my local test installation somehow, I've downloaded the bundle again, and it has the required dependencies in place.

Aklapper changed the task status from Resolved to Invalid.Sep 30 2022, 7:44 PM
Aklapper removed c0ne as the assignee of this task.