Error while updating fro 21 to 22

Hello I was trying to update from v21 to 22 and got this error.
Already tried to replace the apps folder with the current version release, tried to disable theming app, but to no avail. Cannot upgrade the system.

root@cloud:/var/www/nextcloud# sudo -u www-data php occ upgrade
An unhandled exception has been thrown:
Error: Call to undefined method OC_Defaults::getProductName() in /var/www/nextcloud/apps/theming/lib/ThemingDefaults.php:124
Stack trace:
#0 /var/www/nextcloud/lib/private/Server.php(1152): OCA\Theming\ThemingDefaults->__construct(Object(OC\AllConfig), Object(OC\L10N\LazyL10N), Object(OC\URLGenerator), Object(OC\Memcache\Factory), Object(OCA\Theming\Util), Object(OCA\Theming\ImageManager), Object(OC\App\AppManager), Object(OC\NavigationManager))
#1 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}(Object(OC\Server))
#2 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#3 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet('ThemingDefaults')
#4 /var/www/nextcloud/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query('ThemingDefaults', false)
#5 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query('ThemingDefaults')
#6 /var/www/nextcloud/lib/private/Server.php(2084): OC\AppFramework\Utility\SimpleContainer->get('ThemingDefaults')
#7 /var/www/nextcloud/lib/private/Console/Application.php(73): OC\Server->getThemingDefaults()
#8 /var/www/nextcloud/console.php(97): OC\Console\Application->__construct(Object(OC\AllConfig), Object(OC\EventDispatcher\SymfonyAdapter), Object(OC\AppFramework\Http\Request), Object(OC\Log), Object(OC\MemoryInfo))
#9 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#10 {main}root@cloud:/var/www/nextcloud# cd updater/

Nextcloud version : 21.0.3.1
Operating system and version: Debian 10 Buster
Nginx version : 1.21.3
PHP version : 7.3

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'oc07ceukpzcn',
  'passwordsalt' => '****',
  'secret' => '****',
  'trusted_domains' => 
  array (
    0 => 'somedomain',
    1 => '0.0.0.0',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '21.0.3.1',
  'overwrite.cli.url' => 'somedomain',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_admin',
  'dbpassword' => '****',
  'installed' => true,
  'maintenance' => true,
  'filelocking.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0.0,
  ),
  'loglevel' => 0,
  'theme' => '',
  'updater.secret' => '*****',
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '***',
  'mail_smtpsecure' => 'tls',
  'mail_smtphost' => '*****',
  'mail_smtpport' => '587',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '****',
  'mail_smtppassword' => '****',
  'updater.release.channel' => 'stable',

Thanks in advance :slight_smile:

Do you use a specific theme? If you just use the default, don’t put this option in your config/config.php