Yetangitu / files_reader

GNU Affero General Public License v3.0
7 stars 2 forks source link

[v1.5.3] TypeError: OCA\Files_Reader\Hooks::OCA\Files_Reader\{closure}(): Argument #1 ($node) must be of type OCA\Files_Reader\Node, OC\Files\Node\File given #1

Open j-ed opened 1 year ago

j-ed commented 1 year ago

After installing the latest app version 1.5.3 cron.php has shown the following messages on execution:

TypeError: OCA\Files_Reader\Hooks::OCA\Files_Reader\{closure}(): Argument #1 ($node) must be of type OCA\Files_Reader\Node, OC\Files\Node\File given in .../nextcloud/apps2/files_reader/lib/Hooks.php:18
Stack trace:
#0 [internal function]: OCA\Files_Reader\Hooks::OCA\Files_Reader\{closure}(Object(OC\Files\Node\File))
#1 .../nextcloud/lib/private/Hooks/EmitterTrait.php(106): call_user_func_array(Object(Closure), Array)
#2 .../nextcloud/lib/private/Hooks/PublicEmitter.php(40): OC\Hooks\BasicEmitter->emit('\\OC\\Files', 'preDelete', Array)
#3 .../nextcloud/lib/private/Files/Node/Root.php(143): OC\Hooks\PublicEmitter->emit('\\OC\\Files', 'preDelete', Array)
#4 .../nextcloud/lib/private/Files/Node/Node.php(117): OC\Files\Node\Root->emit('\\OC\\Files', 'preDelete', Array)
#5 .../nextcloud/lib/private/Files/Node/File.php(129): OC\Files\Node\Node->sendHooks(Array)
#6 .../nextcloud/lib/private/Files/SimpleFS/SimpleFile.php(149): OC\Files\Node\File->delete()
#7 .../nextcloud/apps2/bookmarks/lib/Service/FileCache.php(156): OC\Files\SimpleFS\SimpleFile->delete()
#8 .../nextcloud/apps2/bookmarks/lib/BackgroundJobs/FileCacheGCJob.php(39): OCA\Bookmarks\Service\FileCache->gc()
#9 .../nextcloud/lib/public/BackgroundJob/Job.php(79): OCA\Bookmarks\BackgroundJobs\FileCacheGCJob->run(NULL)
#10 .../nextcloud/lib/public/BackgroundJob/TimedJob.php(95): OCP\BackgroundJob\Job->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
#11 .../nextcloud/cron.php(151): OCP\BackgroundJob\TimedJob->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
#12 {main}

My Environment

Server Configuration

OS: Linux 5.15.64 Web server: Apache2 2.4.53 Database: MariaDB 10.3.35 PHP version: 8.0.20 Nextcloud version: 24.0.5

ColdHotman commented 1 year ago

I experienced problems related to this issue, strange symptoms though. Error message 500 when saving markdown files in Notes, "File has been edited by other app" when editing in Files Markdown Editor plugin, Text plugin etc.

Posting to add context to the issue and keywords for for others searching for fixes to the same problem since they seem so unrelated. Seems like the fix is simply to disable Reader until this is resolved.

I hope it's mended soon, I love this app.

mossholderm commented 1 year ago

I experienced problems related to this issue, strange symptoms though. Error message 500 when saving markdown files in Notes, "File has been edited by other app" when editing in Files Markdown Editor plugin, Text plugin etc.

Posting to add context to the issue and keywords for for others searching for fixes to the same problem since they seem so unrelated. Seems like the fix is simply to disable Reader until this is resolved.

I hope it's mended soon, I love this app.

I'm hitting this as well. Both the Markdown issues, and the initial issue. The initial issue also shows up in Nextcloud's cron job, like this:

TypeError: OCA\Files_Reader\Hooks::OCA\Files_Reader\{closure}(): Argument #1 ($node) must be of type OCA\Files_Reader\Node, OC\Files\Node\Folder given in /var/www/html/custom_apps/files_reader/lib/Hooks.php:18
Stack trace:
#0 [internal function]: OCA\Files_Reader\Hooks::OCA\Files_Reader\{closure}(Object(OC\Files\Node\Folder))
#1 /var/www/html/lib/private/Hooks/EmitterTrait.php(106): call_user_func_array(Object(Closure), Array)
#2 /var/www/html/lib/private/Hooks/PublicEmitter.php(40): OC\Hooks\BasicEmitter->emit('\\OC\\Files', 'preDelete', Array)
#3 /var/www/html/lib/private/Files/Node/Root.php(143): OC\Hooks\PublicEmitter->emit('\\OC\\Files', 'preDelete', Array)
#4 /var/www/html/lib/private/Files/Node/Node.php(123): OC\Files\Node\Root->emit('\\OC\\Files', 'preDelete', Array)
#5 /var/www/html/lib/private/Files/Node/Folder.php(389): OC\Files\Node\Node->sendHooks(Array)
#6 /var/www/html/apps/dav/lib/BackgroundJob/UploadCleanup.php(96): OC\Files\Node\Folder->delete()
#7 /var/www/html/lib/public/BackgroundJob/Job.php(78): OCA\DAV\BackgroundJob\UploadCleanup->run(Array)
#8 /var/www/html/lib/public/BackgroundJob/TimedJob.php(103): OCP\BackgroundJob\Job->start(Object(OC\BackgroundJob\JobList))
#9 /var/www/html/lib/public/BackgroundJob/TimedJob.php(93): OCP\BackgroundJob\TimedJob->start(Object(OC\BackgroundJob\JobList))
#10 /var/www/html/cron.php(152): OCP\BackgroundJob\TimedJob->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
#11 {main}