500 after update to nc 25 (+ OS update)

Hi, I had the same issue with the 500 internal server error on nearly 10 different instances of nextcloud and the cause was always the same.

I used the Webbased updater, but there seems to be a change with the handle of the occ app “spreed” when you upgrade from nc 24.x to nc 25.x that causes the error.

If you want to check if it is the same thing in your case, you have to have a look in the webserver log (for me apache2 in /var/log/error.log) for a similar entry like this;

[Wed Dec 14 15:30:24.407020 2022] [php:error] [pid 7842] [client my.server.ip.adress:65135] PHP Fatal error: Declaration of OCA\Talk\Share\RoomShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares): array must be compatible with OCP\Share\IShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares, $shallow = true) in /var/www/nextcloud/apps/spreed/lib/Share/RoomShareProvider.php on line 520

Solution for me:
I used the shell based CLI updater instead of the Webbased and everything was fine.

change to the directory where nextcloud is installed (often /var/www/nextcloud and type the following;

for download and perform updatefiles;

sudo -u www-data php updater/updater.phar --no-interaction

or;

sudo -u www-data php --define apc.enable_cli=1 occ upgrade

(–define apc.enable_cli=1 is optional but helps if there is a memcache information which is blocking executing this)

change maintenance mode in php.conf (often stored in /var/www/nextcloud/conf) back to false after you have finished the upgrade

Thats it, NC should run again as expected, dont forget to create a Backup BEFORE you beginn if something is going wrong.

I hope this will helping other people solving this quickly :grinning:

another good article to the same issue

Regards
Flo

2 Likes