deck icon indicating copy to clipboard operation
deck copied to clipboard

email notifications NOT working

Open caww opened this issue 1 year ago • 13 comments

Describe the bug When we installed clean nextcloud + deck and setup email notifications in asap mode we tried and received no emails

To Reproduce Steps to reproduce the behavior:

  1. Go to Deck and create any card and change it
  2. You will receive no email notifications (push is working)

Expected behavior We must have email notification asap

Client details:

  • OS: debian 11
  • Browser chrome
  • Version Deck (1.2.1) nextcloud (28.0.2) and chrome - 121.0.6167.140
  • Device: desktop, mobile
Server details

Operating system: debian 11 Web server: nginx + fpm + php 8.2 Database: mariadb 10.6 PHP version: 8.2 Nextcloud version: (see Nextcloud admin page) 28.0.2 Where did you install Nextcloud from: webinstaller in php file

List of activated apps:

  | Activity | 2.20.0 | Featured | Disable
  | Auditing / Logging | 1.18.0 | Featured | Disable
  | Bookmarks | 13.1.3 |   | Disable
  | Brute-force settings | 2.8.0 | Featured | Disable
  | Calendar | 4.6.4 | Featured | Disable
  | Circles | 28.0.0-dev | Featured | Disable
  | Collaborative tags | 1.18.0 | Featured | Disable
  | Comments | 1.18.0 | Featured | Disable
  | Contacts | 5.5.1 | Featured | Disable
  | Contacts Interaction | 1.9.0 | Featured | Disable
  | Dashboard | 7.8.0 | Featured | Disable
  | Deck | 1.12.1 | Featured | Disable
  | Deleted files | 1.18.0 | Featured | Disable
  | Federation | 1.18.0 | Featured | Disable
  | File reminders | 1.1.0 | Featured | Disable
  | File sharing | 1.20.0 | Featured | Disable
  | Group folders | 16.0.3 | Featured | Disable
  | Log Reader | 2.13.0 | Featured | Disable
  | Monitoring | 1.18.0 | Featured | Disable
  | Notes | 4.9.2 | Featured | Disable
  | Notifications | 2.16.0 | Featured | Disable
  | Password policy | 1.18.0 | Featured | Disable
  | Passwords | 2024.2.20 |   | Disable
  | PDF viewer | 2.9.0 | Featured | Disable
  | Photos | 2.4.0 | Featured | Disable
  | Privacy | 1.12.0 | Featured | Disable
  | Recommendations | 2.0.0 | Featured | Disable
  | Related Resources | 1.3.0 | Featured | Disable
  | Share by mail | 1.18.0 | Featured | Disable
  | Suspicious Login | 6.0.0 | Featured | Disable
  | Talk | 18.0.3 | Featured | Disable
  | Tasks | 0.15.0 | Featured | Disable
  | Text | 3.9.1 | Featured | Disable
  | User status | 1.8.1 | Featured | Disable
  | Versions | 1.21.0 | Featured | Disable
  | Weather status | 1.8.0 | Featured | Disable

Nextcloud configuration:

{                                                                                                                                                     
    "system": {                                                                                                                                       
        "instanceid": "***REMOVED SENSITIVE VALUE***",                                                                                                
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",                                                                                              
        "secret": "***REMOVED SENSITIVE VALUE***",                                                                                                    
        "trusted_domains": [                                                                                                                          
            "hidden.com",                                                                                                                        
            "www.hidden.com",                                                                                                                    
            "142.132.hidden.hidden",                                                                                                                        
            "2a01:hidden:272:hidden::hidden"                                                                                                                    
        ],                                                                                                                                            
        "overwritehost": "hidden.com",                                                                                                           
        "datadirectory": "***REMOVED SENSITIVE VALUE***",                                                                                             
        "dbtype": "mysql",                                                                                                                            
        "version": "28.0.2.5",                                                                                                                        
        "overwrite.cli.url": "https:\/\/hidden.com",                                                                                             
        "dbname": "***REMOVED SENSITIVE VALUE***",                                                                                                    
        "dbhost": "***REMOVED SENSITIVE VALUE***",                                                                                                    
        "dbport": "",                                                                                                                                 
        "dbtableprefix": "oc_",                                                                                                                       
        "mysql.utf8mb4": true,                                                                                                                        
        "dbuser": "***REMOVED SENSITIVE VALUE***",                                                                                                    
        "dbpassword": "***REMOVED SENSITIVE VALUE***",                                                                                                
        "default_phone_region": "en_CA",                                                                                                              
        "installed": true,                                                                                                                            
        "filelocking.enabled": true,                                                                                                                  
        "memcache.locking": "\\OC\\Memcache\\Redis",                                                                                                  
        "redis": {                                                                                                                                    
            "host": "***REMOVED SENSITIVE VALUE***",                                                                                                  
            "port": 6379,                                                                                                                             
            "timeout": 0,                                                                                                                             
            "read_timeout": 0,                                                                                                                        
            "password": "***REMOVED SENSITIVE VALUE***"                                                                                               
        },                                                                                                                                            
        "mail_smtpmode": "smtp",                                                                                                                      
        "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***",                                                                                         
        "mail_smtpsecure": "ssl",                                                                                                                     
        "maintenance": false,                                                                                                                         
        "theme": "",                                                                                                                                  
        "loglevel": 2                                                                                                                                 
    }                                                                                                                                                 
} 

