Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 after updating NC 16 to NC 17 r2 #17338

Open
petrk94 opened this issue Sep 30, 2019 · 20 comments

Comments

@petrk94
Copy link

commented Sep 30, 2019

Hello,
Im facing a bug from my NC 16 updated to NC 17 r2 instance.
After a successful updating process, it wanted to load the web interface and caused the Error 500.
No access is possible.
In the php error log, I got this information:

[Mon Sep 30 11:40:59 2019] [warn] [client 94.223.33.225] mod_fcgid: stderr: 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/virtual/petrk/nextcloud.xxx/apps/groupfolders/lib/Versions/VersionsBackend.php on line 37
[Mon Sep 30 11:41:01 2019] [warn] [client 66.102.8.52] mod_fcgid: stderr: 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/virtual/petrk/nextcloud.xxx/apps/groupfolders/lib/Versions/VersionsBackend.php on line 37

I hope you can help me to restore it to bring it back to work.

Greets

@rth9

This comment has been minimized.

Copy link

commented Sep 30, 2019

Probably a better way, but:
sudo mv /var/www/virtual/petrk/nextcloud.xxx/apps/groupfolders /var/www/virtual/petrk/nextcloud/apps/groupfolders.old
Then you can proceed and it gets reinstalled from what I see. I'm still looking. Probably can delete the newly created ".old" folder after the upgrade.

@kesselb

This comment has been minimized.

Copy link
Contributor

commented Sep 30, 2019

Probably can delete the newly created ".old" folder after the upgrade.

Yes.

cc @nextcloud/server-triage the issue itself is already fixed by groupfolders 5.x.

@skjnldsv

This comment has been minimized.

Copy link
Member

commented Sep 30, 2019

@kesselb so I'm guessing we just did not released groupfolders on time?

@kesselb

This comment has been minimized.

Copy link
Contributor

commented Sep 30, 2019

Hmm. I don't think so. 5.0.0 (with the relevant changes) is out for 25 days.

@Schmuuu

This comment has been minimized.

Copy link

commented Oct 1, 2019

Hi @kesselb @skjnldsv

Users are running into this issue when updating to NC17 stable.
https://help.nextcloud.com/t/web-updater-from-nc-16-0-4-to-17-doesnt-work-with-group-folders-use-command-line/61110
This issue arises when group folders app was enabled before the update.

The big issue is, that group folders app in version 5.0 is not compatible to NC16 and therefore users cannot update to group folder 5.x before updating to NC17. In return all users who didn't disable the app before the update, will get stuck in HTTP 500.

For users without ssh access this may become a serious issue.

@petrk94

This comment has been minimized.

Copy link
Author

commented Oct 1, 2019

@Schmuuu
how I can solve it?

@Schmuuu

This comment has been minimized.

Copy link

commented Oct 1, 2019

I posted a warning in the forum:
https://help.nextcloud.com/t/nc17-update-disable-group-folders-app-before-performing-the-update-of-your-server/61112/2

To solve the issue:

  • login to your server via ssh
  • run the occ command “upgrade”:
    sudo -u <web user> php /path/to/nc/occ upgrade
@petrk94

This comment has been minimized.

Copy link
Author

commented Oct 1, 2019

Here the log (system work now, issue solved by this solution):

php occ upgrade
The current PHP memory limit is below the recommended value of 512MB.
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Turned on maintenance mode
Updating database schema
Updated database
Disabled incompatible app: files_texteditor
Disabled incompatible app: groupfolders
Updating ...
Updated to 1.3.0
Updating ...
Updated to 1.7.0
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 1.6.0
Updating <files_rightclick> ...
Updated <files_rightclick> to 0.14.2
Updating <files_videoplayer> ...
Updated <files_videoplayer> to 1.6.0
Updating ...
Updated to 18.4.0
Updating ...
Updated to 2.2.0
Updating <password_policy> ...
Updated <password_policy> to 1.7.0
Updating ...
Updated to 1.1.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 1.7.0
Updating ...
Updated to 0.5.0
Updating ...
Updated to 1.7.0
Updating ...
Updated to 1.0.1
Updating <twofactor_backupcodes> ...
Updated <twofactor_backupcodes> to 1.6.0
Updating ...
Updated to 1.7.0
Updating ...
Updated to 1.1.0
Updating <lookup_server_connector> ...
Updated <lookup_server_connector> to 1.5.0
Updating ...
Updated to 1.5.0
Updating ...
Updated to 1.12.0
Updating ...
Updated to 2.10.1
Updating <cloud_federation_api> ...
Updated <cloud_federation_api> to 1.0.0
Updating ...
Fix broken values of calendar objects

Done
0/0 [>---------------------------] 0%
Updated to 1.13.0
Updating <files_external> ...
Updated <files_external> to 1.8.0
Updating <files_sharing> ...
Updated <files_sharing> to 1.9.0
Updating <files_trashbin> ...
Updated <files_trashbin> to 1.7.0
Updating <files_versions> ...
Updated <files_versions> to 1.10.0
Updating ...
Updated to 1.7.0
Updating ...
Updated to 1.7.0
Updating <admin_audit> ...
Updated <admin_audit> to 1.7.0
Updating ...
Updated to 1.7.0
Updating ...
Updated to 2.6.0
Updating ...
Updated to 2.5.0
Updating ...
Updated to 1.7.0
Updating ...
Updated to 1.8.0
Checking for update of app accessibility in appstore
Checked for update of app "accessibility" in appstore
Checking for update of app activity in appstore
Checked for update of app "activity" in appstore
Checking for update of app admin_audit in appstore
Checked for update of app "admin_audit" in appstore
Checking for update of app cloud_federation_api in appstore
Checked for update of app "cloud_federation_api" in appstore
Checking for update of app comments in appstore
Checked for update of app "comments" in appstore
Checking for update of app dav in appstore
Checked for update of app "dav" in appstore
Checking for update of app federatedfilesharing in appstore
Checked for update of app "federatedfilesharing" in appstore
Checking for update of app files in appstore
Checked for update of app "files" in appstore
Checking for update of app files_external in appstore
Checked for update of app "files_external" in appstore
Checking for update of app files_fulltextsearch_tesseract in appstore
Update app files_fulltextsearch_tesseract from appstore
Checked for update of app "files_fulltextsearch_tesseract" in appstore
Checking for update of app files_pdfviewer in appstore
Checked for update of app "files_pdfviewer" in appstore
Checking for update of app files_rightclick in appstore
Update app files_rightclick from appstore
Checked for update of app "files_rightclick" in appstore
Checking for update of app files_sharing in appstore
Checked for update of app "files_sharing" in appstore
Checking for update of app files_trashbin in appstore
Checked for update of app "files_trashbin" in appstore
Checking for update of app files_versions in appstore
Checked for update of app "files_versions" in appstore
Checking for update of app files_videoplayer in appstore
Checked for update of app "files_videoplayer" in appstore
Checking for update of app firstrunwizard in appstore
Checked for update of app "firstrunwizard" in appstore
Checking for update of app fulltextsearch in appstore
Update app fulltextsearch from appstore
Checked for update of app "fulltextsearch" in appstore
Checking for update of app gallery in appstore
Checked for update of app "gallery" in appstore
Checking for update of app logreader in appstore
Checked for update of app "logreader" in appstore
Checking for update of app lookup_server_connector in appstore
Checked for update of app "lookup_server_connector" in appstore
Checking for update of app notifications in appstore
Checked for update of app "notifications" in appstore
Checking for update of app oauth2 in appstore
Checked for update of app "oauth2" in appstore
Checking for update of app password_policy in appstore
Checked for update of app "password_policy" in appstore
Checking for update of app privacy in appstore
Checked for update of app "privacy" in appstore
Checking for update of app provisioning_api in appstore
Checked for update of app "provisioning_api" in appstore
Checking for update of app recommendations in appstore
Checked for update of app "recommendations" in appstore
Checking for update of app serverinfo in appstore
Checked for update of app "serverinfo" in appstore
Checking for update of app sharebymail in appstore
Checked for update of app "sharebymail" in appstore
Checking for update of app support in appstore
Checked for update of app "support" in appstore
Checking for update of app systemtags in appstore
Checked for update of app "systemtags" in appstore
Checking for update of app theming in appstore
Checked for update of app "theming" in appstore
Checking for update of app twofactor_backupcodes in appstore
Checked for update of app "twofactor_backupcodes" in appstore
Checking for update of app updatenotification in appstore
Checked for update of app "updatenotification" in appstore
Checking for update of app viewer in appstore
Checked for update of app "viewer" in appstore
Checking for update of app workflowengine in appstore
Checked for update of app "workflowengine" in appstore
Checking for update of app files_texteditor in appstore
Checked for update of app "files_texteditor" in appstore
Checking for update of app groupfolders in appstore
Update app groupfolders from appstore
Checked for update of app "groupfolders" in appstore
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Reset log level

@gwolf

This comment has been minimized.

Copy link

commented Oct 1, 2019

I suppose there are plans underway for Group Folders to be supported in NC17 by the time of the official release, right? Our use case certainly depends on GF working :-\

@Schmuuu

This comment has been minimized.

Copy link

commented Oct 1, 2019

@gwolf The groupfolders app is supported in NC17 already. The only issue here is, that the groupfolders app in version 5.x is not compatible with NC16 and in version 4.x is not compatible with NC17. So in a way an upgrade path is missing.

The workaround therefore is:

  • disable group folders app
  • update NC from 16.x to 17.0
  • check that group folders app has been upgraded to version 5.x (if not, update manually)
  • enable group folders app again
@gwolf

This comment has been minimized.

Copy link

commented Oct 1, 2019

@DaCryptor

This comment has been minimized.

Copy link

commented Oct 1, 2019

To solve the issue:

* login to your server via ssh

* run the occ command “upgrade”:
  `sudo -u <web user> php /path/to/nc/occ upgrade`

Great "workaround" for a lot of people running NextCloud in a shared-hosting environment...

To be honest, I see the NextCloud-team releasing more and more features very fast, but also more and more errors occur (even in the basic functions), and I am losing trust in the quality of this software.

@kesselb

This comment has been minimized.

Copy link
Contributor

commented Oct 1, 2019

  'app_install_overwrite' => 
  array (
    0 => 'groupfolders',
  ),

Do you have something like above in your config.php?

@Schmuuu

This comment has been minimized.

Copy link

commented Oct 1, 2019

No. I only saw this getting added:

'app_install_overwrite' => 
array (
0 => 'tasks',
1 => 'files_readmemd',
2 => 'polls',
3 => 'apporder',
),
@kyrofa

This comment has been minimized.

Copy link
Member

commented Oct 1, 2019

The only issue here is, that the groupfolders app in version 5.x is not compatible with NC16 and in version 4.x is not compatible with NC17. So in a way an upgrade path is missing.

Wait, that's the exact reason we in the snap held off on the upgrade to v16, because the calendar app did the same thing. However, that situation was fixed with #16507, where Nextcloud now disables incompatible apps before the upgrade, and updates them/re-enables them afterward. Did that break?

@kesselb

This comment has been minimized.

Copy link
Contributor

commented Oct 1, 2019

where Nextcloud now disables incompatible apps before the upgrade, and updates them/re-enables them afterward. Did that break?

For me it works 😕 16.0.5 with groupfolders 4.x to 17.0.0 will disable groupfolders during upgrade. I can reproduce the fatal error OCP\Files\File must be compatible with OCA\Files_Versions\Versions\IVersionBackend::getVersionFile with "enable untested app". We have to dig deeper 🙈

@My1

This comment has been minimized.

Copy link

commented Oct 2, 2019

curious question regarding this: is the possible to knock out an app without a commandline, like in the database or some config file and could that help shared hosting users?

@petrk94

This comment has been minimized.

Copy link
Author

commented Oct 2, 2019

To solve the issue:

* login to your server via ssh

* run the occ command “upgrade”:
  `sudo -u <web user> php /path/to/nc/occ upgrade`

Great "workaround" for a lot of people running NextCloud in a shared-hosting environment...

To be honest, I see the NextCloud-team releasing more and more features very fast, but also more and more errors occur (even in the basic functions), and I am losing trust in the quality of this software.

@DaCryptor Im running my NC instance on a shared host, the whole thing worked too without need of sudo. Just php /path/to/nc/occ upgrade and it worked

@jthacker48

This comment has been minimized.

Copy link

commented Oct 3, 2019

I posted a warning in the forum:
https://help.nextcloud.com/t/nc17-update-disable-group-folders-app-before-performing-the-update-of-your-server/61112/2

To solve the issue:

  • login to your server via ssh
  • run the occ command “upgrade”:
    sudo -u <web user> php /path/to/nc/occ upgrade

I must be making a mistake when trying to run the command as I'm getting "can't open web: no such file".

I'm running NC as Docker in Unraid. I'm putting in the following (exactly):

sudo -u php /config/www/nextcloud/occ upgrade

I'm sure it's something dumb so I apologize in advance.

@tigernero79

This comment has been minimized.

Copy link

commented Oct 3, 2019

in my opinion, "occ update" does not handle apps to be updated well, with a web-based update, the check of the group folder version is not done or updated. reason why we have error 500. on systems where we have access ssh we solve with command via terminal "occ upgrade", the verification is done because it is successfully updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.