nextcloud / files_antivirus

👾 Antivirus app for Nextcloud Files
https://apps.nextcloud.com/apps/files_antivirus
GNU Affero General Public License v3.0
81 stars 33 forks source link

Error in cron job #252

Closed plinss closed 1 year ago

plinss commented 1 year ago

Steps to reproduce

  1. Install files_antivirus
  2. Configure cron job to run periodically

Expected behaviour

Normal operation

Actual behaviour

Once per day (even though the cron job runs every 5 minutes), the cron job fails with the following stack trace:

Error: Call to a member function getTime() on null in /var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php:94
Stack trace:
#0 /var/www/nextcloud/cron.php(151): OCP\BackgroundJob\TimedJob->execute()
#1 {main}

This began immediately after upgrading to v4.0.0 (no other changes) on multiple nextcloud instances (both v24 and v25)

Server configuration

Operating system: Debian 11

Web server: Nginx

Database: MariaDB

PHP version: 7.4

Nextcloud version: 24 and 25

Where did you install Nextcloud from: Source install

List of activated apps:

Enabled:
  - accessibility: 1.10.0
  - activity: 2.16.0
  - admin_audit: 1.14.0
  - apporder: 0.15.0
  - bruteforcesettings: 2.4.0
  - calendar: 3.5.2
  - checksum: 1.1.5
  - circles: 24.0.1
  - cloud_federation_api: 1.7.0
  - comments: 1.14.0
  - contacts: 4.2.2
  - contactsinteraction: 1.5.0
  - dashboard: 7.4.0
  - dav: 1.22.0
  - deck: 1.7.3
  - drawio: 1.0.5
  - extract: 1.3.5
  - federatedfilesharing: 1.14.0
  - federation: 1.14.0
  - files: 1.19.0
  - files_accesscontrol: 1.14.1
  - files_antivirus: 4.0.0
  - files_automatedtagging: 1.14.0
  - files_downloadactivity: 1.15.0
  - files_external: 1.16.1
  - files_linkeditor: 1.1.13
  - files_markdown: 2.3.6
  - files_pdfviewer: 2.5.0
  - files_retention: 1.13.2
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.2
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - firstrunwizard: 2.13.0
  - group_everyone: 0.1.11
  - groupfolders: 12.0.2
  - integration_google: 1.0.8
  - integration_whiteboard: 0.0.15
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - metadata: 0.17.0
  - nextcloud_announcements: 1.13.0
  - notes: 4.5.1
  - notifications: 2.12.1
  - notify_push: 0.5.0
  - oauth2: 1.12.0
  - onlyoffice: 7.5.8
  - password_policy: 1.14.0
  - photos: 1.6.0
  - previewgenerator: 5.1.1
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - quota_warning: 1.15.0
  - rainloop: 7.2.6
  - recommendations: 1.3.0
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - spreed: 14.0.6
  - support: 1.7.0
  - survey_client: 1.12.0
  - suspicious_login: 4.2.1
  - systemtags: 1.14.0
  - tasks: 0.14.5
  - text: 3.5.1
  - theming: 1.15.0
  - transfer: 0.6.0
  - twofactor_backupcodes: 1.13.0
  - twofactor_totp: 6.4.1
  - twofactor_webauthn: 0.3.3
  - updatenotification: 1.14.0
  - user_ldap: 1.14.1
  - user_saml: 5.1.0
  - user_status: 1.4.0
  - viewer: 1.8.0
  - weather_status: 1.4.0
  - workflowengine: 2.6.0
Disabled:
  - encryption
  - files_trackdownloads: 1.11.0

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.***REMOVED SENSITIVE VALUE***
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "updater.release.channel": "stable",
        "defaultapp": "apporder",
        "default_phone_region": "US",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/cloud.***REMOVED SENSITIVE VALUE***",
        "overwritehost": "cloud.***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "dbtype": "mysql",
        "version": "24.0.7.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "htaccess.RewriteBase": "\/",
        "app.mail.accounts.default": {
            "email": "%EMAIL%",
            "imapHost": "mail.***REMOVED SENSITIVE VALUE***",
            "imapPort": 993,
            "imapUser": "%EMAIL%",
            "imapSslMode": "ssl",
            "smtpHost": "smtp.***REMOVED SENSITIVE VALUE***",
            "smtpPort": 465,
            "smtpUser": "%EMAIL%",
            "smtpSslMode": "ssl"
        },
        "app.mail.imap.timeout": 30,
        "app.mail.smtp.timeout": 30,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "PLAIN",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "lost_password_link": "https:\/\/account.***REMOVED SENSITIVE VALUE***\/recovery.php",
        "allow_user_to_change_display_name": false,
        "simpleSignUpLink.shown": false,
        "preview_max_x": 512,
        "preview_max_y": 512,
        "preview_max_scale_factor": 4
    }
}

Client configuration

Browser: n/a

Operating system: n/a

Logs

Nextcloud log (data/owncloud.log)

{"reqId":"GSNXn88fEeXK85KFbOMy","level":3,"time":"2022-11-26T10:10:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Call to a member function getTime() on null","userAgent":"--","version":"24.0.7.1","exception":{"Exception":"Error","Message":"Call to a member function getTime() on null","Code":0,"Trace":[{"file":"/var/www/nextcloud/cron.php","line":151,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","Line":94,"CustomMessage":"--"}}

Browser log

n/a
solracsf commented 1 year ago

Duplicate of https://github.com/nextcloud/server/issues/35543