Nextcloud 25.0.11 to 25.0.12 update error

Hello,

today I wanted to perform an upcoming update of nextcloud to version 25.012.
First I tried it via the web interface and then again manually.

Unfortunately, I received the following error messages:

Webinterface

Check for expected files
The following extra files have been found:

package.json
composer.lock
package-lock.json
composer.json

manuall

root@nextcloudpi:/var/www/nextcloud# sudo -u www-data php /var/www/nextcloud/updater/updater.phar
Nextcloud Updater - version: v25.0.3-2-gd49ee0d

Current version is 25.0.11.

Update to Nextcloud 25.0.12 available. (channel: “stable”)
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-25.0.12.zip
Open changelog :arrow_upper_right:

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 failed
The following extra files have been found:
package.json
composer.lock
package-lock.json
composer.json

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

How does this problem occur and how can I fix it?
Since I have Nextcloud installed under dietpi-software, my first request goes to this forum.

I thank you in advance for everything tips!

Best regards,

Carsten


Creating a bug report/issue

Required Information

  • DietPi version
    G_DIETPI_VERSION_CORE=8
    G_DIETPI_VERSION_SUB=21
    G_DIETPI_VERSION_RC=1
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’

  • Distro version
    bullseye 0

  • Kernel version
    Linux nextcloudpi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

  • Architecture
    arm64

  • SBC model
    RPi 3 Model B+ (aarch64)

  • Power supply used
    5V 2A

  • SD card used
    no SD card, Msata SSD

Additional Information (if applicable)

  • Software title
    Nextcloud 25.0.11

  • Was the software title installed freshly or updated/migrated?
    updated

  • Can this issue be replicated on a fresh installation of DietPi?
    Would hate to have to do a fresh install!

  • Bug repord ID
    aaf8e3af-3a83-4ce1-90fd-bc6d7b62e6f8

Hm first of all it’s odd it did not show you the update to version 26 and/or 27. Newst version is 27.1.1 which was released yesterday.
The files

package.json
composer.lock
package-lock.json
composer.json

Are coming from a release candidate installtion. Did you install nextcloud manually in the past?

You could try a manual update from CLI:

phpenmod phar # The PHP Phar module is required
sudo -u www-data php /var/www/nextcloud/updater/updater.phar

@Jappe

Honestly, so 100% I’m not sure, it’s already been a while, but since I found Nextcloud in the list of dietpi-software, I assume that I installed it using dietpi.
Software installed manually should not appear in this list, right?

root@nextcloudpi:~# ncc status

  • installed: true
  • version: 25.0.11.1
  • versionstring: 25.0.11
  • edition:
  • maintenance: false
  • needsDbUpgrade: false
  • productname: Nextcloud
  • extendedSupport: false

root@nextcloudpi:~# phpenmod phar
root@nextcloudpi:~# sudo -u www-data php /var/www/nextcloud/updater/updater.phar
Nextcloud Updater - version: v25.0.3-2-gd49ee0d

Current version is 25.0.11.

Update to Nextcloud 25.0.12 available. (channel: “stable”)
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-25.0.12.zip
Open changelog :arrow_upper_right:

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 failed
The following extra files have been found:
package.json
composer.lock
package-lock.json
composer.json

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

The update command still does not work.

Can you rename/remove these four files and try again?

Looks like it’s a bug:

But I still wonder why it does not present Version 27 to you in the updater.

edit:

I found an answer:

Nextcloud must be upgraded step by step:

    Before you can upgrade to the next major release, Nextcloud upgrades to the latest point release.

    Then run the upgrade again to upgrade to the next major release’s latest point release.

    You cannot skip major releases. Please re-run the upgrade until you have reached the highest available (or applicable) release.

    Example: 18.0.5 -> 18.0.11 -> 19.0.5 -> 20.0.2

I deleted the 4 files and the update process worked without problems. Thanks for the tip!

Also, I tried to run the update process several times, but after updating to version 25.0.12, I always get the output: No update available.

The system is in the update channel: Stable.
So I cannot do anything else.

I also had this problem in the past, but I can’t remember how I fixed it. :thinking:
I think I did something in the config.php.
I found some suggestions to remove the line 'version' => '27.1.1.0', fromconfig.php and try again.
Also switching the release channel from stable to beta (can be done in the admin-settings on the web panel) and after the upgrade(s) to the desired version(s) just switch it back to stable channel.

A change from stable to beta with a subsequent update attempt did not change anything, the system is supposed to be up to date with version 25.0.12.

You are running old Debian Bullseye providing PHP7.4 only, which is not supported on NC26 and above

@Joulinar

Thanks for your info.

Isn’t there a script to upgrade from Bullseye to Bookworm?
Of course at my own risk!

Thanks!

It worked, very nice!
Nextcloud is now version 27.1.1.

@Joulinar

Last question, since upgrading from bullseye to bookworm worked so wonderfully on 3 RPi, could this also work from Buster to Bookworm?

There would be an additional step needed to update from Buster to Bullseye first. DietPi - How to upgrade to "Bullseye" - DietPi blog

Ok, a lot of manual work, I’ll think twice about that and possibly consider reinstalling.

You may already know, the upgrade from bullseye to bookworm does not seem to work with flightaware. I have had to cancel the upgrade. Still, in 5 installations it works fine. Fantastic work from you, as always!

The update from Buster to Bullseye is quite well documented and tested. If course there is always a risk but until now we managed majority of challenges.

At the end it’s your choice.

Okay, the whole life is a risk! :wink:

in this spirit, go for it :wink: