nextcloud / deck

🗂 Kanban-style project & personal management tool for Nextcloud, similar to Trello
https://apps.nextcloud.com/apps/deck
GNU Affero General Public License v3.0
1.19k stars 273 forks source link

Activity notifications spamming user #2401

Open jinnko opened 3 years ago

jinnko commented 3 years ago

How to use GitHub

Describe the bug

One of my users has been received Activity notifications by email every 15 or 20 minutes for the past week. The contents of the emails has dozens of activity items dating back over a year.

To Reproduce

The issue is triggered by the cron. The cron is run every 5 minutes, but the Activity notification emails are sent only once every 15 or 20 minutes.

Expected behavior

Notifications should only be sent once.

Screenshots

The cron job itself doesn't generate any output, however:

$ docker exec -it -u www-data nextcloud php ./occ activity:send-mails
An unhandled exception has been thrown:
TypeError: Argument 1 passed to OC\Activity\Event::setParsedMessage() must be of the type string, null given, called in /var/www/html/custom_apps/deck/lib/Activity/DeckProvider.php on line
332 and defined in /var/www/html/lib/private/Activity/Event.php:327
Stack trace:
#0 /var/www/html/custom_apps/deck/lib/Activity/DeckProvider.php(332): OC\Activity\Event->setParsedMessage(NULL)                                                                             
#1 /var/www/html/custom_apps/deck/lib/Activity/DeckProvider.php(147): OCA\Deck\Activity\DeckProvider->parseParamForChanges(Array, Array, Object(OC\Activity\Event))                         
#2 /var/www/html/apps/activity/lib/MailQueueHandler.php(454): OCA\Deck\Activity\DeckProvider->parse('en', Object(OC\Activity\Event))                                                        
#3 /var/www/html/apps/activity/lib/MailQueueHandler.php(359): OCA\Activity\MailQueueHandler->parseEvent('en', Object(OC\Activity\Event))                                                    
#4 /var/www/html/apps/activity/lib/MailQueueHandler.php(164): OCA\Activity\MailQueueHandler->sendEmailToUser('test', 'test@example.com', 'en', 'Europe/London', 1602183440)                   
#5 /var/www/html/apps/activity/lib/Command/SendEmails.php(111): OCA\Activity\MailQueueHandler->sendEmails(500, 1602183440, true, NULL)                                                      
#6 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\Activity\Command\SendEmails->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/3rdparty/symfony/console/Application.php(1012): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/3rdparty/symfony/console/Application.php(272): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Activity\Command\SendEmails), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/console.php(100): OC\Console\Application->run()
#13 /var/www/html/occ(11): require_once('/var/www/html/c...')
#14 {main}#                         

Additionally in the UI logging interface there are many errors each cycle:

[activity] Error: OCP\RichObjectStrings\InvalidObjectExeption: Parameter is undefined at <<closure>>

0. /var/www/html/apps/activity/lib/MailQueueHandler.php line 461
   OC\RichObjectStrings\Validator->validate("{user} has upda ... }", {card: {type: "h ... }})
1. /var/www/html/apps/activity/lib/MailQueueHandler.php line 359
   OCA\Activity\MailQueueHandler->parseEvent("en_GB", OC\Activity\Event {})
2. /var/www/html/apps/activity/lib/MailQueueHandler.php line 164
   OCA\Activity\MailQueueHandler->sendEmailToUser("test2", "test2@example.com", "en_GB", "Europe/London", 1602182700)
3. /var/www/html/apps/activity/lib/BackgroundJob/EmailNotification.php line 65
   OCA\Activity\MailQueueHandler->sendEmails(500, 1602182700)
4. /var/www/html/lib/private/BackgroundJob/Job.php line 62
   OCA\Activity\BackgroundJob\EmailNotification->run(null)
5. /var/www/html/lib/private/BackgroundJob/TimedJob.php line 57
   OC\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})
6. /var/www/html/cron.php line 126
   OC\BackgroundJob\TimedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})

at 2020-10-08T18:45:01+00:00
[core] Error: TypeError: Argument 1 passed to OC\Activity\Event::setParsedMessage() must be of the type string, null given, called in /var/www/html/custom_apps/deck/lib/Activity/DeckProvider.php on line 332 at <<closure>>

0. /var/www/html/custom_apps/deck/lib/Activity/DeckProvider.php line 332
   OC\Activity\Event->setParsedMessage(null)
1. /var/www/html/custom_apps/deck/lib/Activity/DeckProvider.php line 147
   OCA\Deck\Activity\DeckProvider->parseParamForChanges({card: {title: " ... l}, {user: {type: "u ... }}, OC\Activity\Event {})
2. /var/www/html/apps/activity/lib/MailQueueHandler.php line 454
   OCA\Deck\Activity\DeckProvider->parse("en", OC\Activity\Event {})
3. /var/www/html/apps/activity/lib/MailQueueHandler.php line 359
   OCA\Activity\MailQueueHandler->parseEvent("en", OC\Activity\Event {})
4. /var/www/html/apps/activity/lib/MailQueueHandler.php line 164
   OCA\Activity\MailQueueHandler->sendEmailToUser("test", "test@example.com", "en", "Europe/London", 1602182700)
5. /var/www/html/apps/activity/lib/BackgroundJob/EmailNotification.php line 65
   OCA\Activity\MailQueueHandler->sendEmails(500, 1602182700)
6. /var/www/html/lib/private/BackgroundJob/Job.php line 62
   OCA\Activity\BackgroundJob\EmailNotification->run(null)
7. /var/www/html/lib/private/BackgroundJob/TimedJob.php line 57
   OC\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})
8. /var/www/html/cron.php line 126
   OC\BackgroundJob\TimedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})

