Nextcloud 32 -> 33 upgrade failed

What app is this about, and its version: Nextcloud 32.0.7~ynh1 to 33.0.2~ynh1
What YunoHost version are you running: 12.1.39
What type of hardware are you using: Virtual machine

Describe your issue

While trying to upgrade Nextcloud, it ends up with the error below :

Share relevant logs or error messages

DEBUG - + installed_apps_not_compatible_with_future_version=files_archive
DEBUG - + [[ -n files_archive ]]
DEBUG - + ynh_die ‘The following apps are not (yet?) compatible with Nextcloud 33. You should make sure to upgrade the app, or disable it, or wait for it to become compatible before running this upgrade : files_archive’
WARNING - The following apps are not (yet?) compatible with Nextcloud 33. You should make sure to upgrade the app, or disable it, or wait for it to become compatible before running this upgrade : files_archive
ERROR - Failed to upgrade nextcloud: An error occurred inside the app upgrade script : The following apps are not (yet?) compatible with Nextcloud 33. You should make sure to upgrade the app, or disable it, or wait for it to become compatible before running this upgrade : files_archive

So I first check applications in Nextcloud, but I wasn’t able to find witch one was the failing one.

sudo locate files_archive

gave nothing more interesting.

Then I remember that OCC can help a lot with Nextcloud, so I ran :

su root
sudo -u nextcloud php8.3 --define apc.enable_cli=1 /var/www/nextcloud/occ app:list

Then I found

- files_archive: 1.2.8

I removed the Nextcloud application :

sudo -u nextcloud php8.3 --define apc.enable_cli=1 /var/www/nextcloud/occ app:remove files_archive

Now the error message is different, great !

DEBUG - groupfolders new version available: 21.0.6
DEBUG - Error: Database error when running migration 21000Date20250925152053 for app groupfolders
DEBUG - Could not resolve OCA\GroupFolders\ACL\UserMapping\IUserMappingManager! Class can not be instantiated
DEBUG - groupfolders couldn’t be updated
DEBUG - + ynh_exit_properly
DEBUG - + [[ upgrade =~ ^install$|^upgrade$|^restore$ ]]
ERROR - Impossible de mettre à jour nextcloud : Une erreur s’est produite durant l’exécution du script de mise à jour de l’application

From /var/log/nextcloud/nextcloud.log, I can see :

Failure during update of app "groupfolders"

And I cannot access to nextcloud web interface :

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

The update went well, except that I have a problem with "
Code Integrity »

I recovered the “LoginController.php” file by downloading the latest version NC 33.0.2 nextcloud-33.0.2

What I did next,:

cp LoginController.php /var/www/nextcloud/core/Controller

afterward,

sudo -u nextcloud php8.3 --define apc.enable_cli=1 /var/www/nextcloud/occ integrity:check-core
Response after running this command:

An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/nextcloud/lib/private/DB/Connection.php:238
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(458): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(416): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(323): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/nextcloud/lib/private/DB/Connection.php(922): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/nextcloud/lib/private/DB/ConnectionAdapter.php(243): OC\DB\Connection->getDatabaseProvider()
#5 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(97): OC\DB\ConnectionAdapter->getDatabaseProvider()
#6 /var/www/nextcloud/lib/private/AppConfig.php(1353): OC\DB\QueryBuilder\QueryBuilder->expr()
#7 /var/www/nextcloud/lib/private/AppConfig.php(284): OC\AppConfig->loadConfig()
#8 /var/www/nextcloud/lib/private/AppConfig.php(1833): OC\AppConfig->searchValues()
#9 /var/www/nextcloud/lib/private/Memcache/Factory.php(122): OC\AppConfig->getAppInstalledVersions()
#10 /var/www/nextcloud/lib/private/Memcache/Factory.php(163): OC\Memcache\Factory->getGlobalPrefix()
#11 /var/www/nextcloud/lib/private/Server.php(937): OC\Memcache\Factory->createLocking()
#12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(186): OC\Server->OC{closure}()
#13 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}()
#14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(149): Pimple\Container->offsetGet()
#15 /var/www/nextcloud/lib/private/ServerContainer.php(155): OC\AppFramework\Utility\SimpleContainer->query()
#16 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(46): OC\ServerContainer->query()
#17 /var/www/nextcloud/lib/private/Files/View.php(82): OC\AppFramework\Utility\SimpleContainer->get()
#18 /var/www/nextcloud/lib/private/Server.php(425): OC\Files\View->__construct()
#19 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(186): OC\Server->OC{closure}()
#20 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}()
#21 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(149): Pimple\Container->offsetGet()
#22 /var/www/nextcloud/lib/private/ServerContainer.php(155): OC\AppFramework\Utility\SimpleContainer->query()
#23 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(46): OC\ServerContainer->query()
#24 /var/www/nextcloud/lib/private/Server.php(1286): OC\AppFramework\Utility\SimpleContainer->get()
#25 /var/www/nextcloud/lib/base.php(699): OC\Server->boot()
#26 /var/www/nextcloud/lib/base.php(1288): OC::init()
#27 /var/www/nextcloud/console.php(32): require_once(‘…’)
#28 /var/www/nextcloud/occ(33): require_once(‘…’)
#29 {main}

For the past few days, Nextcloud seems to have some problems after updates.

1 Like

Did you try disabling the groupfolders app ?

1 Like

The name has changed: Team Folders (formerly "Group Folders")

1 Like

I read here : Nextcloud "Internal Server Error" -> Exception thrown: OCP\\Files\\GenericFileException - #4 by Sanook

that occ files:scan-app-data can help.

And yes, it helps : no more internal error.

Now I have to check what this command is doing :sweat_smile:

Groupfolders is already deactivated.
I had to enable groupfolder to be able to remove it.

Let’s try again !

Yes ! Problem solved.

The main issue was 2 Nextcloud applications that was incompatible :

files_archive and

I was able to reinstall Team Folder after the upgrade.

I haven’t reinstalled files_archive, as unpacking the file online is probably not a good idea unless you have a high-performance server.

In the app folder, the name remains groupfolders; so php occ only handles this name.

You’re talking about this:

Yes

That being said, it does not solve my problem.

Did you manually install php ?

No !

When I execute this command:

sudo -u nextcloud php8.4 --define apc.enable_cli=1 /var/www/nextcloud/occ integrity:check-core

Here is the result:

  • EXTRA_FILE:
    • .bash_history:
      • expected:
      • current: 43926282d0c493b510784db7ed2bf67cebxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I’m having trouble understanding the connection with .bash_history :thinking:

Would you have this file in your nextcloud folder ?

Can you run this
php8.4 -m | grep -i mysql?

Result:

mysqli
mysqlnd
pdo_mysql

I solved my problem; I just deleted “.bash_history”.
It’s just the history of commands used with “yunohost app shell nextcloud”.

1 Like