Webupdate failed NC 21-->21.0.1

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, 20.0.5): 21.0.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu Sever 20.04.02
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 7.4

The issue you are facing:

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

Steps to replicate it:

  1. Started webupdater
  2. webupdater stopped at step 7
  3. broke my entire nextcloud + collabera + redis + HPB instance hosted on digitalocean droplet

The output of your Nextcloud log in Admin > Logging:

2021-04-12T06:51:44+0000 NfUWFHNpvh [info] storage location: /nextcloud-data/updater-ocoi7zltix0b/downloads/
2021-04-12T06:51:45+0000 NfUWFHNpvh [info] end of verifyIntegrity()
2021-04-12T06:51:45+0000 NfUWFHNpvh [info] endStep("5")
2021-04-12T06:51:45+0000 NfUWFHNpvh [info] executeStep request for step "6"
2021-04-12T06:51:45+0000 NfUWFHNpvh [info] startStep("6")
2021-04-12T06:51:45+0000 NfUWFHNpvh [info] extractDownload()
2021-04-12T06:51:45+0000 NfUWFHNpvh [info] storage location: /nextcloud-data/updater-ocoi7zltix0b/downloads/
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] end of extractDownload()
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] endStep("6")
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] executeStep request for step "7"
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] startStep("7")
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] setMaintenanceMode("true")
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] configFileName /var/www/html/updater/../config/config.php
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] end of setMaintenanceMode()
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] endStep("7")
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] executeStep request for step "8"
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] startStep("8")
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] replaceEntryPoints()
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] replace index.php
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] replace status.php
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] replace remote.php
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] replace public.php
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] replace ocs/v1.php
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] replace ocs/v2.php
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] end of replaceEntryPoints()
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] endStep("8")
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] executeStep request for step "9"
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] startStep("9")
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] deleteOldFiles()
2021-04-12T06:51:48+0000 NfUWFHNpvh [error] executeStep request failed with other exception
2021-04-12T06:51:48+0000 NfUWFHNpvh [error] Exception: Exception
Message: Could not unlink: /var/www/html/updater/../.htaccess
Code:0
Trace:
#0 phar:///var/www/html/updater/updater.phar/lib/UpdateCommand.php(381): NC\Updater\Updater->deleteOldFiles()
#1 phar:///var/www/html/updater/updater.phar/lib/UpdateCommand.php(233): NC\Updater\UpdateCommand->executeStep()
#2 phar:///var/www/html/updater/updater.phar/vendor/symfony/console/Command/Command.php(256): NC\Updater\UpdateCommand->execute()
#3 phar:///var/www/html/updater/updater.phar/vendor/symfony/console/Application.php(820): Symfony\Component\Console\Command\Command->run()
#4 phar:///var/www/html/updater/updater.phar/vendor/symfony/console/Application.php(187): Symfony\Component\Console\Application->doRunCommand()
#5 phar:///var/www/html/updater/updater.phar/vendor/symfony/console/Application.php(118): Symfony\Component\Console\Application->doRun()
#6 phar:///var/www/html/updater/updater.phar/updater.php(10): Symfony\Component\Console\Application->run()
#7 /var/www/html/updater/updater.phar(10): require('phar:///var/www...')
#8 {main}
File:phar:///var/www/html/updater/updater.phar/lib/Updater.php
Line:868

2021-04-12T06:51:48+0000 NfUWFHNpvh [info] rollbackChanges("9")
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] unlink .step
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] rollbackChanges - step >= 7
2021-04-12T06:51:48+0000 NfUWFHNpvh [info] end of  rollbackChanges()

I have to admit, I am a noob, thought webupdater is a safe thing and pressed the button.
Now a day later i realize it is not a trivial thing to go back to 21.0.0.
I would appreciate a hand how to solve this problem. I don’t mind rolling back, but again I am a noob, no clue how to do it.
Thanks.

A follow up:
I tried to update manually via CLI: It produced same error:

root@nextcloud:/var/www/html/updater# sudo -u www-data php updater.phar
Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

Current version is 21.0.0.

Update to Nextcloud 21.0.1 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-21.0.1.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

Start 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 ...PHP Warning:  unlink(/var/www/html/updater/../.htaccess): Permission denied in phar:///var/www/html/updater/updater.phar/lib/Updater.php on line 866
[✘] Delete old files failed
Could not unlink: /var/www/html/updater/../.htaccess

Update failed. To resume or retry just execute the updater again.

I solved my problem with help of this thread https://help.nextcloud.com/t/update-to-13-fails-core-shipped-json-is-not-available/27294

1 Like