nextcloud / groupfolders

πŸ“πŸ‘©β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Admin-configured folders shared by everyone in a group. https://github.com/nextcloud-releases/groupfolders
https://apps.nextcloud.com/apps/groupfolders
284 stars 87 forks source link

[Bug]: TypeError OCA\GroupFolders\Versions\GroupVersion::__construct(): Argument #11 #2915

Closed polhenarejos closed 3 months ago

polhenarejos commented 6 months ago

How to use GitHub

Steps to reproduce

  1. It is a background job. I do nothing.

Expected behaviour

Not getting any error.

Actual behaviour

I get a repetitive error in the Log section:

TypeError
OCA\GroupFolders\Versions\GroupVersion::__construct(): Argument https://github.com/nextcloud/server/pull/11 ($versionFile) must be of type OCP\Files\File, OC\Files\Node\Folder given, called in /home/phenarejos/CASTLE/django/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php on line 159
Error while running background job (class: OCA\GroupFolders\BackgroundJob\ExpireGroupVersions, arguments: )

Server configuration

Operating system: Debian 11

Web server: Nginx

Database: Mariadb

PHP version: 8.1

Nextcloud version: (see Nextcloud admin page) 28.0.4

Group folders version: 16.0.6

Updated from an older Nextcloud/ownCloud or fresh install: upgraded

Where did you install Nextcloud from: zip from web

Are you using external storage, if yes which one: no

Are you using encryption: yes

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: chrome

Operating system: windows

Logs

Web server error log

Web server error log ``` Insert your webserver log here ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` {"reqId":"0q32N4PeWVoJ7iGBlT56","level":3,"time":"2024-04-09T10:05:02+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Error while running background job (class: OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions, arguments: )","userAgent":"--","version":"28.0.4.1","exception":{"Exception":"TypeError","Message":"OCA\\GroupFolders\\Versions\\GroupVersion::__construct(): Argument #11 ($versionFile) must be of type OCP\\Files\\File, OC\\Files\\Node\\Folder given, called in /home/phenarejos/CASTLE/django/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php on line 159","Code":0,"Trace":[{"file":"/home/phenarejos/CASTLE/django/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php","line":159,"function":"__construct","class":"OCA\\GroupFolders\\Versions\\GroupVersion","type":"->"},{"function":"OCA\\GroupFolders\\Versions\\{closure}","class":"OCA\\GroupFolders\\Versions\\VersionsBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/phenarejos/CASTLE/django/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php","line":143,"function":"array_map"},{"file":"/home/phenarejos/CASTLE/django/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php","line":80,"function":"getVersionsForFileFromDB","class":"OCA\\GroupFolders\\Versions\\VersionsBackend","type":"->"},{"file":"/home/phenarejos/CASTLE/django/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":81,"function":"getVersionsForFile","class":"OCA\\GroupFolders\\Versions\\VersionsBackend","type":"->"},{"file":"/home/phenarejos/CASTLE/django/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":60,"function":"expireFolder","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},{"file":"/home/phenarejos/CASTLE/django/www/nextcloud/apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php","line":43,"function":"expireAll","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},{"file":"/home/phenarejos/CASTLE/django/www/nextcloud/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions","type":"->"},{"file":"/home/phenarejos/CASTLE/django/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/home/phenarejos/CASTLE/django/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/home/phenarejos/CASTLE/django/www/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/home/phenarejos/CASTLE/django/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersion.php","Line":33,"message":"Error while running background job (class: OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions, arguments: )","exception":{},"CustomMessage":"Error while running background job (class: OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions, arguments: )"}} ```

Browser log

Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
polhenarejos commented 6 months ago

I get this error every 1 hour and 5 minutes exactly. It's really annoying.

nonofr91 commented 5 months ago

j'ai le mΓͺme type de message dans le journal d'administration:

{"reqId":"hCZmk0MgMtg323IHuLqq","level":3,"time":"2024-05-15T19:20:01+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Error while running background job OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions (id: 32927, arguments: null)","userAgent":"--","version":"29.0.0.19","exception":{"Exception":"TypeError","Message":"OCA\\Files_Versions\\Versions\\Version::__construct(): Argument #10 ($metadata) must be of type array, string given, called in /config/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersion.php on line 47","Code":0,"Trace":[{"file":"/config/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersion.php","line":47,"function":"__construct","class":"OCA\\Files_Versions\\Versions\\Version","type":"->"},{"file":"/config/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php","line":158,"function":"__construct","class":"OCA\\GroupFolders\\Versions\\GroupVersion","type":"->"},{"function":"OCA\\GroupFolders\\Versions\\{closure}","class":"OCA\\GroupFolders\\Versions\\VersionsBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/config/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php","line":142,"function":"array_map"},{"file":"/config/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php","line":80,"function":"getVersionsForFileFromDB","class":"OCA\\GroupFolders\\Versions\\VersionsBackend","type":"->"},{"file":"/config/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":81,"function":"getVersionsForFile","class":"OCA\\GroupFolders\\Versions\\VersionsBackend","type":"->"},{"file":"/config/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":60,"function":"expireFolder","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},{"file":"/config/www/nextcloud/apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php","line":43,"function":"expireAll","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},{"file":"/app/www/public/lib/public/BackgroundJob/Job.php","line":80,"function":"run","class":"OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions","type":"->"},{"file":"/app/www/public/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/app/www/public/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/app/www/public/cron.php","line":176,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/config/www/nextcloud/apps/files_versions/lib/Versions/Version.php","Line":32,"message":"Error while running background job OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions (id: 32927, arguments: null)","exception":[],"CustomMessage":"Error while running background job OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions (id: 32927, arguments: null)"},"id":"6645135caef0b"}

Moi aussi cela se produit toutes les 1H05.

masterdot commented 5 months ago

Same here, fresh install of aio v 29

Bildschirmfoto 2024-05-21 um 12 30 53 Bildschirmfoto 2024-05-21 um 12 31 06
nomiskraw commented 5 months ago

Same problem here, fresh install Nextcloud 29.0 and GroupFolder 17.0

image

polhenarejos commented 5 months ago

Upgraded to 29.0.1 and still happens but the error is another

TypeError
OCA\GroupFolders\Versions\VersionsBackend::getVersionFolderForFile(): Argument #1 ($file) must be of type OCP\Files\File, OC\Files\FileInfo given, called in /home/phenarejos/CASTLE/django/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php on line 92
Error while running background job OCA\GroupFolders\BackgroundJob\ExpireGroupVersions (id: 38, arguments: null)
masterdot commented 5 months ago

Now something did crash my cloud, I'll check tomorrow... Really starting to dislike nextcloud :/

Markoise commented 4 months ago

Same thing on Nextcloud 29.0.2 This is spamming my Log several times a day.

skjnldsv commented 4 months ago

Fixed by https://github.com/nextcloud/groupfolders/pull/3022

joshtrichards commented 3 months ago

Fixed in #3023