Are you using an external user-backend, if yes which one: NO

Logs

Nextcloud log (data/nextcloud.log)

TypeError
OC\Group\Manager::getUserIdGroupIds(): Argument #1 ($uid) must be of type string, null given, called in /var/www/sera/data/www/mgamontreal.com/lib/private/Group/Manager.php on line 374
/var/www/sera/data/www/mgamontreal.com/lib/private/Group/Manager.php
line 374
OC\Group\Manager->getUserIdGroupIds(
  null
)
/var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Service/PermissionService.php
line 234
OC\Group\Manager->isInGroup(
  null,
  "Sales"
)
/var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Service/PermissionService.php
line 115
OCA\Deck\Service\PermissionService->userCan(
  [
    [
      "OCA\\Deck\\Db\\Acl",
      10
    ],
    [
      "OCA\\Deck\\Db\\Acl",
      11
    ]
  ],
  0,
  null
)
/var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Service/PermissionService.php
line 160
OCA\Deck\Service\PermissionService->getPermissions(
  9,
  null
)
/var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Activity/ActivityManager.php
line 571
OCA\Deck\Service\PermissionService->checkPermission(
  [
    "OCA\\Deck\\Db\\CardMapper"
  ],
  32,
  0
)
/var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Activity/DeckProvider.php
line 131
OCA\Deck\Activity\ActivityManager->canSeeCardActivity(
  32
)
/var/www/sera/data/www/mgamontreal.com/apps/activity/lib/MailQueueHandler.php
line 436
OCA\Deck\Activity\DeckProvider->parse(
  "en",
  [
    "OC\\Activity\\Event"
  ]
)
/var/www/sera/data/www/mgamontreal.com/apps/activity/lib/MailQueueHandler.php
line 333
OCA\Activity\MailQueueHandler->parseEvent(
  "en",
  [
    "OC\\Activity\\Event"
  ]
)
/var/www/sera/data/www/mgamontreal.com/apps/activity/lib/MailQueueHandler.php
line 130
OCA\Activity\MailQueueHandler->sendEmailToUser(
  "JustinH",
  "[email protected]",
  "en",
  "America/Toronto",
  1707212100
)
/var/www/sera/data/www/mgamontreal.com/apps/activity/lib/BackgroundJob/EmailNotification.php
line 60
OCA\Activity\MailQueueHandler->sendEmails(
  500,
  1707212100
)
/var/www/sera/data/www/mgamontreal.com/lib/private/BackgroundJob/Job.php
line 54
OCA\Activity\BackgroundJob\EmailNotification->run(
  null
)
/var/www/sera/data/www/mgamontreal.com/lib/private/BackgroundJob/TimedJob.php
line 60
OC\BackgroundJob\Job->execute(
  [
    "OC\\BackgroundJob\\JobList"
  ],
  [
    "OC\\Log"
  ]
)
/var/www/sera/data/www/mgamontreal.com/cron.php
line 152
OC\BackgroundJob\TimedJob->execute(
  [
    "OC\\BackgroundJob\\JobList"
  ],
  [
    "OC\\Log"
  ]
)
Raw log entry
{
  "reqId": "JY52USietemeCZecaiSk",
  "level": 3,
  "time": "2024-02-06T09:35:01+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "core",
  "method": "",
  "url": "--",
  "message": "Error while running background job (class: OCA\\Activity\\BackgroundJob\\EmailNotification, arguments: )",
  "userAgent": "--",
  "version": "28.0.2.5",
  "exception": {
    "Exception": "TypeError",
    "Message": "OC\\Group\\Manager::getUserIdGroupIds(): Argument #1 ($uid) must be of type string, null given, called in /var/www/sera/data/www/mgamontreal.com/lib/private/Group/Manager.php on line 374",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/sera/data/www/mgamontreal.com/lib/private/Group/Manager.php",
        "line": 374,
        "function": "getUserIdGroupIds",
        "class": "OC\\Group\\Manager",
        "type": "->",
        "args": [
          null
        ]
      },
      {
        "file": "/var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Service/PermissionService.php",
        "line": 234,
        "function": "isInGroup",
        "class": "OC\\Group\\Manager",
        "type": "->",
        "args": [
          null,
          "Sales"
        ]
      },
      {
        "file": "/var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Service/PermissionService.php",
        "line": 115,
        "function": "userCan",
        "class": "OCA\\Deck\\Service\\PermissionService",
        "type": "->",
        "args": [
          [
            [
              "OCA\\Deck\\Db\\Acl",
              10
            ],
            [
              "OCA\\Deck\\Db\\Acl",
              11
            ]
          ],
          0,
          null
        ]
      },
      {
        "file": "/var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Service/PermissionService.php",
        "line": 160,
        "function": "getPermissions",
        "class": "OCA\\Deck\\Service\\PermissionService",
        "type": "->",
        "args": [
          9,
          null
        ]
      },
      {
        "file": "/var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Activity/ActivityManager.php",
        "line": 571,
        "function": "checkPermission",
        "class": "OCA\\Deck\\Service\\PermissionService",
        "type": "->",
        "args": [
          [
            "OCA\\Deck\\Db\\CardMapper"
          ],
          32,
          0
        ]
      },
      {
        "file": "/var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Activity/DeckProvider.php",
        "line": 131,
        "function": "canSeeCardActivity",
        "class": "OCA\\Deck\\Activity\\ActivityManager",
        "type": "->",
        "args": [
          32
        ]
      },
      {
        "file": "/var/www/sera/data/www/mgamontreal.com/apps/activity/lib/MailQueueHandler.php",
        "line": 436,
        "function": "parse",
        "class": "OCA\\Deck\\Activity\\DeckProvider",
        "type": "->",
        "args": [
          "en",
          [
            "OC\\Activity\\Event"
          ]
        ]
      },
      {
        "file": "/var/www/sera/data/www/mgamontreal.com/apps/activity/lib/MailQueueHandler.php",
        "line": 333,
        "function": "parseEvent",
        "class": "OCA\\Activity\\MailQueueHandler",
        "type": "->",
        "args": [
          "en",
          [
            "OC\\Activity\\Event"
          ]
        ]
      },
      {
        "file": "/var/www/sera/data/www/mgamontreal.com/apps/activity/lib/MailQueueHandler.php",
        "line": 130,
        "function": "sendEmailToUser",
        "class": "OCA\\Activity\\MailQueueHandler",
        "type": "->",
        "args": [
          "JustinH",
          "[email protected]",
          "en",
          "America/Toronto",
          1707212100
        ]
      },
      {
        "file": "/var/www/sera/data/www/mgamontreal.com/apps/activity/lib/BackgroundJob/EmailNotification.php",
        "line": 60,
        "function": "sendEmails",
        "class": "OCA\\Activity\\MailQueueHandler",
        "type": "->",
        "args": [
          500,
          1707212100
        ]
      },
      {
        "file": "/var/www/sera/data/www/mgamontreal.com/lib/private/BackgroundJob/Job.php",
        "line": 54,
        "function": "run",
        "class": "OCA\\Activity\\BackgroundJob\\EmailNotification",
        "type": "->",
        "args": [
          null
        ]
      },
      {
        "file": "/var/www/sera/data/www/mgamontreal.com/lib/private/BackgroundJob/TimedJob.php",
        "line": 60,
        "function": "execute",
        "class": "OC\\BackgroundJob\\Job",
        "type": "->",
        "args": [
          [
            "OC\\BackgroundJob\\JobList"
          ],
          [
            "OC\\Log"
          ]
        ]
      },
      {
        "file": "/var/www/sera/data/www/mgamontreal.com/cron.php",
        "line": 152,
        "function": "execute",
        "class": "OC\\BackgroundJob\\TimedJob",
        "type": "->",
        "args": [
          [
            "OC\\BackgroundJob\\JobList"
          ],
          [
            "OC\\Log"
          ]
        ]
      }
    ],
    "File": "/var/www/sera/data/www/mgamontreal.com/lib/private/Group/Manager.php",
    "Line": 391,
    "message": "Error while running background job (class: OCA\\Activity\\BackgroundJob\\EmailNotification, arguments: )",
    "CustomMessage": "Error while running background job (class: OCA\\Activity\\BackgroundJob\\EmailNotification, arguments: )"
  },
  "id": "65c1fdece04f6"
}