at 2020-10-08T18:45:02+00:00
# mysql -e "SELECT * FROM oc_activity_mq WHERE object_type='deck_board';" nextcloud
mail_id amq_timestamp   amq_latest_send amq_type        amq_affecteduser        amq_appid       amq_subject     amq_subjectparams       object_type     object_id
242     1578919166      1578919166      deck    test2   deck    board_share     {"acl":{"participant":"test2","type":0,"boardId":4,"permissionEdit":true,"permissionShare":false,"permissionManage":false,"owner":false,"id":3},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1578919156,"id":4},"author":"test"}        deck_board      4
318     1579696980      1579696980      deck    test2   deck    board_share     {"acl":{"participant":"test2","type":0,"boardId":16,"permissionEdit":true,"permissionShare":false,"permissionManage":false,"owner":false,"id":4},"board":{"title":"AH208","owner":"test","color":"3A3B3D","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1579696953,"id":16},"author":"test"} deck_board      16
319     1579697006      1579697006      deck    test2   deck    stack_create    {"stack":{"title":"Doing","boardId":16,"deletedAt":0,"lastModified":0,"order":1,"id":79},"board":{"title":"AH208","owner":"test","color":"3A3B3D","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1579696982,"id":16},"author":"test"}    deck_board   16
494     1580218356      1580218356      deck    test2   deck    stack_update_title      {"stack":{"title":"Urgent & Important","boardId":4,"deletedAt":0,"lastModified":1580218347,"order":3,"id":74},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1580218347,"id":4},"author":"test","before":"Today","after":"Urgent & Important"}    deck_board      4
495     1580218368      1580218368      deck    test2   deck    stack_update_title      {"stack":{"title":"Important","boardId":4,"deletedAt":0,"lastModified":1580216066,"order":1,"id":25},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1580218356,"id":4},"author":"test","before":"To Do","after":"Important"}      deck_board      4
496     1580218375      1580218375      deck    test2   deck    stack_update_title      {"stack":{"title":"Not Important","boardId":4,"deletedAt":0,"lastModified":1579015164,"order":0,"id":22},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1580218368,"id":4},"author":"test","before":"Backlog","after":"Not Important"}    deck_board      4
497     1580218378      1580218378      deck    test2   deck    stack_update_title      {"stack":{"title":"Backlog","boardId":4,"deletedAt":0,"lastModified":1579015164,"order":0,"id":22},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1580218375,"id":4},"author":"test","before":"Not Important","after":"Backlog"}  deck_board      4
514     1580228310      1580228310      deck    test2   deck    stack_create    {"stack":{"title":"Urgent & Not Important","boardId":4,"deletedAt":0,"lastModified":0,"order":999,"id":80},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1580228296,"id":4},"author":"test"}     deck_board      4
515     1580228328      1580228328      deck    test2   deck    stack_create    {"stack":{"title":"Not Important","boardId":4,"deletedAt":0,"lastModified":0,"order":999,"id":81},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1580228323,"id":4},"author":"test"}      deck_board      4
848     1583788550      1583788550      deck    test2   deck    stack_create    {"stack":{"title":"Another thing","boardId":4,"deletedAt":0,"lastModified":0,"order":8,"id":82},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1583788506,"id":4},"author":"test"}  deck_board       4
849     1583788559      1583788559      deck    test2   deck    stack_delete    {"stack":{"title":"Another thing","boardId":4,"deletedAt":1583788559,"lastModified":0,"order":8,"id":82},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1583788550,"id":4},"author":"test"}  deck_board      4
878     1584094764      1584094764      deck    test2   deck    stack_create    {"stack":{"title":"Distractions","boardId":4,"deletedAt":0,"lastModified":0,"order":999,"id":83},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1584019640,"id":4},"author":"test"}       deck_board      4
882     1584097420      1584097420      deck    test2   deck    stack_create    {"stack":{"title":"Abandoned","boardId":4,"deletedAt":0,"lastModified":0,"order":999,"id":84},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1584094784,"id":4},"author":"test"} deck_board       4
974     1585131616      1585131616      deck    test2   deck    stack_create    {"stack":{"title":"find","boardId":4,"deletedAt":0,"lastModified":0,"order":999,"id":85},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1585131593,"id":4},"author":"test"}  deck_board   4
975     1585131623      1585131623      deck    test2   deck    stack_delete    {"stack":{"title":"find","boardId":4,"deletedAt":1585131623,"lastModified":0,"order":999,"id":85},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1585131616,"id":4},"author":"test"}      deck_board      4
1425    1587212841      1587212841      deck    test2   deck    stack_update_title      {"stack":{"title":"\\ud83d\\udca5 Urgent & Important","boardId":4,"deletedAt":0,"lastModified":1587054481,"order":4,"id":74},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1587212830,"id":4},"author":"test","before":"Urgent & Important","after":"\\ud83d\\udca5 Urgent & Important"} deck_board      4
1426    1587212863      1587212863      deck    test2   deck    stack_update_title      {"stack":{"title":"\\ud83d\\udd25 Urgent & Not Important","boardId":4,"deletedAt":0,"lastModified":1585581618,"order":3,"id":80},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1587212842,"id":4},"author":"test","before":"Urgent & Not Important","after":"\\ud83d\\udd25 Urgent & Not Important"}     deck_board      4
1427    1587212871      1587212871      deck    test2   deck    stack_update_title      {"stack":{"title":"\\ud83d\\udd25 Urgent & Not Important \\ud83d\\udd25","boardId":4,"deletedAt":0,"lastModified":1585581618,"order":3,"id":80},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1587212863,"id":4},"author":"test","before":"\\ud83d\\udd25 Urgent & Not Important","after":"\\ud83d\\udd25 Urgent & Not Important \\ud83d\\udd25"}        deck_board  4
1428    1587212878      1587212878      deck    test2   deck    stack_update_title      {"stack":{"title":"\\ud83d\\udca5 Urgent & Important \\ud83d\\udca5","boardId":4,"deletedAt":0,"lastModified":1587054481,"order":4,"id":74},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1587212871,"id":4},"author":"test","before":"\\ud83d\\udca5 Urgent & Important","after":"\\ud83d\\udca5 Urgent & Important \\ud83d\\udca5"}    deck_board      4
1429    1587212927      1587212927      deck    test2   deck    stack_update_title      {"stack":{"title":"\\ud83d\\udc85 Not Important \\ud83d\\udc85","boardId":4,"deletedAt":0,"lastModified":1585265147,"order":1,"id":81},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1587212878,"id":4},"author":"test","before":"Not Important","after":"\\ud83d\\udc85 Not Important \\ud83d\\udc85"}  deck_board      4
1430    1587212949      1587212949      deck    test2   deck    stack_update_title      {"stack":{"title":"\\ud83d\\udc7e Distractions \\ud83d\\udc7e","boardId":4,"deletedAt":0,"lastModified":1587032798,"order":5,"id":83},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1587212927,"id":4},"author":"test","before":"Distractions","after":"\\ud83d\\udc7e Distractions \\ud83d\\udc7e"}     deck_board      4
1431    1587213066      1587213066      deck    test2   deck    stack_update_title      {"stack":{"title":"\\ud83c\\udf0b Backlog \\ud83c\\udf0b","boardId":4,"deletedAt":0,"lastModified":1585586043,"order":0,"id":22},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1587212949,"id":4},"author":"test","before":"Backlog","after":"\\ud83c\\udf0b Backlog \\ud83c\\udf0b"}    deck_board      4
1432    1587213137      1587213137      deck    test2   deck    stack_update_title      {"stack":{"title":"\\ud83d\\udea9 Important \\ud83d\\udea9","boardId":4,"deletedAt":0,"lastModified":1586855042,"order":2,"id":25},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1587213105,"id":4},"author":"test","before":"Important","after":"\\ud83d\\udea9 Important \\ud83d\\udea9"}      deck_board      4
1433    1587213159      1587213159      deck    test2   deck    stack_update_title      {"stack":{"title":"\\ud83d\\ude80 Doing \\ud83d\\ude80","boardId":4,"deletedAt":0,"lastModified":1587032815,"order":7,"id":28},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1587213138,"id":4},"author":"test","before":"Doing","after":"\\ud83d\\ude80 Doing \\ud83d\\ude80"}  deck_board      4
1434    1587213174      1587213174      deck    test2   deck    stack_update_title      {"stack":{"title":"\\u2753 Waiting \\u2753","boardId":4,"deletedAt":0,"lastModified":1587035030,"order":6,"id":73},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1587213159,"id":4},"author":"test","before":"Waiting","after":"\\u2753 Waiting \\u2753"}        deck_board      4
1435    1587213183      1587213183      deck    test2   deck    stack_update_title      {"stack":{"title":"\\u2728 Done \\u2728","boardId":4,"deletedAt":0,"lastModified":1587132826,"order":8,"id":31},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1587213174,"id":4},"author":"test","before":"Done","after":"\\u2728 Done \\u2728"} deck_board      4
1436    1587213213      1587213213      deck    test2   deck    stack_update_title      {"stack":{"title":"\\ud83d\\ude48 Abandoned \\ud83d\\ude48","boardId":4,"deletedAt":0,"lastModified":1586353503,"order":999,"id":84},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1587213183,"id":4},"author":"test","before":"Abandoned","after":"\\ud83d\\ude48 Abandoned \\ud83d\\ude48"}    deck_board      4
1551    1587994054      1587994054      deck    test2   deck    stack_delete    {"stack":{"title":"\\ud83d\\udc7e Distractions \\ud83d\\udc7e","boardId":4,"deletedAt":1587994054,"lastModified":1587987052,"order":5,"id":83},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1587994051,"id":4},"author":"test"} deck_board      4
1886    1592811552      1592811552      deck    test2   deck    stack_create    {"stack":{"title":"Today","boardId":4,"deletedAt":0,"lastModified":0,"order":999,"id":86},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1592811535,"id":4},"author":"test"} deck_board   4
2169    1597153563      1597153563      deck    test2   deck    stack_delete    {"stack":{"title":"Today","boardId":4,"deletedAt":1597153563,"lastModified":1597077262,"order":3,"id":86},"board":{"title":"Personal","owner":"test","color":"c92b00","archived":false,"labels":[],"acl":[],"permissions":[],"users":[],"stacks":[],"deletedAt":0,"lastModified":1597153418,"id":4},"author":"test"}      deck_board      4

