Unable to upgrade from 24 to 25

Unable to upgrade from 24 to 25 via docker compose

app_1 | Initializing nextcloud 25.0.6.1 …
app_1 | Upgrading nextcloud from 24.0.2.1 …

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

/var/www/html/lib/composer/composer/autoload_real.php
<?php

// 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';
        call_user_func(\Composer\Autoload\ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2::getInitializer($loader));

        $loader->register(true);

        $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;
    }
}

Thanks!

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!

I have similar issue with the latest update. Whenever I run occ, I get the following error:

PHP Warning: require(/config/www/nextcloud/3rdparty/composer/…/mtdowling/jmespath.php/src/JmesPath.php): Failed to open stream: No such file or directory in /config/www/nextcloud/3rdparty/composer/autoload_real.php on line 46
An unhandled exception has been thrown:
Error: Failed opening required ‘/config/www/nextcloud/3rdparty/composer/…/mtdowling/jmespath.php/src/JmesPath.php’ (include_path=‘/config/www/nextcloud/3rdparty/pear/archive_tar:/config/www/nextcloud/3rdparty/pear/console_getopt:/config/www/nextcloud/3rdparty/pear/pear-core-minimal/src:/config/www/nextcloud/3rdparty/pear/pear_exception:/config/www/nextcloud/apps’) in /config/www/nextcloud/3rdparty/composer/autoload_real.php:46
Stack trace:
#0 /config/www/nextcloud/3rdparty/composer/autoload_real.php(50): {closure}()
#1 /config/www/nextcloud/3rdparty/autoload.php(25): ComposerAutoloaderInit2f23f73bc0cc116b4b1eee1521aa8652::getLoader()
#2 /config/www/nextcloud/lib/base.php(622): require_once(‘…’)
#3 /config/www/nextcloud/lib/base.php(1196): OC::init()
#4 /config/www/nextcloud/console.php(48): require_once(‘…’)
#5 /config/www/nextcloud/occ(11): require_once(‘…’)