nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.38k stars 4.07k forks source link

[Bug]: Invalid background job OCA\Settings\BackgroundJobs\VerifyUserData ? #46789

Closed major-mayer closed 3 months ago

major-mayer commented 3 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

I noticed that when i execute occ background-job:list I get the following output:

/var/www/html$ ./occ background-job:list
+-------+-------------------------------------------------------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| id    | class                                                             | last_run                  | argument                                                                                                                                  |
+-------+-------------------------------------------------------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 1     | OCA\Activity\BackgroundJob\EmailNotification                      | 2024-07-26T16:57:52+00:00 | null                                                                                                                                      |
| 2     | OCA\Activity\BackgroundJob\ExpireActivities                       | 2024-07-26T16:15:08+00:00 | null                                                                                                                                      |
| 3     | OCA\DAV\BackgroundJob\CleanupDirectLinksJob                       | 2024-07-26T16:15:09+00:00 | null                                                                                                                                      |
| 4     | OCA\DAV\BackgroundJob\UpdateCalendarResourcesRoomsBackgroundJob   | 2024-07-26T16:03:18+00:00 | null                                                                                                                                      |
...
| 84828 | OCA\Settings\BackgroundJobs\VerifyUserData                        | 1970-01-01T00:00:00+00:00 | {"verificationCode":"","data":"","type":"email","uid":"xxx","try":14,"lastRun":1722010100}                                   |
| 84829 | OCA\Settings\BackgroundJobs\VerifyUserData          

I'm not sure but this OCA\Settings\BackgroundJobs\VerifyUserData job seems to be incorrect. Its a user that has been created recently (around a week ago or so) and successfully logged in multiple times, so I wonder why this background job is still there, with last execution date set to 1970. I tried to execute it manually, and it says:

I have no name!@80b702c0aea0:/var/www/html$ ./occ background-job:execute 84828
Job class:            OCA\Settings\BackgroundJobs\VerifyUserData
Arguments:            {"verificationCode":"","data":"","type":"email","uid":"xxx","try":14,"lastRun":1722010100}
Type:                 job

Last checked:         2024-07-26T16:59:13+00:00
Reserved at:          -
Last executed:        1970-01-01T00:00:00+00:00
Last duration:        0

Job was not executed because it is not due
Specify the --force-execute option to run it anyway

Should I force execute it? Is this expected behavior or a bug?

Steps to reproduce

  1. Create a new user
  2. Observe the background jobs in the system

Expected behavior

I would expect that all background jobs are finished once the user has logged in successfully.

Installation method

Community Docker image

Nextcloud Server version

29

Operating system

None

PHP engine version

PHP 8.2

Web server

Other

Database engine version

MySQL

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

Upgraded to a MAJOR version (ex. 28 to 29)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

{
    "system": {
        "maintenance": false,
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nc.example.de",
            "nc.example.de"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nc.example.de",
        "overwriteprotocol": "https",
        "dbtype": "mysql",
        "version": "29.0.3.4",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "enable_previews": true,
        "preview_max_memory": 512,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\Krita",
            "OC\\Preview\\Imaginary",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\PDF",
            "OC\\Preview\\SVG",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MKV",
            "OC\\Preview\\MP4",
            "OC\\Preview\\AVI"
        ],
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "loglevel": 2,
        "theme": "",
        "onlyoffice": {
            "verify_peer_off": true
        },
        "activity_use_cached_mountpoints": true,
        "defaultapp": "files",
        "simpleSignUpLink.shown": false,
        "default_phone_region": "DE",
        "app_install_overwrite": [
            "imageconverter",
            "previewgenerator"
        ],
        "jpeg_quality": 60,
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "log_type": "errorlog",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "memories.vod.disable": false,
        "memories.vod.external": true,
        "memories.vod.bind": "",
        "memories.vod.connect": "10.26.3.12:47788",
        "memories.vod.path": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.exiftool_no_local": true,
        "memories.exiftool": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/exiftool-amd64-glibc",
        "memories.vod.qf": 30,
        "maintenance_window_start": 100,
        "memories.gis_type": 1,
        "memories.db.triggers.fcu": true,
        "memories.vod.vaapi.low_power": true
    }
}

List of activated Apps

Enabled:
  - activity: 2.21.1
  - admin_audit: 1.19.0
  - calendar: 4.7.12
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contacts: 6.0.0
  - contactsinteraction: 1.10.0
  - dashboard: 7.9.0
  - dav: 1.30.1
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.0
  - files_downloadlimit: 2.0.0
  - files_external: 1.21.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_retention: 1.18.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - forms: 4.2.4
  - groupfolders: 17.0.1
  - imageconverter: 2.0.2
  - lookup_server_connector: 1.17.0
  - memories: 7.3.1
  - music: 2.0.0
  - nextcloud_announcements: 1.18.0
  - notes: 4.10.1
  - notifications: 2.17.0
  - notify_push: 0.6.12
  - oauth2: 1.17.0
  - onlyoffice: 9.3.0
  - password_policy: 1.19.0
  - polls: 7.1.3
  - previewgenerator: 5.5.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - qownnotesapi: 24.4.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - snappymail: 2.36.4
  - support: 1.12.0
  - survey_client: 1.17.0
  - systemtags: 1.19.0
  - tasks: 0.16.0
  - text: 3.10.1
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - twofactor_nextcloud_notification: 3.9.0
  - twofactor_totp: 11.0.0-dev
  - updatenotification: 1.19.1
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflowengine: 2.11.0
Disabled:
  - bruteforcesettings: 2.9.0 (installed 2.4.0)
  - cms_pico: 1.0.21 (installed 1.0.21)
  - encryption: 2.17.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - logreader: 2.14.0 (installed 2.13.0)
  - maps: 1.4.0 (installed 1.4.0)
  - photos: 2.5.0 (installed 2.0.1)
  - suspicious_login: 7.0.0
  - user_ldap: 1.20.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

No response

solracsf commented 3 months ago

Why do you think it's invalid? Validate user data (phone, website, twitter account...) it's a valid background job.

major-mayer commented 3 months ago

Okay, maybe I was just confused that the last run is set to 1970 and the job is apparently not scheduled for execution in the future. But I'm also not sure how Nextcloud validates user data, so... If you think this is normal, feel free to close this issue.