Apps
Icon	Name	Version	Level	Actions
[Activity](https://mgamontreal.com/settings/apps/enabled/activity)	2.20.0	Featured

Disable
[Auditing / Logging](https://mgamontreal.com/settings/apps/enabled/admin_audit)	1.18.0	Featured

Disable
[Bookmarks](https://mgamontreal.com/settings/apps/enabled/bookmarks)	13.1.3	

Disable
[Brute-force settings](https://mgamontreal.com/settings/apps/enabled/bruteforcesettings)	2.8.0	Featured

Disable
[Calendar](https://mgamontreal.com/settings/apps/enabled/calendar)	4.6.4	Featured

Disable
[Circles](https://mgamontreal.com/settings/apps/enabled/circles)	28.0.0-dev	Featured

Disable
[Collaborative tags](https://mgamontreal.com/settings/apps/enabled/systemtags)	1.18.0	Featured

Disable
[Comments](https://mgamontreal.com/settings/apps/enabled/comments)	1.18.0	Featured

Disable
[Contacts](https://mgamontreal.com/settings/apps/enabled/contacts)	5.5.1	Featured

Disable
[Contacts Interaction](https://mgamontreal.com/settings/apps/enabled/contactsinteraction)	1.9.0	Featured

Disable
[Dashboard](https://mgamontreal.com/settings/apps/enabled/dashboard)	7.8.0	Featured

Disable
[Deck](https://mgamontreal.com/settings/apps/enabled/deck)	1.12.1	Featured

Disable
[Deleted files](https://mgamontreal.com/settings/apps/enabled/files_trashbin)	1.18.0	Featured

Disable
[Federation](https://mgamontreal.com/settings/apps/enabled/federation)	1.18.0	Featured

Disable
[File reminders](https://mgamontreal.com/settings/apps/enabled/files_reminders)	1.1.0	Featured

Disable
[File sharing](https://mgamontreal.com/settings/apps/enabled/files_sharing)	1.20.0	Featured

Disable
[Group folders](https://mgamontreal.com/settings/apps/enabled/groupfolders)	16.0.3	Featured

Disable
[Log Reader](https://mgamontreal.com/settings/apps/enabled/logreader)	2.13.0	Featured

Disable
[Monitoring](https://mgamontreal.com/settings/apps/enabled/serverinfo)	1.18.0	Featured

Disable
[Notes](https://mgamontreal.com/settings/apps/enabled/notes)	4.9.2	Featured

Disable
[Notifications](https://mgamontreal.com/settings/apps/enabled/notifications)	2.16.0	Featured

Disable
[Password policy](https://mgamontreal.com/settings/apps/enabled/password_policy)	1.18.0	Featured

Disable
[Passwords](https://mgamontreal.com/settings/apps/enabled/passwords)	2024.2.20	

Disable
[PDF viewer](https://mgamontreal.com/settings/apps/enabled/files_pdfviewer)	2.9.0	Featured

Disable
[Photos](https://mgamontreal.com/settings/apps/enabled/photos)	2.4.0	Featured

Disable
[Privacy](https://mgamontreal.com/settings/apps/enabled/privacy)	1.12.0	Featured

Disable
[Recommendations](https://mgamontreal.com/settings/apps/enabled/recommendations)	2.0.0	Featured

Disable
[Related Resources](https://mgamontreal.com/settings/apps/enabled/related_resources)	1.3.0	Featured

Disable
[Share by mail](https://mgamontreal.com/settings/apps/enabled/sharebymail)	1.18.0	Featured

Disable
[Suspicious Login](https://mgamontreal.com/settings/apps/enabled/suspicious_login)	6.0.0	Featured

Disable
[Talk](https://mgamontreal.com/settings/apps/enabled/spreed)	18.0.3	Featured

Disable
[Tasks](https://mgamontreal.com/settings/apps/enabled/tasks)	0.15.0	Featured

Disable
[Text](https://mgamontreal.com/settings/apps/enabled/text)	3.9.1	Featured

Disable
[User status](https://mgamontreal.com/settings/apps/enabled/user_status)	1.8.1	Featured

Disable
[Versions](https://mgamontreal.com/settings/apps/enabled/files_versions)	1.21.0	Featured

Disable
[Weather status](https://mgamontreal.com/settings/apps/enabled/weather_status)	1.8.0	Featured

Disable

caww avatar Feb 06 '24 10:02 caww

See #5536

kunago avatar Feb 06 '24 12:02 kunago

Thank you!!! but

Just run in mysql DELETE FROM oc_activity WHERE app='deck'; and no changes --- email notifications from deck still not working and still showing same issue in logs

TypeError OC\Group\Manager::getUserIdGroupIds(): Argument #1 ($uid) must be of type string, null given, called in /var/www/sera/data/www/mgamontreal.com/lib/private/Group/Manager.php on line 374 /var/www/sera/data/www/mgamontreal.com/lib/private/Group/Manager.php line 374 OC\Group\Manager->getUserIdGroupIds( null ) /var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Service/PermissionService.php line 234 OC\Group\Manager->isInGroup( null, "Sales" ) /var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Service/PermissionService.php line 115 OCA\Deck\Service\PermissionService->userCan( [ [ "OCA\\Deck\\Db\\Acl", 10 ], [ "OCA\\Deck\\Db\\Acl", 11 ] ], 0, null ) /var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Service/PermissionService.php line 160 OCA\Deck\Service\PermissionService->getPermissions( 9, null ) /var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Activity/ActivityManager.php line 571 OCA\Deck\Service\PermissionService->checkPermission( [ "OCA\\Deck\\Db\\CardMapper" ], 32, 0 ) /var/www/sera/data/www/mgamontreal.com/apps/deck/lib/Activity/DeckProvider.php line 131 OCA\Deck\Activity\ActivityManager->canSeeCardActivity( 32 ) /var/www/sera/data/www/mgamontreal.com/apps/activity/lib/MailQueueHandler.php line 436 OCA\Deck\Activity\DeckProvider->parse( "en", [ "OC\\Activity\\Event" ] ) /var/www/sera/data/www/mgamontreal.com/apps/activity/lib/MailQueueHandler.php line 333 OCA\Activity\MailQueueHandler->parseEvent( "en", [ "OC\\Activity\\Event" ] ) /var/www/sera/data/www/mgamontreal.com/apps/activity/lib/MailQueueHandler.php line 130 OCA\Activity\MailQueueHandler->sendEmailToUser( "JustinH", "", "en", "America/Toronto", 1707224400 ) /var/www/sera/data/www/mgamontreal.com/apps/activity/lib/BackgroundJob/EmailNotification.php line 60 OCA\Activity\MailQueueHandler->sendEmails( 500, 1707224400 ) /var/www/sera/data/www/mgamontreal.com/lib/private/BackgroundJob/Job.php line 54 OCA\Activity\BackgroundJob\EmailNotification->run( null ) /var/www/sera/data/www/mgamontreal.com/lib/private/BackgroundJob/TimedJob.php line 60 OC\BackgroundJob\Job->execute( [ "OC\\BackgroundJob\\JobList" ], [ "OC\\Log" ] ) /var/www/sera/data/www/mgamontreal.com/cron.php line 152 OC\BackgroundJob\TimedJob->execute( [ "OC\\BackgroundJob\\JobList" ], [ "OC\\Log" ] )

caww avatar Feb 06 '24 13:02 caww

Of course, because the issue is not in oc_activity but in oc_activity_mq. It does not matter whether any activity makes it to the table but whether some type of a sanitizer or parser properly passes it into a notification email. The issue is with the notifications that are to be sent via email, and their formatting apparently.

kunago avatar Feb 06 '24 13:02 kunago

Thank you for your help! Is it means I need to run like this? DELETE FROM oc_activity_mq WHERE app='deck';

caww avatar Feb 06 '24 13:02 caww

That is unlikely to do anything. The table is emptied automatically as soon as notification emails are sent.

kunago avatar Feb 06 '24 13:02 kunago

thanks you --- seems no solution yet?

caww avatar Feb 06 '24 13:02 caww

If anybody able to help us to fix this issue right now --- we ready to pay using paypal. Please contact with me here https://portal.goaskle.com/index.php?a=add&category=1

caww avatar Feb 06 '24 13:02 caww

Fixed in #5533

joshtrichards avatar Feb 19 '24 23:02 joshtrichards

@joshtrichards it seems that we still have the problem of no notifications (neither via mail nor push nor notification bar in the web client) for everything except assigning a card and mentioning in comments, see my comment in #5607

bentuna avatar Feb 20 '24 17:02 bentuna

confirm that still no email notifications in deck

caww avatar Feb 20 '24 18:02 caww

Any progress on this? Deck will be hardly usable without this feature.

MichaelPerlbach avatar Mar 12 '24 10:03 MichaelPerlbach

I did not get any solution and also still waiting for any recomendations. No email notifications

caww avatar Mar 12 '24 14:03 caww

I can confirm the same issue. And no push notifications too

wonka929 avatar Jun 25 '24 12:06 wonka929