[Bug]: workflow engine - no backgroundjobs created for trigger "tag assigned"
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ 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 OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
I tried to set up various flows. Tried both in the admin panel as well as user. The flows don´t run, however. Trying to troubleshoot, I checked the database (Mariadb) and found, that in the oc_background-jobs (or called similar) table no entry for “OCA/workflow” is created as it should (tried to implement workflow_ocr and PDF-conversion workflow as well as notification workflow). The cron job seems to be running without issues.
I think the issue might lay in the workflow engine itself.
Steps to reproduce
- install workflow plugin (pdf-converter, pdf-ocr, notification-workflow)
- set up (tag assigned, file created and any combination of these)
- wait for cron job (or force it)
- expected behavior: get notification after a tag was assigned, get a .odt converted to PDF, get OCR done on a PDF or a jpg.
Expected behavior
expected behavior: get notification after a tag was assigned, get a .odt converted to PDF, get OCR done on a PDF or a jpg.
Installation method
Other Community project
Nextcloud Server version
27
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
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
{
"system": {
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"******************",
"192.168.178.201"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "27.0.1.2",
"overwrite.cli.url": "https:\/\/*************",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"default_language": "de",
"enable_previews": true,
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"overwritehost": "cloud.mikoshi.de",
"activity_expire_days": 14,
"allow_local_remote_servers": true,
"auth.bruteforce.protection.enabled": true,
"blacklisted_files": [
".htaccess",
"Thumbs.db",
"thumbs.db"
],
"cron_log": true,
"default_phone_region": "DE",
"enabledPreviewProviders": [
"OC\\Preview\\PNG",
"OC\\Preview\\JPEG",
"OC\\Preview\\GIF",
"OC\\Preview\\BMP",
"OC\\Preview\\XBitmap",
"OC\\Preview\\Movie",
"OC\\Preview\\PDF",
"OC\\Preview\\MP3",
"OC\\Preview\\TXT",
"OC\\Preview\\MarkDown"
],
"filesystem_check_changes": 0,
"filelocking.enabled": "true",
"htaccess.RewriteBase": "\/",
"integrity.check.disabled": false,
"knowledgebaseenabled": false,
"log_rotate_size": "104857600",
"logfile": "\/var\/log\/nextcloud\/nextcloud.log",
"loglevel": 2,
"logtimezone": "Europe\/Berlin",
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.locking": "\\OC\\Memcache\\Redis",
"overwriteprotocol": "https",
"preview_max_x": 1024,
"preview_max_y": 768,
"preview_max_scale_factor": 1,
"preview_libreoffice_path": "\/usr\/bin\/libreoffice",
"profile.enabled": false,
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0,
"password": "***REMOVED SENSITIVE VALUE***",
"timeout": 0.5,
"dbindex": 1
},
"quota_include_external_storage": false,
"share_folder": "\/Freigaben",
"skeletondirectory": "",
"trashbin_retention_obligation": "auto, 7",
"mail_smtpmode": "smtp",
"mail_smtpsecure": "ssl",
"mail_sendmailmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"simpleSignUpLink.shown": false,
"maintenance": false,
"default_locale": "de_DE",
"data-fingerprint": "fead994bf6459f6edb3f3a9caf8a4bf6",
"updater.release.channel": "stable",
"maintenance_window_start": 1
}
}
List of activated Apps
Enabled:
- activity: 2.19.0
- admin_audit: 1.17.0
- analytics: 4.9.4
- announcementcenter: 6.6.1
- bruteforcesettings: 2.7.0
- calendar: 4.4.4
- circles: 27.0.1
- cloud_federation_api: 1.10.0
- comments: 1.17.0
- contacts: 5.3.2
- contactsinteraction: 1.8.0
- dashboard: 7.7.0
- dav: 1.27.0
- deck: 1.10.0
- end_to_end_encryption: 1.13.1
- federatedfilesharing: 1.17.0
- files: 1.22.0
- files_accesscontrol: 1.17.0
- files_automatedtagging: 1.17.0
- files_pdfviewer: 2.8.0
- files_rightclick: 1.6.0
- files_sharing: 1.19.0
- files_trashbin: 1.17.0
- files_versions: 1.20.0
- flow_notifications: 1.7.0
- forms: 3.3.1
- groupfolders: 15.0.1
- guests: 2.5.0
- integration_github: 2.0.6
- integration_openai: 1.0.11
- integration_replicate: 1.0.7
- logreader: 2.12.0
- lookup_server_connector: 1.15.0
- mail: 3.2.5
- music: 1.8.4
- news: 22.0.0
- nextcloud_announcements: 1.16.0
- notes: 4.8.1
- notifications: 2.15.0
- oauth2: 1.15.1
- password_policy: 1.17.0
- photos: 2.3.0
- previewgenerator: 5.3.0
- privacy: 1.11.0
- provisioning_api: 1.17.0
- recommendations: 1.6.0
- registration: 2.2.0
- related_resources: 1.2.0
- richdocuments: 8.1.1
- richdocumentscode: 23.5.202
- root_cache_cleaner: 0.1.5
- serverinfo: 1.17.0
- settings: 1.9.0
- sharebymail: 1.17.0
- side_menu: 3.10.3
- spreed: 17.0.3
- suspicious_login: 5.0.0
- systemtags: 1.17.0
- terms_of_service: 2.2.0
- text: 3.8.0
- theming: 2.2.0
- translate: 1.1.6
- twofactor_backupcodes: 1.16.0
- twofactor_nextcloud_notification: 3.7.0
- twofactor_totp: 9.0.0
- updatenotification: 1.17.0
- user_status: 1.7.0
- viewer: 2.1.0
- weather_status: 1.7.0
- workflow_ocr: 1.27.1
- workflow_pdf_converter: 1.12.0
- workflowengine: 2.9.0
Disabled:
- encryption: 2.15.0 (installed 2.15.0)
- federation: 1.17.0 (installed 1.17.0)
- files_external: 1.19.0
- firstrunwizard: 2.16.0 (installed 2.16.0)
- maps: 1.1.0 (installed 1.1.0)
- support: 1.10.0 (installed 1.10.0)
- survey_client: 1.15.0 (installed 1.15.0)
- talk_matterbridge: 1.26.0
- user_ldap: 1.17.0
Nextcloud Signing status
signed
Nextcloud Logs
{"reqId":"8dELPKLLUGdwxtQmU2kJ","level":3,"time":"2023-08-08T22:35:01+02:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Error while running background job (class: OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions, arguments: )","userAgent":"--","version":"27.0.1.2","exception":{"Exception":"TypeError","Message":"OCA\\GroupFolders\\ACL\\ACLManagerFactory::getACLManager(): Argument #1 ($user) must be of type OCP\\IUser, null given, called in /var/www/nextcloud/apps/groupfolders/lib/Mount/MountProvider.php on line 206","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/groupfolders/lib/Mount/MountProvider.php","line":206,"function":"getACLManager","class":"OCA\\GroupFolders\\ACL\\ACLManagerFactory","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php","line":172,"function":"getMount","class":"OCA\\GroupFolders\\Mount\\MountProvider","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":68,"function":"getAllVersionedFiles","class":"OCA\\GroupFolders\\Versions\\VersionsBackend","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":59,"function":"expireFolder","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php","line":43,"function":"expireAll","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":86,"function":"run","class":"OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"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/apps/groupfolders/lib/ACL/ACLManagerFactory.php","Line":37,"message":"Error while running background job (class: OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions, arguments: )","exception":[],"CustomMessage":"Error while running background job (class: OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions, arguments: )"},"id":"64d2a8812b3dd"}
Additional info
install method: bare metal, manual
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce one workflow from the listed steps, then start at cron.php and inspect the background-jobs table while the workflowengine, workflow_ocr, or workflow_pdf_converter apps are enabled. Compare the observed job creation with the reported GroupFolders background-job error in apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php. Done means the selected trigger creates and runs its background job and performs the expected action.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mariadb, php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100