The Basics
- Nextcloud Server version (e.g., 29.x.x):
29.0.10
- Operating system and version (e.g., Ubuntu 24.04):
Linux
- Web server and version (e.g, Apache 2.4.25):
Apache 2.4.57
- Reverse proxy and version _(e.g. nginx 1.27.2)
Nginx Proxy Manager 2.12.3
- PHP version (e.g, 8.3):
8.2
- Is this the first time you’ve seen this error? (Yes / No):
No
- When did this problem seem to first start?
unsure
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
bare metal
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
No
Summary of the issue you are facing:
Logs produce
TypeError
OC\Activity\Event::setObject(): Argument #3 ($objectName) must be of type string, null given, called in /share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/apps/files_antivirus/lib/Item.php on line 104
Error while running background job OCA\Files_Antivirus\BackgroundJob\BackgroundScanner (id: 98446, arguments: null)
Steps to replicate it (hint: details matter!):
- turn on antivirus
Log entries
TypeError
OC\Activity\Event::setObject(): Argument #3 ($objectName) must be of type string, null given, called in /share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/apps/files_antivirus/lib/Item.php on line 104
Error while running background job OCA\Files_Antivirus\BackgroundJob\BackgroundScanner (id: 98446, arguments: null)
Nextcloud
Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log
located in your data directory). Feel free to use a pastebin/gist service if necessary.
{"reqId":"Lcv7lAuMOEtsWHv2Miq7","level":3,"time":"2025-02-09T11:30:25+08:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Error while running background job OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner (id: 98446, arguments: null)","userAgent":"--","version":"29.0.10.1","exception":{"Exception":"TypeError","Message":"OC\\Activity\\Event::setObject(): Argument #3 ($objectName) must be of type string, null given, called in /share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/apps/files_antivirus/lib/Item.php on line 104","Code":0,"Trace":[{"file":"/share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/apps/files_antivirus/lib/Item.php","line":104,"function":"setObject","class":"OC\\Activity\\Event","type":"->"},{"file":"/share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/apps/files_antivirus/lib/Status.php","line":171,"function":"processInfected","class":"OCA\\Files_Antivirus\\Item","type":"->"},{"file":"/share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/apps/files_antivirus/lib/BackgroundJob/BackgroundScanner.php","line":298,"function":"dispatch","class":"OCA\\Files_Antivirus\\Status","type":"->"},{"file":"/share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/apps/files_antivirus/lib/BackgroundJob/BackgroundScanner.php","line":147,"function":"scanOneFile","class":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner","type":"->"},{"file":"/share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/apps/files_antivirus/lib/BackgroundJob/BackgroundScanner.php","line":132,"function":"processFiles","class":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner","type":"->"},{"file":"/share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/apps/files_antivirus/lib/BackgroundJob/BackgroundScanner.php","line":83,"function":"scan","class":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner","type":"->"},{"file":"/share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/lib/public/BackgroundJob/Job.php","line":80,"function":"run","class":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner","type":"->"},{"file":"/share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":107,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":94,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/cron.php","line":177,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/share/CACHEDEV2_DATA/.qpkg/NextCloud80/nextcloud/lib/private/Activity/Event.php","Line":413,"message":"Error while running background job OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner (id: 98446, arguments: null)","exception":[],"CustomMessage":"Error while running background job OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner (id: 98446, arguments: null)"},"id":"67a821ad98260"}
Web server / Reverse Proxy
The output of your Apache/nginx/system log in /var/log/____
:
PASTE HERE
Configuration
Nextcloud
The output of occ config:list system
or similar is best, but, if not possible, the contents of your config.php
file from /path/to/nextcloud
is fine (make sure to remove any identifiable information!):
{
"system": {
"trusted_domains": [
"nextcloud.domain.url"
],
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"forwarded_for_headers": [
"HTTP_X_FORWARDED_FOR",
"HTTP_FORWARDED_FOR"
],
"maintenance_window_start": 1,
"secret": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"overwrite.cli.url": "https:\/\/cloud.ispoweredby.me\/",
"overwriteprotocol": "https",
"htaccess.RewriteBase": "\/",
"dbtype": "pgsql",
"version": "29.0.10.1",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"logtimezone": "Asia\/Singapore",
"default_locale": "en_SG",
"default_timezone": "Asia\/Singapore",
"installed": true,
"filelocking.enabled": true,
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0,
"timeout": 0
},
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "sendmail",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"theme": "",
"log_type": "file",
"loglevel": 3,
"logfile": "\/opt\/NextCloud80\/nextcloud.log",
"maintenance": false,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"updater.release.channel": "stable",
"app.mail.imap.timeout": 60,
"app.mail.smtp.timeout": 60,
"app.mail.smtplog.enabled": true,
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"mail_smtpdebug": false,
"default_phone_region": "SG",
"onlyoffice": {
"verify_peer_off": true
},
"appstoreenabled": true,
"appstoreurl": "https:\/\/apps.nextcloud.com\/api\/v1",
"app_install_overwrite": [
"activitylog",
"sharerenamer",
"files_trackdownloads",
"ransomware_detection",
"documentserver_community",
"documents",
"ransomware_protection",
"dropit",
"impersonate",
"richdocuments",
"breezedark"
],
"mail_sendmailmode": "pipe",
"mail_smtpauthtype": "PLAIN",
"mail_smtpsecure": "tls",
"instanceid": "***REMOVED SENSITIVE VALUE***",
"data-fingerprint": "85af989ee74b8b4f8195cd0e7bec605a",
"activity_expire_days": 120,
"check_for_working_htaccess": true,
"check_for_working_wellknown_setup": true,
"passwordsalt": "***REMOVED SENSITIVE VALUE***"
}
}
Apps
The output of occ app:list
(if possible).
Enabled:
- activity: 2.21.1
- admin_audit: 1.19.0
- appointments: 2.3.5
- bruteforcesettings: 2.9.0
- calendar: 4.7.16
- circles: 29.0.0-dev
- cloud_federation_api: 1.12.0
- collectives: 2.16.0
- comments: 1.19.0
- contacts: 6.0.2
- contactsinteraction: 1.10.0
- dashboard: 7.9.0
- dav: 1.30.1
- deck: 1.13.3
- drawio: 3.0.3
- duplicatefinder: 1.6.1
- federatedfilesharing: 1.19.0
- federation: 1.19.0
- files: 2.1.1
- files_antivirus: 5.6.1
- files_downloadlimit: 2.0.0
- files_lock: 29.0.2
- files_pdfviewer: 2.10.0
- files_reminders: 1.2.0
- files_sharing: 1.21.0
- files_trashbin: 1.19.0
- files_versions: 1.22.0
- firstrunwizard: 2.18.0
- forms: 4.3.6
- geoblocker: 0.5.15
- google_synchronization: 3.0.0
- impersonate: 1.16.0
- integration_mattermost: 2.1.0
- logreader: 2.14.0
- lookup_server_connector: 1.17.0
- mail: 3.7.19
- nextcloud_announcements: 1.18.0
- notes: 4.11.0
- notifications: 2.17.0
- notify_push: 1.0.0
- oauth2: 1.17.1
- oidc_login: 3.2.0
- password_policy: 1.19.0
- photos: 2.5.0
- privacy: 1.13.0
- provisioning_api: 1.19.0
- qownnotesapi: 25.2.0
- ransomware_protection: 1.14.0
- recommendations: 2.1.0
- related_resources: 1.4.0
- richdocuments: 8.4.9
- serverinfo: 1.19.0
- settings: 1.12.0
- sharebymail: 1.19.0
- sharerenamer: 3.4.0
- sociallogin: 5.8.4
- support: 1.12.0
- survey_client: 1.17.0
- suspicious_login: 7.0.0
- systemtags: 1.19.0
- text: 3.10.1
- theming: 2.4.0
- twofactor_backupcodes: 1.18.0
- twofactor_nextcloud_notification: 3.9.0
- updatenotification: 1.19.1
- user_status: 1.9.0
- viewer: 2.3.0
- weather_status: 1.9.0
- workflowengine: 2.11.0
Disabled:
- apporder: 0.15.0 (installed 0.15.0)
- breezedark: 29.0.0 (installed 29.0.0)
- cpanelmailsync: 0.1.7 (installed 0.1.7)
- encryption: 2.17.0 (installed 2.9.0)
- end_to_end_encryption: 1.15.2 (installed 1.15.2)
- extract: 1.3.6 (installed 1.3.6)
- files_downloadactivity: 1.17.0 (installed 1.17.0)
- files_external: 1.21.0
- files_rightclick: 0.15.1 (installed 1.6.0)
- files_texteditor: 2.15.1 (installed 2.15.1)
- transfer: 0.6.3 (installed 0.6.3)
- twofactor_totp: 11.0.0-dev
- user_ldap: 1.20.0
- workflow_pdf_converter: 1.14.2 (installed 1.14.2)
Tips for increasing the likelihood of a response
- Use the
preformatted text
formatting option in the editor for all log entries and configuration output. - If screenshots are useful, feel free to include them.
- If possible, also include key error output in text form so it can be searched for.
- Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.
similar incidence here there was no resolution and the thread was closed. it’s really clogging up my log file with this error.
Additional info, my antivirus is clamav in docker with port exposed, other services are using the antivirus service without issues.