Client details: Not releveant

Server details **Operating system**: Debian 10 with docker 19.03.13-3 **Web server:** nginx **Database:** MariaDB 10.3.23 **PHP version:** 7.4.11 **Nextcloud version:** 19.0.3 **Where did you install Nextcloud from:** Official docker at https://hub.docker.com/_/nextcloud/ **Signing status:** ``` No errors have been found. ``` **List of activated apps:** ``` Enabled: - accessibility: 1.5.0 - activity: 2.12.0 - admin_audit: 1.9.0 - analytics: 2.5.0 - appointments: 1.7.7 - apporder: 0.11.0 - calendar: 2.0.4 - camerarawpreviews: 0.7.8 - cloud_federation_api: 1.2.0 - comments: 1.9.0 - contacts: 3.4.0 - contactsinteraction: 1.0.0 - dav: 1.15.0 - deck: 1.1.0 - event_update_notification: 1.0.2 - federatedfilesharing: 1.9.0 - files: 1.14.0 - files_external: 1.10.0 - files_external_gdrive: 0.4.0 - files_markdown: 2.3.1 - files_pdfviewer: 1.8.0 - files_photospheres: 1.19.1 - files_rightclick: 0.16.0 - files_sharing: 1.11.0 - files_trashbin: 1.9.0 - files_versions: 1.12.0 - files_videoplayer: 1.8.0 - joplin: 0.0.25 - logreader: 2.4.0 - lookup_server_connector: 1.7.0 - metadata: 0.12.0 - nextcloud_announcements: 1.8.0 - notes: 3.6.4 - notifications: 2.7.0 - oauth2: 1.7.0 - password_policy: 1.9.1 - photos: 1.1.0 - piwik: 0.7.0 - privacy: 1.3.0 - provisioning_api: 1.9.0 - recommendations: 0.7.0 - richdocuments: 3.7.4 - serverinfo: 1.9.0 - settings: 1.1.0 - sharebymail: 1.9.0 - spreed: 9.0.4 - systemtags: 1.9.0 - tasks: 0.13.3 - text: 3.0.1 - theming: 1.10.0 - twofactor_admin: 3.0.0 - twofactor_backupcodes: 1.8.0 - twofactor_nextcloud_notification: 2.3.0 - twofactor_totp: 5.0.0 - twofactor_u2f: 6.0.0 - updatenotification: 1.9.0 - viewer: 1.3.0 - workflow_script: 1.4.0 - workflowengine: 2.1.0 Disabled: - bruteforcesettings - drawio - encryption - facerecognition - federation - files_fulltextsearch - files_fulltextsearch_tesseract - firstrunwizard - fulltextsearch - mail - news - polls - support - survey_client - twofactor_email - twofactor_gateway - user_ldap ``` **Nextcloud configuration:** ``` $ docker exec -it -u www-data nextcloud php ./occ config:list system { "system": { "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": [ "nextcloud.example.com" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/nextcloud.example.com", "overwriteprotocol": "https", "dbtype": "mysql", "version": "19.0.3.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "theme": "", "loglevel": 2, "maintenance": false, "mail_smtpmode": "smtp", "mail_smtpauthtype": "PLAIN", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "auth.bruteforce.protection.enabled": false, "mysql.utf8mb4": true, "has_rebuilt_cache": true, "twofactor_enforced": "true", "twofactor_enforced_groups": [], "twofactor_enforced_excluded_groups": [], "updater.release.channel": "stable", "app_install_overwrite": [ "twofactor_yubikey", "files_external_gdrive", "admin_notifications", "joplin" ] } } ``` **Are you using an external user-backend, if yes which one:** No
Logs #### Nextcloud log (data/nextcloud.log) *See screenshot section above* ``` Insert your Nextcloud log here ``` #### Browser log Not relevant
jinnko commented 3 years ago

Probably unrelated but the activity notification emails are also still being sent even after the global Administration > Activity > Send activity emails setting is disabled.

Additionally looking at the contents of the email there are several items along the lines:

19 December 2019 at 14:00 Rich subject or a parameter for "{user} has updated the description of the card {card} in list {stack} on board {board}" is malformed

juliushaertl commented 3 years ago

Probably unrelated but the activity notification emails are also still being sent even after the global Administration > Activity > Send activity emails setting is disabled.

The setting will only affect fresh activity generation. Everything in the activity_mq table will still be sent out.

I'll have a look at the errors, however for not sending out old activities that have piled up, I'd recommend to just purge oc_activity_mq once for the old entries.

jinnko commented 3 years ago

Happy to clear out the old entries. Is it safe to just DELETE FROM activity_mq WHERE amq_affecteduser = "%s";?

I was wondering whether it's falling over because of something like special characters or if some item that's being notified about has been removed. In either case I thought there's an opportunity to make it more robust.

Not sure why such old activity is being notified about now either. I've had this instance running for many years and haven't changed anything other than keeping up with updates released via the official docker channel and any installed addons.

juliushaertl commented 3 years ago

Happy to clear out the old entries. Is it safe to just DELETE FROM activity_mq WHERE amq_affecteduser = "%s";?

Yep that would be fine.

jinnko commented 3 years ago

Clearning out the oc_activity_mq table for all users mentioned in the occ activity:send-mails exceptions has allowed the occ activity:send-mails command to run without error. Let see how things play out from here. Thanks for the help.

Dubidubiduu commented 3 years ago

Probably unrelated but the activity notification emails are also still being sent even after the global Administration > Activity > Send activity emails setting is disabled.

The setting will only affect fresh activity generation. Everything in the activity_mq table will still be sent out.

I'll have a look at the errors, however for not sending out old activities that have piled up, I'd recommend to just purge oc_activity_mq once for the old entries.

This

The setting will only affect fresh activity generation. Everything in the activity_mq table will still be sent out.

is only true for new users, right? So when admin change activity settings it's just the default setting for new users. At least it seems to be at my instance.

Question arose, if there is any smart way to change the settings for my existing users, despite of manual database manipulation of course.