So, while debugging OAuth2 it seems that one of the email accounts' configurations is busted. We get this error:
Uncaught Error: Call to a member function setConfigClass() on null
... when trying to set a new config up for one of the emails on the system.
Full error trace with minor sanitization here:
[Thu Oct 13 16:36:12.150380 2022] [php:error] [pid 22682] [client 10.1.250.130:56072] PHP Fatal error: Uncaught Error: Call to a member function setConfigClass() on null in phar:///var/www/html/include/plugins/auth-oauth2.phar/oauth2.php:592\nStack trace:\n#0 phar:///var/www/html/include/plugins/auth-oauth2.phar/oauth2.php(405): GenericEmailOauth2Provider->getPluginInstance()\n#1 phar:///var/www/html/include/plugins/auth-oauth2.phar/oauth2.php(417): OAuth2ProviderBackend->getConfig()\n#2 /var/www/html/include/class.email.php(567): OAuth2ProviderBackend->getConfigForm()\n#3 /var/www/html/include/class.email.php(631): EmailAccount->getOAuth2ConfigForm()\n#4 /var/www/html/include/ajax.email.php(23): EmailAccount->getAuthConfigForm()\n#5 /var/www/html/include/class.dispatcher.php(151): EmailAjaxAPI->configureAuth()\n#6 /var/www/html/include/class.dispatcher.php(38): UrlMatcher->dispatch()\n#7 /var/www/html/include/class.dispatcher.php(120): Dispatcher->resolve()\n#8 /var/www/html/include/class.dispatcher.php(38): UrlMatcher->dispatch()\n#9 /var/www/html/scp/ajax.php(326): Dispatcher->resolve()\n#10 {main}\n thrown in phar:///var/www/html/include/plugins/auth-oauth2.phar/oauth2.php on line 592, referer: https://[snip]/scp/emails.php?id=5
Anyone know how to resolve this? I can't set up any authentication for this user because it's hard-failing when we try and open the config page, and I can't go to Legacy auth because that fails and won't save.