Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Nummeric user id breaks updatenotifications #44051

Closed
6 of 8 tasks
d-jsb opened this issue Mar 7, 2024 · 0 comments · Fixed by #44095
Closed
6 of 8 tasks

[Bug]: Nummeric user id breaks updatenotifications #44051

d-jsb opened this issue Mar 7, 2024 · 0 comments · Fixed by #44095
Assignees
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 27-feedback bug

Comments

@d-jsb
Copy link

d-jsb commented Mar 7, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

Having nummeric user ids I often see this log message or get a mail from cron (see below):
TypeError: OC\Notification\Notification::setUser(): Argument #1 ($user) must be of type string, int given, called in /www/xxx/apps/updatenotification/lib/Notification/BackgroundJob.php on line 184

from cron (before server upgrade):
TypeError: OC\Notification\Notification::setUser(): Argument #1 ($user) must be of type string, int given, called in /www/apps/updatenotification/lib/Notification/BackgroundJob.php on line 184 and defined in /www/lib/private/Notification/Notification.php:153
Stack trace:
#0 /www/apps/updatenotification/lib/Notification/BackgroundJob.php(184): OC\Notification\Notification->setUser(1)
#1 /www/apps/updatenotification/lib/Notification/BackgroundJob.php(96): OCA\UpdateNotification\Notification\BackgroundJob->createNotifications('core', '26.0.12.2', 'Nextcloud 26.0....')
#2 /www/apps/updatenotification/lib/Notification/BackgroundJob.php(70): OCA\UpdateNotification\Notification\BackgroundJob->checkCoreUpdate()
#3 /www/lib/public/BackgroundJob/Job.php(78): OCA\UpdateNotification\Notification\BackgroundJob->run(NULL)
#4 /www/lib/public/BackgroundJob/TimedJob.php(103): OCP\BackgroundJob\Job->start(Object(OC\BackgroundJob\JobList))
#5 /www/lib/public/BackgroundJob/TimedJob.php(93): OCP\BackgroundJob\TimedJob->start(Object(OC\BackgroundJob\JobList))
#6 /www/cron.php(177): OCP\BackgroundJob\TimedJob->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
#7 {main}

Server upgraded to v27.1.7, does not fix the problem. The issue seems to be around for quite a while.
I guess a typecast could fix this?

Steps to reproduce

  1. Wait for cron job
  2. check mail or log

Expected behavior

Update notification should work also with nummeric user ids

Installation method

None

Nextcloud Server version

27

Operating system

None

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MySQL

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

None

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

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@d-jsb d-jsb added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Mar 7, 2024
@joshtrichards joshtrichards self-assigned this Mar 8, 2024
joshtrichards added a commit that referenced this issue Mar 8, 2024
joshtrichards added a commit that referenced this issue Mar 8, 2024
manual backport of #44093 to fix #44051 for <=v28

Signed-off-by: Josh <[email protected]>
@susnux susnux linked a pull request Mar 8, 2024 that will close this issue
4 tasks
backportbot bot pushed a commit that referenced this issue Mar 8, 2024
manual backport of #44093 to fix #44051 for <=v28

Signed-off-by: Josh <[email protected]>
backportbot bot pushed a commit that referenced this issue Mar 8, 2024
manual backport of #44093 to fix #44051 for <=v28

Signed-off-by: Josh <[email protected]>
joshtrichards added a commit that referenced this issue Mar 10, 2024
manual backport of #44093 to fix #44051 for <=v28

Signed-off-by: Josh <[email protected]>
joshtrichards added a commit that referenced this issue Mar 12, 2024
manual backport of #44093 to fix #44051 for <=v28

Signed-off-by: Josh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 27-feedback bug
Projects
None yet
4 participants