email notifications NOT working
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 43
Description
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:
- Go to Deck and create any card and change it
- 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",
"justin@mgagroupcanada.com",
"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",
"justin@mgagroupcanada.com",
"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
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
Start with apps/deck/lib/Activity/DeckProvider.php and apps/deck/lib/Service/PermissionService.php, following the null user ID in the reported stack trace from apps/activity/lib/MailQueueHandler.php. Reproduce an ASAP email notification and inspect the Nextcloud log. Done means the TypeError no longer occurs and the expected notification email is delivered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100