Upgrade Failure 23.0.5.1 > 23.0.6

Nextcloud version (eg, 20.0.5): 23.0.5 -> 23.0.6
Operating system and version (eg, Ubuntu 20.04): AlmaLinux (Centos 8 basically)
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.37 (AlmaLinux)
PHP version (eg, 7.4): 7.4.29

The issue you are facing:
Updating from version 23.0.5 to 23.0.6

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Try to update NextCloud via the web updater
  2. Encounter error

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'xxxxxx',
  'passwordsalt' => 'xxxxxx',
  'secret' => 'xxxxxx',
  'trusted_domains' => 
  array (
    0 => 'xxxxxx',
    1 => 'xxxxxx',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '23.0.4.1',
  'overwrite.cli.url' => 'xxxxxx',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxxx',
  'dbpassword' => 'xxxxxx',
  'installed' => true,
  'htaccess.RewriteBase' => '/',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'xxxxxx',
  'mail_domain' => 'xxxxxx',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'xxxxxx',
  'mail_smtpport' => '25',
  'mail_smtpname' => 'xxxxxx',
  'mail_smtppassword' => 'xxxxxx',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 1.5,
  ),
  'maintenance' => true,
  'theme' => '',
  'loglevel' => 0,
  'default_phone_region' => 'GB',
  'app_install_overwrite' => 
  array (
    0 => 'documentserver_community',
  ),
  'updater.secret' => 'xxxxxx',
);

Output errors in updating error

