Skip to content

[Bug]: $time must not be accessed before initialization #35543

@pgaufillet

Description

@pgaufillet

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

Since the upgrade to NC 25, the following error pops up during the execution of cron jobs only at 02:00 and 14:00:

Error: Typed property OCP\BackgroundJob\Job::$time must not be accessed before initialization in /var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php:102
Stack trace:
#0 /var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php(93): OCP\BackgroundJob\TimedJob->start()
#1 /var/www/nextcloud/cron.php(152): OCP\BackgroundJob\TimedJob->execute()
#2 {main}

Steps to reproduce

  1. Just have a look to NC journal after 02:00/14:00 cron jobs execution.

Expected behavior

No error ;-)

Installation method

Community Web installer on a VPS or web space

Operating system

Debian/Ubuntu

PHP engine version

PHP 7.4

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Updated to a major version (ex. 22.2.3 to 23.0.1)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

php occ config:list system
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "check_for_working_wellknown_setup": false,
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "25.0.1.1",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "default_language": "fr",
        "default_locale": "fr_FR",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "maintenance": false,
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "overwritewebroot": "***REMOVED SENSITIVE VALUE***",
        "overwritecondaddr": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 2,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "updater.release.channel": "stable",
        "mysql.utf8mb4": true,
        "default_phone_region": "FR",
        "trashbin_retention_obligation": "60,60"
    }
}

List of activated Apps

occ app:list
Enabled:
  - activity: 2.17.0
  - admin_audit: 1.15.0
  - calendar: 4.1.0
  - circles: 25.0.0
  - cloud_federation_api: 1.8.0
  - comments: 1.15.0
  - contacts: 5.0.1
  - dav: 1.24.0
  - drawio: 1.0.5
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_antivirus: 4.0.0
  - files_external: 1.17.0
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - firstrunwizard: 2.14.0
  - groupfolders: 13.1.0
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - mail: 2.1.4
  - nextcloud_announcements: 1.14.0
  - notifications: 2.13.1
  - oauth2: 1.13.0
  - password_policy: 1.15.0
  - photos: 2.0.0
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - recommendations: 1.4.0
  - related_resources: 1.0.3
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - support: 1.8.0
  - survey_client: 1.13.0
  - systemtags: 1.15.0
  - tasks: 0.14.5
  - text: 3.6.0
  - theming: 2.0.1
  - twofactor_backupcodes: 1.14.0
  - updatenotification: 1.15.0
  - viewer: 1.9.0
  - workflowengine: 2.7.0
Disabled:
  - bruteforcesettings
  - cms_pico: 1.0.21
  - contactsinteraction: 1.5.0
  - dashboard: 7.0.0
  - encryption
  - suspicious_login
  - twofactor_totp
  - user_external: 3.0.0
  - user_ldap
  - user_status: 1.0.1
  - weather_status: 1.0.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"SztDoEXmh8SzATpc1HMk","level":3,"time":"2022-12-01T13:00:03+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"/nextcloud/cron.php","message":"Typed property OCP\\BackgroundJob\\Job::$time must not be accessed before initialization","userAgent":"--","version":"25.0.1.1","exception":{"Exception":"Error","Message":"Typed property OCP\\BackgroundJob\\Job::$time must not be accessed before initialization","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","Line":102,"CustomMessage":"--"}}

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap25-feedbackbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions