Issue upgrading Nextcloud app via web UI

Hello,

I have run into an issue upgrading my Nextcloud app. I have looked through the logs but unfortunately I do not feel that I understand this well enough to effectively troubleshoot. Any insight or ideas would be very appreciated.

My YunoHost server

**Hardware:Zotac Zbox EN760 SFF PC.
YunoHost version: 11.2.9.1
I have access to my server : Through the web admin panel and through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes
If yes, please explain: Installed the Face Recognition app which required some advanced config.
If your request is related to an app, specify its name and version: Nextcloud 28.0.1~ynh1

Description of my issue

I attempted to upgrade the Nextcloud app on my Yunohost instance via the web interface and it failed. I first updated all of the system packages, followed by my attempt to upgrade the app. I am not 100% sure but as far as I am aware the Nextcloud app was functioning before this attempted upgrade. I have not logged into the web interface for the last week or so, but I do use Nextcloud to back up the photos on my phone, and typically it will give me an error notification if it is unable to upload.

Here is the YunoPaste log provided by the installer. https://paste.yunohost.org/raw/ogovenuzec. Additionally when I attempt to access Nextcloud in browser I receive the following generic error message referencing the server log. Unfortunately I am not sure where this log is located so that I may post it.

:"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 YunoPaste log mentions in a warning that /var/www/nextcloud/config/config.php has been edited. Here is a copy of the contents of that file with identifying information removed.


<?php
$CONFIG = array (
  'passwordsalt' => 'REDACTED',
  'secret' => 'REDACTED',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'REDACTED',
  ),
  'datadirectory' => '/home/yunohost.app/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '27.1.4.1',
  'overwrite.cli.url' => 'REDACTED',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'REDACTED',
  'installed' => true,
  'instanceid' => 'REDACTED',
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'updatechecker' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'integrity.check.disabled' => true,
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => '6379',
    'timeout' => '0.0',
    'password' => '',
  ),
  'hashing_default_password' => true,
  'localstorage.allowsymlinks' => true,
  'logout_url' => 'REDACTED',
  'maintenance' => false,
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'loglevel' => 2,
  'simpleSignUpLink.shown' => false,
  'app_install_overwrite' =>
  array (
    0 => 'facerecognition',
  ),
);

Somebody suggested that you may be able to fix the restored install by forcing a self-upgrade (ie staying on the same version but regenerating config etc):

yunohost app upgrade nextcloud --force

Then regarding the failed upgrade attempt:

Error: App "Video converter" cannot be installed because the following dependencies are not fulfilled: Server version 27 or lower is required.

This is the classic issue where one of your nextcloud app is not yet compatible with nextcloud 28

1 Like

Thanks for your suggestion!

Unfortunately the process still failed. The log can be found HERE

I have also discovered that Nextcloud appears to be working through the app, just not through the web interface which is why I did not receive an error notification.

I am wondering if it may be easier to back up the data and reinstall Nextcloud, however I am unsure how to back up the user data or where it is stored for the app.

Error: App "Video converter" cannot be installed because the following dependencies are not fulfilled: Server version 27 or lower is required.

Same stuff with “Video converter”

2 Likes

Thanks for getting back to me!

Unfortunately, without access to the web interface I am having trouble disabling it via the command line. This is what happens when I attempt it.

root@SERVERNAME:/var/www/nextcloud# sudo -u www-data php occ app:disable "Video converter"
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdlib.so' (tried: /usr/lib/php/20200930/pdlib.so (/usr/lib/php/20200930/pdlib.so: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/pdlib.so.so (/usr/lib/php/20200930/pdlib.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
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:140
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1531): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1029): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /var/www/nextcloud/lib/private/DB/Connection.php(262): Doctrine\DBAL\Connection->executeQuery()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery()
#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/nextcloud/lib/private/AppConfig.php(418): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(184): OC\AppConfig->loadConfigValues()
#7 /var/www/nextcloud/lib/private/AppConfig.php(374): OC\AppConfig->getApps()
#8 /var/www/nextcloud/lib/private/legacy/OC_App.php(803): OC\AppConfig->getValues()
#9 /var/www/nextcloud/lib/private/Server.php(736): OC_App::getAppVersions()
#10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\Server->OC\{closure}()
#11 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#13 /var/www/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#15 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(193): OC\AppFramework\Utility\SimpleContainer->get()
#16 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#17 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#19 /var/www/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#20 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#21 /var/www/nextcloud/lib/private/Server.php(1130): OC\AppFramework\Utility\SimpleContainer->get()
#22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\Server->OC\{closure}()
#23 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#24 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#25 /var/www/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#26 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#27 /var/www/nextcloud/lib/private/Server.php(2088): OC\AppFramework\Utility\SimpleContainer->get()
#28 /var/www/nextcloud/lib/private/Files/View.php(107): OC\Server->getLockingProvider()
#29 /var/www/nextcloud/lib/private/Server.php(470): OC\Files\View->__construct()
#30 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(171): OC\Server->OC\{closure}()
#31 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#32 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(138): Pimple\Container->offsetGet()
#33 /var/www/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#34 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#35 /var/www/nextcloud/lib/private/Server.php(1490): OC\AppFramework\Utility\SimpleContainer->get()
#36 /var/www/nextcloud/lib/base.php(635): OC\Server->boot()
#37 /var/www/nextcloud/lib/base.php(1196): OC::init()
#38 /var/www/nextcloud/console.php(48): require_once('...')
#39 /var/www/nextcloud/occ(11): require_once('...')
#40 {main}root@SERVERNAME:/var/www/nextcloud# ^C

the good command should be this one:

sudo -u nextcloud php8.2 --define apc.enable_cli=1 /var/www/nextcloud/occ app:disable video_converter

Unfortunately after several hours I was unable to disable the app via CLI. I was able to get nextcloud working again by taking a backup of the data directory and reinstalling it via the web interface. I did not end up needing to restore the data directory as it was not removed when nextcloud was uninstalled but I recommend a backup anyways.

Please be aware that you need to re-authenticate all clients/apps after this or you could run into fail2ban issues like I did.

1 Like

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