Skip to content

[Bug]: cron issues messages like that roughly 2-3x per day #7714

@flaminmoe

Description

@flaminmoe

⚠️ 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

Error: Call to a member function getBodyPart() on null in /var/www/html/apps/mail/lib/IMAP/MessageMapper.php:727
Stack trace:
#0 [internal function]: OCA\Mail\IMAP\MessageMapper->OCA\Mail\IMAP{closure}()
nextcloud/server#1 /var/www/html/apps/mail/lib/IMAP/MessageMapper.php(738): array_map()
nextcloud/server#2 /var/www/html/apps/mail/lib/IMAP/PreviewEnhancer.php(86): OCA\Mail\IMAP\MessageMapper->getBodyStructureData()
nextcloud/server#3 /var/www/html/apps/mail/lib/Service/PreprocessingService.php(81): OCA\Mail\IMAP\PreviewEnhancer->process()
nextcloud/server#4 /var/www/html/apps/mail/lib/BackgroundJob/PreviewEnhancementProcessingJob.php(94): OCA\Mail\Service\PreprocessingService->process()
nextcloud/server#5 /var/www/html/lib/public/BackgroundJob/Job.php(78): OCA\Mail\BackgroundJob\PreviewEnhancementProcessingJob->run()
nextcloud/server#6 /var/www/html/lib/public/BackgroundJob/TimedJob.php(103): OCP\BackgroundJob\Job->start()
nextcloud/server#7 /var/www/html/lib/public/BackgroundJob/TimedJob.php(93): OCP\BackgroundJob\TimedJob->start()
nextcloud/server#8 /var/www/html/cron.php(152): OCP\BackgroundJob\TimedJob->execute()
nextcloud/server#9 {main}

Steps to reproduce

crontab -u www-data -l
shows:

*/5 * * * * php8.0 -f /var/www/html/cron.php

Expected behavior

no error mails

Installation method

Community Manual installation with Archive

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.0

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

root@mobian:/var/www/html# sudo -u www-data php occ config:list system
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "mobian.inf.ethz.ch"
        ],
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "filelocking.enabled": true,
        "dbtype": "mysql",
        "version": "25.0.1.1",
        "overwrite.cli.url": "https:\/\/mobian.inf.ethz.ch",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "mail_smtpmode": "sendmail",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "DE",
        "app_install_overwrite": [
            "keeweb",
            "ransomware_detection",
            "onlyoffice",
            "officeonline"
        ],
        "theme": "",
        "loglevel": 0,
        "updater.release.channel": "stable"
    }
}

List of activated Apps

root@mobian:/var/www/html# sudo -u www-data php 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
  - contactsinteraction: 1.6.0
  - dashboard: 7.5.0
  - dav: 1.24.0
  - deck: 1.8.2
  - event_update_notification: 2.0.0
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - 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
  - keeweb: 0.6.10
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - mail: 2.1.4
  - music: 1.7.0
  - nextcloud_announcements: 1.14.0
  - notes: 4.6.0
  - notifications: 2.13.1
  - oauth2: 1.13.0
  - onlyoffice: 7.6.8
  - 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
  - spreed: 15.0.1
  - 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
  - twofactor_totp: 7.0.0
  - twofactor_webauthn: 1.0.0
  - updatenotification: 1.15.0
  - user_status: 1.5.0
  - viewer: 1.9.0
  - weather_status: 1.5.0
  - workflowengine: 2.7.0
Disabled:
  - announcementcenter: 6.4.0
  - apporder: 0.15.0
  - bruteforcesettings: 2.4.0
  - duplicatefinder: 0.0.15
  - encryption
  - passwords: 2022.11.21
  - polls: 4.0.0
  - ransomware_detection: 0.10.0
  - ransomware_protection: 1.14.0
  - suspicious_login
  - user_ldap

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions