LazyFolder contains 3 abstract [...] declared abstract or implement the remaining methods

Hi all,

After upgrading my docker instance to NC v28, all I have now is a white screen on the browser, error 500 on the iPhone app, and the logs only shows :
PHP Fatal error: Class OCA\GroupFolders\Helper\LazyFolder contains 3 abstract methods and must therefore be declared abstract or implement the remaining methods (OCP\Files\Folder::searchBySystemTag, OCP\Files\FileInfo::getParentId, OCP\Files\FileInfo::getMetadata) in /var/www/html/custom_apps/groupfolders/lib/Helper/LazyFolder.php on line 32

I can’t even start command OCC through Docker as I get the exact same error…

Already tried to force download fresh image with no result.

I cannot access any data now, has anyone else encountered this issue ?
Any idea how to solve this ?

Thx !

T

1 Like

Anyway, for anybody have the same problem : I had to disable GroupFolders in the DB and it started to work again.
I then updated all applications (including GroupFolders) then reenabled it in the DB

After updating to Nextcloud 28 I got error 500 when accessing Nextcloud as well. I saw this in the logs:

[Tue Jan 02 18:41:06.284450 2024] [proxy_fcgi:error] [pid 1721916:tid 140346731693824] [remote 152.117.66.146:56627] AH01071: Got error 'PHP message: PHP Warning:  require_once(/var/www/clients/client0/web12/web/lib/versioncheck.php): Failed to open stream: No such file or directory in /var/www/clients/client0/web12/web/ocs/v1.php on line 30; PHP message: PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/clients/client0/web12/web/lib/versioncheck.php' (include_path='.:/usr/share/php') in /var/www/clients/client0/web12/web/ocs/v1.php:30\nStack trace:\n#0 /var/www/clients/client0/web12/web/ocs/v2.php(23): require_once()\n#1 {main}\n  thrown in /var/www/clients/client0/web12/web/ocs/v1.php on line 30'
[Tue Jan 02 18:41:12.163089 2024] [proxy_fcgi:error] [pid 1721915:tid 140346630981376] [remote ip:60254] AH01071: Got error 'PHP message: PHP Fatal error:  Class OCA\\GroupFolders\\Helper\\LazyFolder contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (OCP\\Files\\Folder::searchBySystemTag, OCP\\Files\\FileInfo::getMetadata) in /var/www/clients/client0/web12/web/apps/groupfolders/lib/Helper/LazyFolder.php on line 32'
[Tue Jan 02 18:41:14.901489 2024] [proxy_fcgi:error] [pid 1721915:tid 140346740086528] [remote ip:60254] AH01071: Got error 'PHP message: PHP Fatal error:  Class OCA\\GroupFolders\\Helper\\LazyFolder contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (OCP\\Files\\Folder::searchBySystemTag, OCP\\Files\\FileInfo::getMetadata) in /var/www/clients/client0/web12/web/apps/groupfolders/lib/Helper/LazyFolder.php on line 32'
[Tue Jan 02 18:41:15.689836 2024] [proxy_fcgi:error] [pid 1721915:tid 140346731693824] [remote ip:60254] AH01071: Got error 'PHP message: PHP Fatal error:  Class OCA\\GroupFolders\\Helper\\LazyFolder contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (OCP\\Files\\Folder::searchBySystemTag, OCP\\Files\\FileInfo::getMetadata) in /var/www/clients/client0/web12/web/apps/groupfolders/lib/Helper/LazyFolder.php on line 32'

I tried updating groupfolders, but the occ command failed:

root@web1:/var/www/nc.example.com/web# sudo -u web12 php8.2 occ app:update groupfolders
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
PHP Fatal error:  Class OCA\GroupFolders\Helper\LazyFolder contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (OCP\Files\Folder::searchBySystemTag, OCP\Files\FileInfo::getMetadata) in /var/www/clients/client0/web12/web/apps/groupfolders/lib/Helper/LazyFolder.php on line 32

The solution was to disable the app:

root@web1:/var/www/nc.example.com/web# sudo -u web12 php8.2 occ app:disable groupfolders
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
groupfolders 15.3.2 disabled

Then I wanted to update the app, but this was not allowed because there was still a Nextcloud upgrade pending:

root@web1:/var/www/nc.example.com/web# sudo -u web12 php8.2 occ app:update groupfolders
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

So I ran the upgrade with sudo -u web12 php8.2 occ upgrade and after that I could update and enable groupfolders without a problem:

root@web1:/var/www/nc.example.com/web# sudo -u web12 php8.2 occ app:update groupfolders
groupfolders new version available: 16.0.1
groupfolders updated
root@web1:/var/www/nc.example.com/web# sudo -u web12 php8.2 occ app:enable groupfolders
groupfolders 16.0.1 enabled

TL:DR; disable the app, upgrade Nextcloud, update groupfolders, then re-enable the app:

php occ app:disable groupfolders
php occ upgrade
php occ app:update groupfolders
php occ app:enable groupfolders

Please note that all these commands shall be ran as the same user that the web application runs under.

Hope this helps someone!

1 Like

I am new to this. How can I disable groupfolder in db? I am using mariadb as a docker on unraid. Can you tell me the exact command to the disabling and enabling? Thanks

How do you then disable group folders in the database itself?

Could anyone lay out the fine print for benefit to us all here on the NextCloud forum please?

If possible a step-by-step guide? (On MariaDB/MySQL).

Thank you!

I used PHPmyAdmin to browser the database. In the Database I found the table “oc_appconfig”

Scroll through that untill you find an entry with the appid “groupfolders”, configkey “enabled” and change the configvalue from “yes” to “no”.

After I did that I could continue with the installation.

3 Likes

@thompol Thank u very much you save my day :slight_smile:

1 Like

I have the exact issue described above, but when looking into PhPmyAdmin database, I can find “oc_appconfig”, but I don’t see any “groupfolders” in the appid… I’ve scrolled the whole list and searched the database. Is it possible? What can I try to do?

We had the same issue when upgrading our Nextcloud from v27.1.11 to 28.0.10 :frowning:
In case of v27 we had the latest GroupFolders version installed, namely 15.3.9. We were not able to install a newer version as 15.3.9 seems to be the maximum for Nextcloud v27.
In the end the only way for us was to disable the GroupFolders app (1) > then upgrade to 28.0.10 > disable maintenance mode > update GroupFolders app to latest release 16.0.9 for Nextcloud v28 (2) > enable GroupFolders (3).
You can do those steps probably also via the Web Interface but we did it via CLI.

Attention: If you disable the GroupFolders app, all created group folders will disappear! When you enable the app in the end again, the folders will re-appear and your Nextcloud clients will start to synchronize everything (at least if they were online during the above upgrade procedure).

(1) your-specific-environment/occ app:disable groupfolders
(2) your-specific-environment/occ app:update groupfolders
(3) your-specific-environment/occ app:enable groupfolders

Brilliant, that solved the problem a treat.