[/details]
Nextcloud version (eg, 20.0.5): 24.0.4
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 7.4.3
The issue you are facing: Upgraded from 23.0.3 to 23.0.4 and it fails ending up in maintenance mode.
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Run 24.0.3
- Upgrade to 24.0.4 when the option is provided
- Watch the upgrade crash and burn
The output of your Nextcloud log in Admin > Logging:
{"reqId":"hrG6ZCP4mOfZFSk2TDDi","level":1,"time":"2022-08-12T20:51:04+00:00","remoteAddr":"192.168.100.74","user":"--","app":"no app in context","method":"GET","url":"/csrftoken","message":"Unable to generate a URL for the named route \"tasks.page.index\" as such route does not exist.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"24.0.3.2","exception":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"tasks.page.index\" as such route does not exist.","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":361,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/CachingRouter.php","line":58,"function":"generate","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/lib/private/URLGenerator.php","line":91,"function":"generate","class":"OC\\Route\\CachingRouter","type":"->"},{"file":"/var/www/nextcloud/lib/private/NavigationManager.php","line":287,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/lib/private/NavigationManager.php","line":113,"function":"init","class":"OC\\NavigationManager","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php","line":199,"function":"getAll","class":"OC\\NavigationManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Defaults.php","line":280,"function":"getShortFooter","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file":"/var/www/nextcloud/lib/public/Defaults.php","line":177,"function":"getLongFooter","class":"OC_Defaults","type":"->"},{"file":"/var/www/nextcloud/core/templates/layout.guest.php","line":54,"function":"getLongFooter","class":"OCP\\Defaults","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":180,"args":["/var/www/nextcloud/core/templates/layout.guest.php"],"function":"include"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":150,"function":"load","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":182,"function":"fetchPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":213,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":302,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":966,"function":"checkMaintenanceMode","class":"OC","type":"::"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":143,"message":"Unable to generate a URL for the named route \"tasks.page.index\" as such route does not exist.","exception":{},"CustomMessage":"Unable to generate a URL for the named route \"tasks.page.index\" as such route does not exist."}}
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'redacted',
'passwordsalt' => 'redacted',
'secret' => 'redacted',
'trusted_domains' =>
array (
0 => 'team.bethanycc.uk',
),
'datadirectory' => '/mnt/nextcloud/data',
'dbtype' => 'mysql',
'version' => '24.0.3.2',
'overwrite.cli.url' => 'https://team.bethanycc.uk',
'htaccess.RewriteBase' => '/',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'redacted',
'dbpassword' => 'redacted',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'filelocking.enabled' => 'true',
'redis' =>
array (
'host' => '/run/redis/redis-server.sock',
'port' => 0,
'dbindex' => 0,
'timeout' => 1.5,
),
'default_phone_region' => 'GB',
'mail_from_address' => 'team',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'redacted',
'mail_smtpsecure' => 'tls',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'twofactor_enforced' => 'true',
'twofactor_enforced_groups' =>
array (
0 => 'redacted',
),
'twofactor_enforced_excluded_groups' =>
array (
),
'mail_smtphost' => 'smtp.gmail.com',
'mail_smtpport' => '587',
'mail_smtpname' => 'redacted',
'mail_smtppassword' => 'redacted',
'social_login_auto_redirect' => false,
'default_language' => 'en_GB',
'default_locale' => 'en_GB',
'maintenance' => true,
'theme' => '',
'loglevel' => 0,
'forcessl' => true,
'allow_local_remote_servers' => true,
'session_keepalive' => true,
'session_lifetime' => 43200,
'app_install_overwrite' =>
array (
0 => 'flowupload',
),
'updater.secret' => 'redacted',
);
The output of your Apache/nginx/system log in /var/log/____
: error.log
[Fri Aug 12 18:02:58.818345 2022] [proxy_fcgi:error] [pid 2076501] [client 192.168.100.74:59467] AH01071: Got error 'PHP message: PHP Warning: require(/var/www/nextcloud/3rdparty/composer/../sabre/uri/lib/functions.php): failed to open stream: No such file or directory in /var/www/nextcloud/3rdparty/composer/autoload_real.php on line 60PHP message: PHP Fatal error: require(): Failed opening required '/var/www/nextcloud/3rdparty/composer/../sabre/uri/lib/functions.php' (include_path='/var/www/nextcloud/3rdparty/pear/archive_tar:/var/www/nextcloud/3rdparty/pear/console_getopt:/var/www/nextcloud/3rdparty/pear/pear-core-minimal/src:/var/www/nextcloud/3rdparty/pear/pear_exception:/var/www/nextcloud/apps') in /var/www/nextcloud/3rdparty/composer/autoload_real.php on line 60'
Trying to run an occ repair yields the following:
djerk@team:~$ sudo -u www-data php -f /var/www/nextcloud/occ maintenance:repair
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
- Repair MySQL collation
- All tables already have the correct collation -> nothing to do
- Repair mime types
- Clean tags and favorites
- 0 tags of deleted users have been removed.
- 0 tags for delete files have been removed.
- 0 tag entries for deleted tags have been removed.
- 0 tags with no entries have been removed.
- Repair invalid shares
- Move .step file of updater to backup location
- Add move avatar background job
- Repair step already executed
- Add preview cleanup background jobs
- Migrate oauth2_clients table to nextcloud schema
- Update the oauth2_access_tokens table schema.
- Update the oauth2_clients table schema.
- Fix potential broken mount points
- No mounts updated
- Repair language codes
- Install new core bundle components
- Add log rotate job
- Clear frontend caches
- Image cache cleared
An unhandled exception has been thrown:
TypeError: Argument 1 passed to OC\EventDispatcher\ServiceEventListener::__invoke() must be an instance of OCP\EventDispatcher\Event, instance of OC\EventDispatcher\GenericEventWrapper given, called in /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php on line 264 and defined in /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php:65
Stack trace:
#0 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(264): OC\EventDispatcher\ServiceEventListener->__invoke()
#1 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(239): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()
#2 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
#3 /var/www/nextcloud/lib/private/EventDispatcher/SymfonyAdapter.php(122): Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
#4 /var/www/nextcloud/lib/private/Files/Node/Node.php(118): OC\EventDispatcher\SymfonyAdapter->dispatch()
#5 /var/www/nextcloud/lib/private/Files/Node/File.php(133): OC\Files\Node\Node->sendHooks()
#6 /var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFile.php(149): OC\Files\Node\File->delete()
#7 /var/www/nextcloud/lib/private/Template/SCSSCacher.php(386): OC\Files\SimpleFS\SimpleFile->delete()
#8 /var/www/nextcloud/lib/private/Repair/ClearFrontendCaches.php(62): OC\Template\SCSSCacher->resetCache()
#9 /var/www/nextcloud/lib/private/Repair.php(124): OC\Repair\ClearFrontendCaches->run()
#10 /var/www/nextcloud/core/Command/Maintenance/Repair.php(125): OC\Repair->run()
#11 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Maintenance\Repair->execute()
#12 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#13 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#14 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#15 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#16 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#17 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')