OCC error referring to IStorageFactory

Hello everyone,

I’m new to this forum, so in case of missing something, please let me know.

Today I was trying to fix an issue with my Nextcloud and doing research for more than four hours.

The version is 27.1.1.0, I’m using php8.2, and I’m running Debian GNU/Linux 11 (bullseye) aarch64 on an Raspberry Pi 3 Model B Rev 1.2.

This morning I lost the browser access to my nextcloud. By using the internal IP in a browser there is only the /var/www/html/index.html file shown. When I tried to use the OCC command, I’ve got first the following error:

sudo -u www-data php8.2 /var/www/html/nextcloud/occ
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/html/nextcloud/lib/private/DB/Connection.php:140

Different sources wrote that installing missing php packages should solve it. Indeed, something happened, but a new issue occurred:

sudo -u www-data php /var/www/html/nextcloud/occ
An unhandled exception has been thrown:
Error: Interface "OCP\Files\Storage\IStorageFactory" not found in /var/www/html/nextcloud/lib/private/Files/Storage/StorageFactory.php:30
Stack trace:
#0 /var/www/html/nextcloud/lib/composer/composer/ClassLoader.php(576): include()
#1 /var/www/html/nextcloud/lib/composer/composer/ClassLoader.php(427): Composer\Autoload\{closure}()
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#3 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): ReflectionClass->__construct()
#4 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(142): OC\AppFramework\Utility\SimpleContainer->resolve()
#5 /var/www/html/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#6 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#7 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(193): OC\AppFramework\Utility\SimpleContainer->get()
#8 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#9 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#10 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#11 /var/www/html/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#12 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#13 /var/www/html/nextcloud/lib/private/Server.php(971): OC\AppFramework\Utility\SimpleContainer->get()
#14 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\Server->OC\{closure}()
#15 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#16 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#17 /var/www/html/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#18 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(97): OC\ServerContainer->query()
#19 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#20 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(84): array_map()
#21 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(124): OC\AppFramework\Utility\SimpleContainer->buildClass()
#22 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(142): OC\AppFramework\Utility\SimpleContainer->resolve()
#23 /var/www/html/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#24 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(97): OC\ServerContainer->query()
#25 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#26 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(84): array_map()
#27 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(124): OC\AppFramework\Utility\SimpleContainer->buildClass()
#28 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(142): OC\AppFramework\Utility\SimpleContainer->resolve()
#29 /var/www/html/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#30 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#31 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(193): OC\AppFramework\Utility\SimpleContainer->get()
#32 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#33 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#34 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#35 /var/www/html/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#36 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(97): OC\ServerContainer->query()
#37 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#38 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(84): array_map()
#39 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(124): OC\AppFramework\Utility\SimpleContainer->buildClass()
#40 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(142): OC\AppFramework\Utility\SimpleContainer->resolve()
#41 /var/www/html/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#42 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(97): OC\ServerContainer->query()
#43 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#44 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(84): array_map()
#45 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(124): OC\AppFramework\Utility\SimpleContainer->buildClass()
#46 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(142): OC\AppFramework\Utility\SimpleContainer->resolve()
#47 /var/www/html/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#48 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#49 /var/www/html/nextcloud/core/register_command.php(106): OC\AppFramework\Utility\SimpleContainer->get()
#50 /var/www/html/nextcloud/lib/private/Console/Application.php(114): require_once('...')
#51 /var/www/html/nextcloud/console.php(99): OC\Console\Application->loadCommands()
#52 /var/www/html/nextcloud/occ(11): require_once('...')
#53 {main}

This time I could not find anything related to such an error. Furthermore, I am confused about to error itself. Those issues are often related to things I’ve done before, but this time I was not logged on my server for a few days. So, I hope to get new input by Nextcloud experts to be able to solve my issue.

Is it possible that some PHP modules can break nextcloud? At the moment I’ve got the following php modules installed:

dpkg -l|grep php                        ii  libapache2-mod-php8.2                8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  php-cli                              2:8.2+93+0~20231125.47+debian11~1.gbpc7171d                                all          command-line interpreter for the PHP scripting language (default)
ii  php-common                           2:94+0~20240205.51+debian11~1.gbp6faa2e                                    all          Common files for PHP packages
ii  php-pear                             1:1.10.13+submodules+notgz+2022032202-2+0~20230612.39+debian11~1.gbpfd4c1d all          PEAR Base System
ii  php8.2                               8.2.18-1+0~20240422.54+debian11~1.gbp91aa2d                                all          server-side, HTML-embedded scripting language (metapackage)
ii  php8.2-apcu                          5.1.23-1+0~20231125.39+debian11~1.gbp8bf49a                                arm64        APC User Cache for PHP
ii  php8.2-bcmath                        8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        Bcmath module for PHP
ii  php8.2-bz2                           8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        bzip2 module for PHP
ii  php8.2-cli                           8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        command-line interpreter for the PHP scripting language
ii  php8.2-common                        8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        documentation, examples and common module for PHP
ii  php8.2-curl                          8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        CURL module for PHP
ii  php8.2-gd                            8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        GD module for PHP
ii  php8.2-gmp                           8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        GMP module for PHP
ii  php8.2-igbinary                      3.2.15-1+0~20231202.49+debian11~1.gbpe9ffe8                                arm64        igbinary PHP serializer
ii  php8.2-imagick                       3.7.0-4+0~20231125.43+debian11~1.gbpbf7e27                                 arm64        Provides a wrapper to the ImageMagick library
ii  php8.2-intl                          8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        Internationalisation module for PHP
ii  php8.2-mbstring                      8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        MBSTRING module for PHP
ii  php8.2-memcache                      8.2-2+0~20231129.35+debian11~1.gbpbf55c7                                   arm64        memcache extension module for PHP
ii  php8.2-mysql                         8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        MySQL module for PHP
ii  php8.2-opcache                       8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        Zend OpCache module for PHP
ii  php8.2-phpdbg                        8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        server-side, HTML-embedded scripting language (PHPDBG binary)
ii  php8.2-readline                      8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        readline module for PHP
ii  php8.2-redis                         6.0.2-1+0~20231128.56+debian11~1.gbp9f3071                                 arm64        PHP extension for interfacing with Redis
ii  php8.2-smbclient                     1.1.1-1+0~20231125.26+debian11~1.gbp8be856                                 arm64        PHP wrapper for libsmbclient
ii  php8.2-xml                           8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        DOM, SimpleXML, XML, and XSL module for PHP
ii  php8.2-zip                           8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        Zip module for PHP

I am glad for any hint where to look for to repair my cloud.

Meanwhile, I reinstalled the PHP modules recommended by docs.nextcloud.com/ :

