Unable to upgrade from 24 to 25

Unable to upgrade from 24 to 25 via docker compose

app_1 | Initializing nextcloud …
app_1 | Upgrading nextcloud from …

After realizing that it was frozen for a while decided to ssh into the container and run

./occ upgrade

And then get the following error

 ./occ upgrade

Warning: require(/var/www/html/lib/composer/composer/../../../lib/public/Log/functions.php): Failed to open stream: No such file or directory in /var/www/html/lib/composer/composer/autoload_real.php on line 53
An unhandled exception has been thrown:
Error: Failed opening required '/var/www/html/lib/composer/composer/../../../lib/public/Log/functions.php' (include_path='.:/usr/local/lib/php') in /var/www/html/lib/composer/composer/autoload_real.php:53
Stack trace:
#0 /var/www/html/lib/composer/composer/autoload_real.php(36): composerRequire749170dad3f5e7f9ca158f5a9f04f6a2('03ae51fe9694f2f...', '/var/www/html/l...')
#1 /var/www/html/lib/composer/autoload.php(12): ComposerAutoloaderInit749170dad3f5e7f9ca158f5a9f04f6a2::getLoader()
#2 /var/www/html/lib/base.php(595): require_once('/var/www/html/l...')
#3 /var/www/html/lib/base.php(1145): OC::init()
#4 /var/www/html/console.php(48): require_once('/var/www/html/l...')
#5 /var/www/html/occ(11): require_once('/var/www/html/c...')
#6 {main}

Content of the below file shown below.
I am out of ideas at this point of where the error may be, my apologies if it’s super obvious and I may be clearly missing it


// autoload_real.php @generated by Composer

class ComposerAutoloaderInit749170dad3f5e7f9ca158f5a9f04f6a2
    private static $loader;

    public static function loadClassLoader($class)
        if ('Composer\Autoload\ClassLoader' === $class) {
            require __DIR__ . '/ClassLoader.php';

     * @return \Composer\Autoload\ClassLoader
    public static function getLoader()
        if (null !== self::$loader) {
            return self::$loader;

        spl_autoload_register(array('ComposerAutoloaderInit749170dad3f5e7f9ca158f5a9f04f6a2', 'loadClassLoader'), true, true);
        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
        spl_autoload_unregister(array('ComposerAutoloaderInit749170dad3f5e7f9ca158f5a9f04f6a2', 'loadClassLoader'));

        require __DIR__ . '/autoload_static.php';


        $includeFiles = \Composer\Autoload\ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2::$files;
        foreach ($includeFiles as $fileIdentifier => $file) {
            composerRequire749170dad3f5e7f9ca158f5a9f04f6a2($fileIdentifier, $file);

        return $loader;

 * @param string $fileIdentifier
 * @param string $file
 * @return void
function composerRequire749170dad3f5e7f9ca158f5a9f04f6a2($fileIdentifier, $file)
    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
        $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

        require $file;


Just ran

 docker exec CONTAINERID su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade'

Did have to chmod 777 custome_apps folder, got the idea from this post… Unable to run occ on command line - PHP fatal error memory exhausted in autoreload_real.php

“Yes, occ command was working fine before upgrade to 21 version. Now the only way to run it is: docker exec nextcloud su - www-data -s /bin/bash -c ‘php -d memory_limit=-1 -f /var/www/html/occ’ - that’s how I was able to add missing db indices. Any other method do not work for me.”

that made the upgrade run! yay!