HTTP 500 error while updating to 17.0.1

Dear Support,

I tried to update my Nextcloud instance, which I host in an Plesk environment. Unfortunately I was not able to retrieve the Apache/nginx/system log. In Plesk have a page for this. In my case I use just the standard settings.

Grateful for push me into the direction to get this issue resolved.

Regards

Nextcloud version: (eg, 12.0.2): 17.0.1
Operating system and version (eg, Ubuntu 17.04):
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 7.1):7.3

The issue you are facing:
Updating Nextcloud to latest version, HTTP 500 error

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

Steps to replicate it:

  1. nextcloud.maurolito.net

The output of your Nextcloud log in Admin > Logging:

[Sat Nov 16 20:09:05.839273 2019] [proxy_fcgi:error] [pid 2401] [client 46.126.236.26:57064] AH01071: Got error 'PHP message: PHP Fatal error:  Declaration of OCA\\GroupFolders\\Versions\\VersionsBackend::getVersionFile(OCP\\IUser $user, OCP\\Files\\FileInfo $sourceFile, int $revision): OCP\\Files\\File must be compatible with OCA\\Files_Versions\\Versions\\IVersionBackend::getVersionFile(OCP\\IUser $user, OCP\\Files\\FileInfo $sourceFile, $revision): OCP\\Files\\File in /home/httpd/vhosts/maurolito.net/nextcloud.maurolito.net/apps/groupfolders/lib/Versions/VersionsBackend.php on line 38'

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocx064jiujum',
  'passwordsalt' => 'GOMxfgefpw9fSv+gaVVOXcw6/E/aHQ',
  'secret' => 'g6cbQZLBBK1FetO1GMwUZ1XABs3tXgS59Wt/E67DtXMHrKg6',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.maurolito.net',
  ),
  'datadirectory' => '',
  'dbtype' => 'mysql',
  'version' => '16.0.5.1',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud_',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'maintenance' => false,
  'mail_from_address' => '',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'mail.messagingengine.com',
  'mail_smtpport' => '465',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'mail_smtpsecure' => 'ssl',
  'theme' => '',
  'loglevel' => 2,
  'updater.secret' => '$2y$10$/BTTBzPxqQ6RUfboc1RH4eGYzJojWNhW28OYfE.uBKWsGmkJfT1Ri',
);

The output of your Apache/nginx/system log in /var/log/____:

Allgemeine Apache-Einstellungen
MIME-Typen:Standard
Handler:Standard
Zugriff auf Website verweigern:Standard
Indexdateien:Standard
Ablaufdatum:Standard
Zusätzliche Header:Standard

nginx-Einstellungen

Proxymodus: on
Intelligente Bearbeitung statischer Dateien: on
Statische Dateien direkt durch nginx bedienen: off
nginx-Caching aktivieren: no

same problem on my site:

nextcloud_error.log:

[Sat Nov 16 10:15:03.766004 2019] [php7:error] [pid 30532] [client 10.10.10.101:36064] PHP Fatal error: Declaration of OCA\GroupFolders\Versions\VersionsBackend::getVersionFile(OCP\IUser $user, OCP\Files\FileInfo $sourceFile, int $revision): OCP\Files\File must be compatible with OCA\Files_Versions\Versions\IVersionBackend::getVersionFile(OCP\IUser $user, OCP\Files\FileInfo $sourceFile, $revision): OCP\Files\File in /var/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php on line 38

Ove

Same on my site. On shared hosting, running plesk. Nextcloud 16.0.6 --> 17.0.1 upgrade causes 500 server error.
Now trying to restore site from daily backup.

Dang, should have checked the forums first for problems before I clicked that upgrade button – when will I learn?
Still, I would have expected a xx.0.1 release to have fixed most bugs.

found a solution:


Problem on my site was, that occ was not “executable”…so started the web-updater.
At the end selected “keep maintenance-mode” and go on via cli.
chmod +x /var/www/nextcloud/occ
cd /var/www/nextcloud
sudo -u www-data ./occ upgrade -vv
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off
after that all was OK

Ove

Hello everyone,
I tried to use the same steps but still I got the exact same error… Did someone finally found a way out ?

Best regards

I am exactly the same, except getting a 503 error! This is a crucial install, how do I revert to previous version?

What about patching the source code as described here …


… or disabling the groupfolders app, as described here:

pls give more detailed information what steps exactly you tried and what error you get.

Ove

reads like patching the source-code is the preferred solution. Disabling the groupfolders app is a NoGo on most installations - because this feature is crucial!

Ove

Sorry, but disabling the group folders app during the update process and re-enabling it afterwards is ALWAYS a way to go, because an updated version of the app already exists for Nextcloud 17 :wink:

of course - if this is a temporary disabling - i’m with you!
Understood this as a perm solution.

Ove

Well I tried to disable the app, but any command give me the exact same error :

PHP Fatal error:  Declaration of OCA\GroupFolders\Versions\VersionsBackend::getVersionFile(OCP\IUser $user, OCP\Files\FileInfo $sourceFile, int $revision): OCP\Files\File must be compatible with OCA\Files_Versions\Versions\IVersionBackend::getVersionFile(OCP\IUser $user, OCP\Files\FileInfo $sourceFile, $revision): OCP\Files\File in /var/www/html/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php on line 38

The command I used to disable the app is :

sudo -u www-data ./occ app:disable groupfolders

OLD sentence :
And I did a locate command to find the " VersionBackend.php" file, but I don’t have any. The closer name is “IVersionBackend.php” and it doesn’t contain any “int” to remove.

I don’t know why my locate didn’t find this file, but i’m an idiot as it is mentioned in the error message…
I did the trick (code modification) and now my NC is back : sorry for this !

Thank you very much !

1 Like

I cannot believe this, because the groupfolders app archives in e.g. v4.1.4 or v5.0.4 both contain such a file “[NC_DOC_ROOT]/apps/groupfolders/lib/Versions/VersionsBackend.php”.

I edited by previous post, I guess I’m just an idiot… or tired, but sorry for wasting your time !

An update from me…

Turned out php7. 2-fpm would not start. Completely uninstalled and installed php 7.3. Everything running again.

Thanks

1 Like