$ dpkg -l|grep php
ii  libapache2-mod-php                   2:8.3+94+0~20240205.51+debian11~1.gbp6faa2e                                all          server-side, HTML-embedded scripting language (Apache 2 module) (default)
ii  libapache2-mod-php8.2                8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  libapache2-mod-php8.3                8.3.7-1+0~20240513.33+debian11~1.gbp71539c                                 arm64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  php-bcmath                           2:8.3+94+0~20240205.51+debian11~1.gbp6faa2e                                all          Bcmath module for PHP [default]
ii  php-cli                              2:8.2+93+0~20231125.47+debian11~1.gbpc7171d                                all          command-line interpreter for the PHP scripting language (default)
ii  php-common                           2:94+0~20240205.51+debian11~1.gbp6faa2e                                    all          Common files for PHP packages
ii  php-curl                             2:8.3+94+0~20240205.51+debian11~1.gbp6faa2e                                all          CURL module for PHP [default]
ii  php-gd                               2:8.3+94+0~20240205.51+debian11~1.gbp6faa2e                                all          GD module for PHP [default]
ii  php-gmp                              2:8.3+94+0~20240205.51+debian11~1.gbp6faa2e                                all          GMP module for PHP [default]
ii  php-imagick                          3.7.0-4+0~20231125.43+debian11~1.gbpbf7e27                                 arm64        Provides a wrapper to the ImageMagick library
ii  php-intl                             2:8.3+94+0~20240205.51+debian11~1.gbp6faa2e                                all          Internationalisation module for PHP [default]
ii  php-mbstring                         2:8.3+94+0~20240205.51+debian11~1.gbp6faa2e                                all          MBSTRING module for PHP [default]
ii  php-mysql                            2:8.3+94+0~20240205.51+debian11~1.gbp6faa2e                                all          MySQL module for PHP [default]
ii  php-pear                             1:1.10.13+submodules+notgz+2022032202-2+0~20230612.39+debian11~1.gbpfd4c1d all          PEAR Base System
ii  php-xml                              2:8.3+94+0~20240205.51+debian11~1.gbp6faa2e                                all          DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default]
ii  php-zip                              2:8.3+94+0~20240205.51+debian11~1.gbp6faa2e                                all          Zip module for PHP [default]
ii  php8.2                               8.2.18-1+0~20240422.54+debian11~1.gbp91aa2d                                all          server-side, HTML-embedded scripting language (metapackage)
ii  php8.2-apcu                          5.1.23-1+0~20231125.39+debian11~1.gbp8bf49a                                arm64        APC User Cache for PHP
ii  php8.2-bcmath                        8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        Bcmath module for PHP
ii  php8.2-bz2                           8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        bzip2 module for PHP
ii  php8.2-cli                           8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        command-line interpreter for the PHP scripting language
ii  php8.2-common                        8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        documentation, examples and common module for PHP
ii  php8.2-curl                          8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        CURL module for PHP
ii  php8.2-gd                            8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        GD module for PHP
ii  php8.2-gmp                           8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        GMP module for PHP
ii  php8.2-igbinary                      3.2.15-1+0~20231202.49+debian11~1.gbpe9ffe8                                arm64        igbinary PHP serializer
ii  php8.2-imagick                       3.7.0-4+0~20231125.43+debian11~1.gbpbf7e27                                 arm64        Provides a wrapper to the ImageMagick library
ii  php8.2-intl                          8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        Internationalisation module for PHP
ii  php8.2-mbstring                      8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        MBSTRING module for PHP
ii  php8.2-memcache                      8.2-2+0~20231129.35+debian11~1.gbpbf55c7                                   arm64        memcache extension module for PHP
ii  php8.2-mysql                         8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        MySQL module for PHP
ii  php8.2-opcache                       8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        Zend OpCache module for PHP
ii  php8.2-phpdbg                        8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        server-side, HTML-embedded scripting language (PHPDBG binary)
ii  php8.2-readline                      8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        readline module for PHP
ii  php8.2-redis                         6.0.2-1+0~20231128.56+debian11~1.gbp9f3071                                 arm64        PHP extension for interfacing with Redis
ii  php8.2-smbclient                     1.1.1-1+0~20231125.26+debian11~1.gbp8be856                                 arm64        PHP wrapper for libsmbclient
ii  php8.2-xml                           8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        DOM, SimpleXML, XML, and XSL module for PHP
ii  php8.2-zip                           8.2.18-1+0~20240411.52+debian11~1.gbp91aa2d                                arm64        Zip module for PHP
[...]

Unfortunately without a success:

$ sudo -u www-data php /var/www/html/nextcloud/occ
An unhandled exception has been thrown:
Error: Interface "OCP\Files\Storage\IStorageFactory" not found in /var/www/html/nextcloud/lib/private/Files/Storage/StorageFactory.php:30
[...]

Problem seems to be solved by a new installation of a higher nextcloud version (29). I was not able to find a solution for the original issue.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.