# sudo -u apache php /var/www/nextcloud/updater/updater.phar
PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib64/php/modules/redis.so (/usr/lib64/php/modules/redis.so: undefined symbol: php_json_decode_ex), /usr/lib64/php/modules/redis.so.so (/usr/lib64/php/modules/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

Current version is 23.0.5.

Update to Nextcloud 23.0.6 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-23.0.6.zip
Open changelog ↗

Steps that will be executed:
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Continue update? [y/N] Y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] Y
PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib64/php/modules/redis.so (/usr/lib64/php/modules/redis.so: undefined symbol: php_json_decode_ex), /usr/lib64/php/modules/redis.so.so (/usr/lib64/php/modules/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Turned on maintenance mode
An unhandled exception has been thrown:
TypeError: Argument 1 passed to Symfony\Component\EventDispatcher\GenericEvent::getArgument() must be of the type string, int given, called in /var/www/nextcloud/lib/private/EventDispatcher/GenericEventWrapper.php on line 83 and defined in /var/www/nextcloud/apps/diary/vendor/symfony/event-dispatcher/GenericEvent.php:60
Stack trace:
#0 /var/www/nextcloud/lib/private/EventDispatcher/GenericEventWrapper.php(83): Symfony\Component\EventDispatcher\GenericEvent->getArgument(0)
#1 /var/www/nextcloud/core/Command/Upgrade.php(152): OC\EventDispatcher\GenericEventWrapper->getArgument(0)
#2 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(251): OC\Core\Command\Upgrade->OC\Core\Command\{closure}(Object(OC\EventDispatcher\GenericEventWrapper), '\\OC\\Repair::ste...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#3 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, '\\OC\\Repair::ste...', Object(OC\EventDispatcher\GenericEventWrapper))
#4 /var/www/nextcloud/lib/private/EventDispatcher/SymfonyAdapter.php(123): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(OC\EventDispatcher\GenericEventWrapper), '\\OC\\Repair::ste...')
#5 /var/www/nextcloud/lib/private/Repair.php(260): OC\EventDispatcher\SymfonyAdapter->dispatch('\\OC\\Repair::ste...', Object(Symfony\Component\EventDispatcher\GenericEvent))
#6 /var/www/nextcloud/lib/private/Repair.php(123): OC\Repair->emit('\\OC\\Repair', 'step', Array)
#7 /var/www/nextcloud/lib/private/Updater.php(252): OC\Repair->run()
#8 /var/www/nextcloud/lib/private/Updater.php(133): OC\Updater->doUpgrade('23.0.5.1', '23.0.4.1')
#9 /var/www/nextcloud/core/Command/Upgrade.php(235): OC\Updater->upgrade()
#10 /var/www/nextcloud/apps/diary/vendor/symfony/console/Command/Command.php(298): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/nextcloud/apps/diary/vendor/symfony/console/Application.php(1015): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/nextcloud/apps/diary/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/nextcloud/apps/diary/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/nextcloud/console.php(99): OC\Console\Application->run()
#16 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#17 {main}
Keep maintenance mode active? [y/N] Y
Maintenance mode kept active

Any assistance would be greatly appreciated! Thank you :slight_smile:

Maybe a problem with phpredis.
Sorry i do not use AlmaLinux (Centos 8 basically)

But read https://www.cyberciti.biz/faq/install-php-redis-on-centos-8-rhel-8-linux/

Check the differences. Only then try to install something. Question possibly before in this thread.

Hiya @devnull,

Thanks for the reply!

I have checked that out and redis is installed.

yum install php-pecl-redis5
Last metadata expiration check: 3:57:00 ago on Thu 30 Jun 2022 11:57:32 BST.
Package php-pecl-redis5-5.3.7-1.el8.remi.7.4.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

sudo systemctl restart php-fpm.service

php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib64/php/modules/redis.so (/usr/lib64/php/modules/redis.so: undefined symbol: php_json_decode_ex), /usr/lib64/php/modules/redis.so.so (/usr/lib64/php/modules/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.4.29 (cli) (built: Apr 12 2022 10:55:38) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.29, Copyright (c), by Zend Technologies

Hi @rowansc1

Not sure where remi puts the PHP binaries but in the same folder there should be a binary called pecl.

You could try executing the following command to build the missing redis.so:

/absolute/path/to/pecl install redis5

Hiya @CFelix,

Thanks for your reply!

I have run the command you have specified. However, I get this.

pecl install redis5
PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib64/php/modules/redis.so (/usr/lib64/php/modules/redis.so: undefined symbol: php_json_decode_ex), /usr/lib64/php/modules/redis.so.so (/usr/lib64/php/modules/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
No releases available for package "pecl.php.net/redis5"
install failed

For reference,

These are my installed modules:

These are located in the /usr/lib64/php/modules/ directory.

ls
apcu.so      ctype.so  fileinfo.so  gmp.so       intl.so      mysqli.so     pdo.so         rar.so        sockets.so  sysvsem.so    xml.so
bcmath.so    curl.so   ftp.so       iconv.so     json.so      mysqlnd.so    pdo_sqlite.so  redis.so      sodium.so   sysvshm.so    xmlwriter.so
bz2.so       dom.so    gd.so        igbinary.so  mbstring.so  opcache.so    phar.so        shmop.so      sqlite3.so  tokenizer.so  xsl.so
calendar.so  exif.so   gettext.so   imagick.so   msgpack.so   pdo_mysql.so  posix.so       simplexml.so  sysvmsg.so  xmlreader.so  zip.so

Hey @rowansc1

Thank you for the module folder output. The redis module is there, so I have analysed your error report again and may have found the issue.

It looks like there is a loading order conflict between the JSON and Redis module.

Please could you check your php.ini if extension=redis.so is present and uncommented? If so, please comment it in there and restart your PHP.

Now go to your php.d folder (might be under /etc/). This should contain *.ini files for your modules. Create a redis.ini - add extension=redis.so and save the file.

When you restart PHP now, it should load the modules in their proper order and not output the error anymore.

Hiya @CFelix! Thanks for your help.

I have checked my file. extension=redis.so was in there and uncommented. I have now commented it.

I have created a file in the directory /etc/php.d/ called redis.ini. With the contents:

extension=redis.so

I then restarted nginx.

However, when running sudo -u apache php /var/www/nextcloud/updater/updater.phar I am met with the following error:

PHP Warning:  Module 'redis' already loaded in Unknown on line 0
Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

Current version is 23.0.5.

Update to Nextcloud 23.0.6 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-23.0.6.zip
Open changelog ↗

Steps that will be executed:
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Continue update? [y/N] Y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] Y
PHP Warning:  Module 'redis' already loaded in Unknown on line 0
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
An unhandled exception has been thrown:
TypeError: Argument 1 passed to Symfony\Component\EventDispatcher\GenericEvent::getArgument() must be of the type string, int given, called in /var/www/nextcloud/lib/private/EventDispatcher/GenericEventWrapper.php on line 83 and defined in /var/www/nextcloud/apps/diary/vendor/symfony/event-dispatcher/GenericEvent.php:60
Stack trace:
#0 /var/www/nextcloud/lib/private/EventDispatcher/GenericEventWrapper.php(83): Symfony\Component\EventDispatcher\GenericEvent->getArgument(0)
#1 /var/www/nextcloud/core/Command/Upgrade.php(152): OC\EventDispatcher\GenericEventWrapper->getArgument(0)
#2 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(251): OC\Core\Command\Upgrade->OC\Core\Command\{closure}(Object(OC\EventDispatcher\GenericEventWrapper), '\\OC\\Repair::ste...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#3 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, '\\OC\\Repair::ste...', Object(OC\EventDispatcher\GenericEventWrapper))
#4 /var/www/nextcloud/lib/private/EventDispatcher/SymfonyAdapter.php(123): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(OC\EventDispatcher\GenericEventWrapper), '\\OC\\Repair::ste...')
#5 /var/www/nextcloud/lib/private/Repair.php(260): OC\EventDispatcher\SymfonyAdapter->dispatch('\\OC\\Repair::ste...', Object(Symfony\Component\EventDispatcher\GenericEvent))
#6 /var/www/nextcloud/lib/private/Repair.php(123): OC\Repair->emit('\\OC\\Repair', 'step', Array)
#7 /var/www/nextcloud/lib/private/Updater.php(252): OC\Repair->run()
#8 /var/www/nextcloud/lib/private/Updater.php(133): OC\Updater->doUpgrade('23.0.5.1', '23.0.4.1')
#9 /var/www/nextcloud/core/Command/Upgrade.php(235): OC\Updater->upgrade()
#10 /var/www/nextcloud/apps/diary/vendor/symfony/console/Command/Command.php(298): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/nextcloud/apps/diary/vendor/symfony/console/Application.php(1015): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/nextcloud/apps/diary/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/nextcloud/apps/diary/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/nextcloud/console.php(99): OC\Console\Application->run()
#16 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#17 {main}
Keep maintenance mode active? [y/N] N
PHP Warning:  Module 'redis' already loaded in Unknown on line 0
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Maintenance mode disabled

Maintenance mode is disabled

For reference, the contents of the php.d directory is:

10-opcache.ini   20-dom.ini       20-gmp.ini       20-pdo.ini        20-sodium.ini     20-xml.ini         30-xmlreader.ini  50-redis.ini
20-bcmath.ini    20-exif.ini      20-iconv.ini     20-phar.ini       20-sqlite3.ini    20-xmlwriter.ini   30-zip.ini        opcache-default.blacklist
20-bz2.ini       20-fileinfo.ini  20-intl.ini      20-posix.ini      20-sysvmsg.ini    20-xsl.ini         40-apcu.ini       redis.ini
20-calendar.ini  20-ftp.ini       20-json.ini      20-shmop.ini      20-sysvsem.ini    30-mysqli.ini      40-igbinary.ini
20-ctype.ini     20-gd.ini        20-mbstring.ini  20-simplexml.ini  20-sysvshm.ini    30-pdo_mysql.ini   40-imagick.ini
20-curl.ini      20-gettext.ini   20-mysqlnd.ini   20-sockets.ini    20-tokenizer.ini  30-pdo_sqlite.ini  40-msgpack.ini```

Upon looking at what is called the 50-redis.ini file in that directory. It contains the following:

; Enable redis extension module
extension = redis.so

; phpredis can be used to store PHP sessions.
; To do this, uncomment and configure below

; RPM note : save_handler and save_path are defined
; for mod_php, in /etc/httpd/conf.d/php.conf
; for php-fpm, in /etc/php-fpm.d/*conf

;session.save_handler = redis
;session.save_path = "tcp://host1:6379?weight=1, tcp://host2:6379?weight=2&timeout=2.5, tcp://host3:6379?weight=2"

; Configuration
;redis.arrays.algorithm = ''
;redis.arrays.auth = ''
;redis.arrays.autorehash = 0
;redis.arrays.connecttimeout = 0
;redis.arrays.consistent = 0
;redis.arrays.distributor = ''
;redis.arrays.functions = ''
;redis.arrays.hosts = ''
;redis.arrays.index = 0
;redis.arrays.lazyconnect = 0
;redis.arrays.names = ''
;redis.arrays.pconnect = 0
;redis.arrays.previous = ''
;redis.arrays.readtimeout = 0
;redis.arrays.retryinterval = 0
;redis.clusters.auth = 0
;redis.clusters.cache_slots = 0
;redis.clusters.persistent = 0
;redis.clusters.read_timeout = 0
;redis.clusters.seeds = ''
;redis.clusters.timeout = 0
;redis.pconnect.pooling_enabled = 1
;redis.pconnect.connection_limit = 0
;redis.pconnect.echo_check_liveness = 1
;redis.pconnect.pool_detect_dirty = 0
;redis.pconnect.pool_poll_timeout = 0
;redis.pconnect.pool_pattern => ''
;redis.session.lock_expire = 0
;redis.session.lock_retries = 10
;redis.session.lock_wait_time = 2000
;redis.session.locking_enabled = 0

Should I remove the redis.ini file which I added just now and just leave the 50-redis.ini file?

If there was already one, yes try removing the manually created redis.ini

Hiya @CFelix,

I have done that and restarted apache. I am met with the following error when upgrading:

sudo -u apache php /var/www/nextcloud/updater/updater.phar
Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

Current version is 23.0.5.

Update to Nextcloud 23.0.6 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-23.0.6.zip
Open changelog ↗

Steps that will be executed:
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Continue update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] y
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
An unhandled exception has been thrown:
TypeError: Argument 1 passed to Symfony\Component\EventDispatcher\GenericEvent::getArgument() must be of the type string, int given, called in /var/www/nextcloud/lib/private/EventDispatcher/GenericEventWrapper.php on line 83 and defined in /var/www/nextcloud/apps/diary/vendor/symfony/event-dispatcher/GenericEvent.php:60
Stack trace:
#0 /var/www/nextcloud/lib/private/EventDispatcher/GenericEventWrapper.php(83): Symfony\Component\EventDispatcher\GenericEvent->getArgument(0)
#1 /var/www/nextcloud/core/Command/Upgrade.php(152): OC\EventDispatcher\GenericEventWrapper->getArgument(0)
#2 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(251): OC\Core\Command\Upgrade->OC\Core\Command\{closure}(Object(OC\EventDispatcher\GenericEventWrapper), '\\OC\\Repair::ste...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#3 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, '\\OC\\Repair::ste...', Object(OC\EventDispatcher\GenericEventWrapper))#4 /var/www/nextcloud/lib/private/EventDispatcher/SymfonyAdapter.php(123): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(OC\EventDispatcher\GenericEventWrapper), '\\OC\\Repair::ste...')
#5 /var/www/nextcloud/lib/private/Repair.php(260): OC\EventDispatcher\SymfonyAdapter->dispatch('\\OC\\Repair::ste...', Object(Symfony\Component\EventDispatcher\GenericEvent))
#6 /var/www/nextcloud/lib/private/Repair.php(123): OC\Repair->emit('\\OC\\Repair', 'step', Array)
#7 /var/www/nextcloud/lib/private/Updater.php(252): OC\Repair->run()
#8 /var/www/nextcloud/lib/private/Updater.php(133): OC\Updater->doUpgrade('23.0.5.1', '23.0.4.1')
#9 /var/www/nextcloud/core/Command/Upgrade.php(235): OC\Updater->upgrade()
#10 /var/www/nextcloud/apps/diary/vendor/symfony/console/Command/Command.php(298): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/nextcloud/apps/diary/vendor/symfony/console/Application.php(1015): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/nextcloud/apps/diary/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/nextcloud/apps/diary/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/nextcloud/console.php(99): OC\Console\Application->run()
#16 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#17 {main}
Keep maintenance mode active? [y/N] y
Maintenance mode kept active

Hey @rowansc1

I never came across this Exception but looking at the Stack Trace, it looks like this happened at the repair step during the upgrade.

Can you confirm whether the actual upgrade worked and that your Nextcloud is running fine?

If not, you could try running the repair again via SSH and the OCC command

occ maintenance:repair

Sorry for chiming in but this simply looks like an issue with the diary app. Please try to disable it and upgrade again!

Hiya,

@CFelix, I’ll try that after @szaimen’ idea.

@szaimen, are you able to please let me know of the ooc command which I can execute to disable that application via CLI as I do not have access to the web interface.

occ app:disable diary should do it

I guess any help is appreciated :slight_smile: And you are probably correct, as I missed the app/diary in the Exception.

No worries :+1: This is probably going to solve it already.

1 Like

Hiya,

All seems to be going well until I got the stack exemption below:

sudo -u apache php occ app:disable diary
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
diary 0.0.5 disabled

And then here I ran the upgrader.

sudo -u apache php /var/www/nextcloud/updater/updater.phar
Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

Current version is 23.0.5.

Update to Nextcloud 23.0.6 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-23.0.6.zip
Open changelog ↗

Steps that will be executed:
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Continue update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] y
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Repair step: Repair MySQL collation
Repair info: All tables already have the correct collation -> nothing to do
Repair step: Repair SQLite autoincrement
Repair step: Copy data from accounts table when migrating from ownCloud
Repair step: Drop account terms table when migrating from ownCloud
Updating database schema
Updated database
Update app appointments from App Store
Repair step: Update hook for Appointments app
Repair info: appointments UpdateHook finished
Update app calendar from App Store
Repair step: Update name of the stored view
Update app contacts from App Store
Update app extract from App Store
Update app groupfolders from App Store
Update app mail from App Store
Repair step: Restore default tags that are missing
Repair info: Looking up default tags
Repair info: 3 accounts to check found
Restore default tags that are missing

 Starting ...
 0/3 [>---------------------------]   0%
 Starting ...
 3/3 [============================] 100%
Repair step: Add a generated message-id to all Mail messages that have none
Repair info: Looking up messages without a message-id
Repair step: Purify and migrate collected mail addressesPurify and migrate collected mail addresses

 Starting ...
  0/28 [>---------------------------]   0%An unhandled exception has been thrown:
Error: Class 'Horde_Mail_Rfc822_Address' not found in /var/www/nextcloud/apps/mail/lib/Migration/FixCollectedAddresses.php:78
Stack trace:
#0 /var/www/nextcloud/apps/mail/lib/Migration/FixCollectedAddresses.php(59): OCA\Mail\Migration\FixCollectedAddresses->fixAddress(Object(OCA\Mail\Db\CollectedAddress), Object(OC\Repair))
#1 /var/www/nextcloud/lib/private/Repair.php(125): OCA\Mail\Migration\FixCollectedAddresses->run(Object(OC\Repair))
#2 /var/www/nextcloud/lib/private/legacy/OC_App.php(1081): OC\Repair->run()
#3 /var/www/nextcloud/lib/private/legacy/OC_App.php(1023): OC_App::executeRepairSteps('mail', Array)
#4 /var/www/nextcloud/lib/private/Installer.php(201): OC_App::updateApp('mail')
#5 /var/www/nextcloud/lib/private/Updater.php(415): OC\Installer->updateAppstoreApp('mail')
#6 /var/www/nextcloud/lib/private/Updater.php(274): OC\Updater->upgradeAppStoreApps(Array)
#7 /var/www/nextcloud/lib/private/Updater.php(133): OC\Updater->doUpgrade('23.0.5.1', '23.0.4.1')
#8 /var/www/nextcloud/core/Command/Upgrade.php(235): OC\Updater->upgrade()
#9 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#11 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/nextcloud/console.php(99): OC\Console\Application->run()
#15 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#16 {main}
Keep maintenance mode active? [y/N] y
Maintenance mode kept active

Now this seems to be a different issue. Please try to disable the mail app, too and upgrade again.

Hiya,

This seems to have worked! Thank you all so much.

I deeply appreciate both of your help.

Am I okay to reenable the mail application?

Furthermore, it looks have to not installed the latest version. I tried to upgrade again but I am met with the following error:

sudo -u apache php /var/www/nextcloud/updater/updater.phar
Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

Step 3 is currently in process. Please call this command later.