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

Exceptions in log since update of files_antivirus: Cannot assign null to property OCA\\Files_Antivirus\\AvirWrapper::$mountPoint of type string #335

Open
MalteP opened this issue May 23, 2024 · 1 comment

Comments

@MalteP
Copy link

MalteP commented May 23, 2024

Steps to reproduce

  1. Update files_antivirus to 5.5.2
  2. Probably use Nextcloud windows client?
  3. View logs

Expected behaviour

No errors

Actual behaviour

Lots of exceptions for $mount_point variable like shown below, maybe caused by desktop clients using a DAV connection

Server configuration

Operating system:
Debian 12

Web server:
Apache

Database:
Mariadb

PHP version:
8.1

Nextcloud version: (see Nextcloud admin page)
Nextcloud Hub 8 (29.0.0)

Logs

Nextcloud log (data/owncloud.log)

{"reqId":"ogh2fn8JY6VZ8plnNDwx","level":3,"time":"2024-05-23T12:12:11+00:00","remoteAddr":"***.***.***.***","user":"***@***.***","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/***@***.***/","message":"Undefined array key \"mount_point\" at /var/www/nextcloud/apps/files_antivirus/lib/AvirWrapper.php#48","userAgent":"Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"29.0.0.19","data":{"app":"PHP"}}
{"reqId":"ogh2fn8JY6VZ8plnNDwx","level":3,"time":"2024-05-23T12:12:11+00:00","remoteAddr":"***.***.***.***","user":"***@***.***","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/***@***.***/","message":"Cannot assign null to property OCA\\Files_Antivirus\\AvirWrapper::$mountPoint of type string","userAgent":"Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"29.0.0.19","exception":{"Exception":"TypeError","Message":"Cannot assign null to property OCA\\Files_Antivirus\\AvirWrapper::$mountPoint of type string","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/files_antivirus/lib/AppInfo/Application.php","line":69,"function":"__construct","class":"OCA\\Files_Antivirus\\AvirWrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Mount/MountPoint.php","line":263,"function":"OCA\\Files_Antivirus\\AppInfo\\{closure}","class":"OCA\\Files_Antivirus\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/StorageFactory.php","line":55,"function":"wrapStorage","class":"OC\\Files\\Mount\\MountPoint","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Filesystem.php","line":211,"function":"addStorageWrapper","class":"OC\\Files\\Storage\\StorageFactory","type":"->"},{"file":"/var/www/nextcloud/apps/files_antivirus/lib/AppInfo/Application.php","line":72,"function":"addStorageWrapper","class":"OC\\Files\\Filesystem","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":105,"function":"setupWrapper","class":"OCA\\Files_Antivirus\\AppInfo\\Application","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/SetupManager.php","line":244,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/SetupManager.php","line":417,"function":"oneTimeUserSetup","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Mount/Manager.php","line":97,"function":"setupForPath","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1376,"function":"find","class":"OC\\Files\\Mount\\Manager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/Root.php","line":208,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyUserFolder.php","line":47,"function":"get","class":"OC\\Files\\Node\\Root","type":"->"},{"function":"OC\\Files\\Node\\{closure}","class":"OC\\Files\\Node\\LazyUserFolder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":70,"function":"call_user_func"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":84,"function":"getRealFolder","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":260,"function":"__call","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php","line":208,"function":"getEtag","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/FilesPlugin.php","line":335,"function":"getETag","class":"OCA\\DAV\\Connector\\Sabre\\Node","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php","line":95,"function":"OCA\\DAV\\Connector\\Sabre\\{closure}","class":"OCA\\DAV\\Connector\\Sabre\\FilesPlugin","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/FilesPlugin.php","line":336,"function":"handle","class":"Sabre\\DAV\\PropFind","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"handleGetProperties","class":"OCA\\DAV\\Connector\\Sabre\\FilesPlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1052,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":984,"function":"getPropertiesByNode","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":374,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/files_antivirus/lib/AvirWrapper.php","Line":48,"message":"Cannot assign null to property OCA\\Files_Antivirus\\AvirWrapper::$mountPoint of type string","exception":{},"CustomMessage":"Cannot assign null to property OCA\\Files_Antivirus\\AvirWrapper::$mountPoint of type string"}}
@AssiaAzzouzi
Copy link

AssiaAzzouzi commented Jun 5, 2024

same problem here

Nextcloud 29.0.0
files_antivirus 5.5.3
PHP: 8.2

I see a lot of errors "OCA\Files_Antivirus\AvirWrapper::$mountPoint of type string", and as a result, my IP gets blocked and I can no longer access the account's documents or any other content.

Here is the full log entry related to that problem:

{"reqId”:”xxxxxx”,”level":3,"time":"2024-06-04T20:36:34+00:00","remoteAddr”:”x.x.x.x”,”user":"username”,”app":"index","method":"GET","url":"/index.php/apps/files/api/v1/stats","message":"Cannot assign null to property OCA\\Files_Antivirus\\AvirWrapper::$mountPoint of type string in file '/var/www/nextcloud/apps/files_antivirus/lib/AvirWrapper.php' line 48","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36","version":"29.0.0.19","exception":{"Exception":"Exception","Message":"Cannot assign null to property OCA\\Files_Antivirus\\AvirWrapper::$mountPoint of type string in file '/var/www/nextcloud/apps/files_antivirus/lib/AvirWrapper.php' line 48","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":170,"Previous":{"Exception":"TypeError","Message":"Cannot assign null to property OCA\\Files_Antivirus\\AvirWrapper::$mountPoint of type string","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/files_antivirus/lib/AppInfo/Application.php","line":61,"function":"__construct","class":"OCA\\Files_Antivirus\\AvirWrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Mount/MountPoint.php","line":263,"function":"OCA\\Files_Antivirus\\AppInfo\\{closure}","class":"OCA\\Files_Antivirus\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/StorageFactory.php","line":55,"function":"wrapStorage","class":"OC\\Files\\Mount\\MountPoint","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Filesystem.php","line":211,"function":"addStorageWrapper","class":"OC\\Files\\Storage\\StorageFactory","type":"->"},{"file":"/var/www/nextcloud/apps/files_antivirus/lib/AppInfo/Application.php","line":46,"function":"addStorageWrapper","class":"OC\\Files\\Filesystem","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":105,"function":"setupWrapper","class":"OCA\\Files_Antivirus\\AppInfo\\Application","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/SetupManager.php","line":244,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/SetupManager.php","line":417,"function":"oneTimeUserSetup","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Mount/Manager.php","line":97,"function":"setupForPath","class":"OC\\Files\\SetupManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1376,"function":"find","class":"OC\\Files\\Mount\\Manager","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Filesystem.php","line":711,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Helper.php","line":505,"function":"getFileInfo","class":"OC\\Files\\Filesystem","type":"::"},{"file":"/var/www/nextcloud/apps/files/lib/Controller/ApiController.php","line":270,"function":"getStorageInfo","class":"OC_Helper","type":"::"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"getStorageStats","class":"OCA\\Files\\Controller\\ApiController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/files_antivirus/lib/AvirWrapper.php","Line":48},"message":"Cannot assign null to property OCA\\Files_Antivirus\\AvirWrapper::$mountPoint of type string in file '/var/www/nextcloud/apps/files_antivirus/lib/AvirWrapper.php' line 48","exception":[],"CustomMessage":"Cannot assign null to property OCA\\Files_Antivirus\\AvirWrapper::$mountPoint of type string in file '/var/www/nextcloud/apps/files_antivirus/lib/AvirWrapper.php' line 48"},"id":"665f7ad3bb724"}

I could regain access to my account's content by disabling the app files_antivirus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants