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

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

Closed
polhenarejos opened this issue Apr 9, 2024 · 9 comments · Fixed by #3023
Closed
Assignees
Labels
3. to review Items that need to be reviewed bug

Comments

@polhenarejos
Copy link

polhenarejos commented Apr 9, 2024

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

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
Copy link
Author

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

@nonofr91
Copy link

nonofr91 commented May 15, 2024

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
Copy link

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
Copy link

Same problem here, fresh install Nextcloud 29.0 and GroupFolder 17.0

image

@polhenarejos
Copy link
Author

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
Copy link

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

@Markoise
Copy link

Markoise commented Jun 7, 2024

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

@skjnldsv skjnldsv added 3. to review Items that need to be reviewed and removed 0. Needs triage Issues that need to be triaged labels Jun 21, 2024
@skjnldsv skjnldsv self-assigned this Jun 21, 2024
@skjnldsv
Copy link
Member

skjnldsv commented Jun 21, 2024

Fixed by #3022

@joshtrichards
Copy link
Member

Fixed in #3023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Items that need to be reviewed bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants