Stuck in upgrade to 18.0.2.2

Support intro

Sorry to hear youā€™re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If youā€™re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isnā€™t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 18.0.1.3
Operating system and version (eg, Ubuntu 17.04): Unknown alpine-based 4.4.59+
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.16.1
PHP version (eg, 7.1): 7.3.1.5

The issue you are facing:
I am running the Linuxserver.io Nextcloud docker container, and havenā€™t had any issues thus far.
Today, I received a notification of an update, which Iā€™ve done without problems several times before, and so I went to update. I got an error on step 10, and accidentally closed the browser tab by misclicking. Now Nextcloud just seems stuck and I havenā€™t been able to fix it.

Hereā€™s the relevant bits from updater.log:

2020-03-12T16:02:22-0400 74jgDZKfgk [info] Step 9 is in state "end".
2020-03-12T16:02:22-0400 74jgDZKfgk [info] POST request for step "10"
2020-03-12T16:02:22-0400 74jgDZKfgk [info] startStep("10")
2020-03-12T16:02:22-0400 74jgDZKfgk [info] moveNewVersionInPlace()
2020-03-12T16:02:22-0400 74jgDZKfgk [info] storage location: /data/updater-ocwu56t1zodo/downloads/nextcloud/
2020-03-12T16:03:00-0400 5KfUTA8tme [info] request to updater
2020-03-12T16:03:00-0400 5KfUTA8tme [info] currentStep()
2020-03-12T16:03:00-0400 5KfUTA8tme [info] Step 10 is in state "start".
2020-03-12T16:05:40-0400 3txuK8e5bQ [info] request to updater
2020-03-12T16:05:40-0400 3txuK8e5bQ [info] currentStep()
2020-03-12T16:05:40-0400 3txuK8e5bQ [info] Step 10 is in state "start".
2020-03-12T16:05:47-0400 cpIFoM4iwA [info] request to updater
2020-03-12T16:05:47-0400 cpIFoM4iwA [info] currentStep()
2020-03-12T16:05:47-0400 cpIFoM4iwA [info] Step 10 is in state "start".
2020-03-12T16:15:35-0400 vAtsygyVDi [info] request to updater
2020-03-12T16:15:35-0400 vAtsygyVDi [info] currentStep()
2020-03-12T16:15:35-0400 vAtsygyVDi [info] Step 10 is in state "start".
2020-03-12T16:16:05-0400 eArDhpQOYZ [info] request to updater
2020-03-12T16:16:05-0400 eArDhpQOYZ [info] currentStep()
2020-03-12T16:16:05-0400 eArDhpQOYZ [info] Step 10 is in state "start".
2020-03-12T17:11:48-0400 5OLKasc3M2 [info] request to updater
2020-03-12T17:11:48-0400 5OLKasc3M2 [info] currentStep()
2020-03-12T17:11:48-0400 5OLKasc3M2 [info] Step 10 is in state "start".
2020-03-12T17:36:21-0400 CTdSCyYad9 [info] request to updater
2020-03-12T17:36:21-0400 CTdSCyYad9 [info] currentStep()
2020-03-12T17:36:21-0400 CTdSCyYad9 [info] Step 10 is in state "start".
2020-03-12T17:55:13-0400 pcJWJiQTme [info] request to updater
2020-03-12T17:55:13-0400 pcJWJiQTme [info] currentStep()
2020-03-12T17:55:13-0400 pcJWJiQTme [info] Step 10 is in state "start".
2020-03-12T17:55:19-0400 3VW85fiyH8 [info] request to updater
2020-03-12T17:55:19-0400 3VW85fiyH8 [info] currentStep()
2020-03-12T17:55:19-0400 3VW85fiyH8 [info] Step 10 is in state "start".
2020-03-12T17:55:29-0400 TNpXOEuL36 [info] request to updater
2020-03-12T17:55:29-0400 TNpXOEuL36 [info] currentStep()
2020-03-12T17:55:29-0400 TNpXOEuL36 [info] Step 10 is in state "start".
2020-03-12T17:57:10-0400 SRqYfRtalP [info] request to updater
2020-03-12T17:57:10-0400 SRqYfRtalP [info] currentStep()
2020-03-12T17:57:10-0400 SRqYfRtalP [info] Step 10 is in state "start".
2020-03-12T17:57:24-0400 tpPEtFIsqK [info] request to updater
2020-03-12T17:57:24-0400 tpPEtFIsqK [info] currentStep()
2020-03-12T17:57:24-0400 tpPEtFIsqK [info] Step 10 is in state "start".
2020-03-12T17:57:29-0400 MuYgYvsUGu [info] request to updater
2020-03-12T17:57:29-0400 MuYgYvsUGu [info] currentStep()
2020-03-12T17:57:29-0400 MuYgYvsUGu [info] Step 10 is in state "start".
2020-03-12T18:02:14-0400 pgp9lzxZEM [info] request to updater
2020-03-12T18:02:14-0400 pgp9lzxZEM [info] currentStep()
2020-03-12T18:02:14-0400 pgp9lzxZEM [info] Step 10 is in state "start".
2020-03-12T18:50:00-0400 dkJS2xxTLh [info] request to updater
2020-03-12T18:50:00-0400 dkJS2xxTLh [info] currentStep()
2020-03-12T18:50:00-0400 dkJS2xxTLh [info] Step 10 is in state "start".
2020-03-12T18:55:34-0400 T0gRM2f9fs [info] request to updater
2020-03-12T18:55:34-0400 T0gRM2f9fs [info] currentStep()
2020-03-12T18:55:34-0400 T0gRM2f9fs [info] Step 10 is in state "start".
2020-03-12T18:59:38-0400 hAnK0bnwkH [info] request to updater
2020-03-12T18:59:38-0400 hAnK0bnwkH [info] currentStep()
2020-03-12T18:59:38-0400 hAnK0bnwkH [info] Step 10 is in state "start".

Hereā€™s the .step file:
{ā€œstateā€:ā€œstartā€,ā€œstepā€:10}

But I havenā€™t been able to get it to finish.

I have tried some occ commands (mainly trying to force it out of maintenance mode) and I get errors like this:

An unhandled exception has been thrown:
OCP\AppFramework\QueryException: Could not resolve OCA\Settings\AppInfo\Application! Class OCA\Settings\AppInfo\Application does not exist in /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php:106
Stack trace:
#0 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(115): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\Settings\\Ap...')
#1 /config/www/nextcloud/lib/private/ServerContainer.php(150): OC\AppFramework\Utility\SimpleContainer->query('OCA\\Settings\\Ap...', true)
#2 /config/www/nextcloud/lib/base.php(735): OC\ServerContainer->query('OCA\\Settings\\Ap...')
#3 /config/www/nextcloud/lib/base.php(1089): OC::init()
#4 /config/www/nextcloud/console.php(48): require_once('/config/www/nex...')
#5 /config/www/nextcloud/occ(11): require_once('/config/www/nex...')

Iā€™m not exactly sure what nextcloud version I am on since going to the URL just gives me ā€œUpdate in processā€
But in the folder containing the .step file, thereā€™s a backups folder which, the latest backup it contains is nextcloud-18.0.1.3.

Is there a way to abort the update and restore that backup from the shell? I donā€™t have high hopes since occ seems to be hosed right now.

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

Steps to replicate it:

  1. Run nextcloud web updater
  2. Receive error on step 10
  3. Close browser tab

Can anyone advise? I keep all my documents, pictures, calendar and contacts in my Nextcloud so Iā€™m a bit screwed if I canā€™t get it fixed.

Iā€™ve just noticed that /config/www/nextcloud doesnā€™t exist, Iā€™m guessing because it was going to do the upgrade and got rid of it to replace it with the newer version. So that explains why the occ seems hosed. Not sure what do do here.

I was able to (seemingly) fix the issue by these steps:

cd /config/www/nextcloud/updater
sudo -u abc php updater.phar

After following the prompts there, I was able to log into Nextcloud again. I checked Settings > Overview (as I do after every upgrade, to see if I need to run something like db:convert-filecache-bigint or db:add-missing-indices) and it was giving me a warning saying the background jobs hadnā€™t run successfully for two days.

I ran the jobs manually with:

cd /config/www/nextcloud
sudo -u abc php cron.php

Knock on wood but everything seems good now. If anyone else has these problems and arenā€™t using the linuxserver.io container, you should be able to substite the path to your nextcloud installation and www-data for the user above.