Upgrade from to 25.0.5

I am following these steps: Upgrade manually β€” Nextcloud latest Administration Manual latest documentation

I am stuck on step 14. When I run the command, I get the following:

$ sudo -u www-data php occ upgrade
An unhandled exception has been thrown:
TypeError: OCA\Theming\ThemingDefaults::__construct(): Argument #3 ($urlGenerator) must be of type OCP\IURLGenerator, OC\User\Session given, called in /var/www/html/nextcloud/lib/private/Server.php on line 1241 and defined in /var/www/html/nextcloud/apps/theming/lib/ThemingDefaults.php:105
Stack trace:
#0 /var/www/html/nextcloud/lib/private/Server.php(1241): OCA\Theming\ThemingDefaults->__construct()
#1 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(162): OC\Server->OC\{closure}()
#2 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#3 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(129): Pimple\Container->offsetGet()
#4 /var/www/html/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
#5 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(57): OC\ServerContainer->query()
#6 /var/www/html/nextcloud/lib/private/Server.php(2154): OC\AppFramework\Utility\SimpleContainer->get()
#7 /var/www/html/nextcloud/lib/private/Console/Application.php(66): OC\Server->getThemingDefaults()
#8 /var/www/html/nextcloud/console.php(97): OC\Console\Application->__construct()
#9 /var/www/html/nextcloud/occ(11): require_once('...')
#10 {main}

Any clues on what I could do?

The supported upgrade path is to be running the latest point release (v24.0.10) within the major release you’re running (v24) before upgrading to a new major release (v25).

I suggest starting there before proceeding further.

Hello jtr, I see. I am now trying to disregard my upgrade attempts. I am now having issues accessing my nextcloud instance and I am getting a 502 gateway error. I can confirm the following:

  1. occ can run
  2. nginx is active
  3. php7.4-fpm is active

Nevermind, I got it to work by not using nginx server. I switched back to apache2 and it worked.