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

Push notifications stopped to work after 60 days #2157

Open
WeberSamuel opened this issue Jan 22, 2025 · 1 comment
Open

Push notifications stopped to work after 60 days #2157

WeberSamuel opened this issue Jan 22, 2025 · 1 comment

Comments

@WeberSamuel
Copy link

WeberSamuel commented Jan 22, 2025

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

The push notifications of some users stopped to work.
After investigating this issue, I found that the notification app is checking if oc_authtoken.last_check is older than 60 days to detect if a device is still fresh and should receive a notification.
However, this optimization nextcloud/server#44670 caused that users without password fields set, do not get their oc_authtoken.last_check field updated.
I guess authtokens without passwords are created by users login in via social login (oauth custom provider in my case) only.

As a workaround I set oc_authtoken.last_check to oc_authtoken.last_activity in the database and the notifications are working again.

Steps to reproduce

  1. Install Social Login (I guess) & Talk
  2. Login users via OAuth Provider in Talk App
  3. Wait 60 days 😉 (or check in the database for users with oc_authtoken.password = NULL that oc_authtoken.last_check is never updated)

Expected behaviour

Push Notifications should work as long as the user is logged in and the talk app has contact with the server (last_activity of device is current).

Actual behaviour

Push Notifications stop to work if the user does not logout & login for 60 days.

Server configuration

Web server: Nginx

Database: MySQL

PHP version: 8.2

Nextcloud version: 30.0.5

List of activated apps ``` - activity: 3.0.0 - admin_audit: 1.20.0 - app_api: 4.0.5 - calendar: 5.0.9 - circles: 30.0.0 - cloud_federation_api: 1.13.0 - collectives: 2.15.2 - comments: 1.20.1 - contacts: 6.1.3 - contactsinteraction: 1.11.0 - dav: 1.31.1 - deck: 1.14.3 - federatedfilesharing: 1.20.0 - federation: 1.20.0 - files: 2.2.0 - files_downloadlimit: 3.0.0 - files_external: 1.22.0 - files_pdfviewer: 3.0.0 - files_reminders: 1.3.0 - files_sharing: 1.22.0 - files_trashbin: 1.20.1 - files_versions: 1.23.0 - firstrunwizard: 3.0.0 - forms: 4.3.5 - group_everyone: 0.1.16 - groupfolders: 18.0.8 - logreader: 3.0.0 - lookup_server_connector: 1.18.0 - nextcloud_announcements: 2.0.0 - notifications: 3.0.0 - oauth2: 1.18.1 - ocs_api_viewer: 1.0.9 - password_policy: 2.0.0 - photos: 3.0.2 - polls: 7.2.9 - privacy: 2.0.0 - provisioning_api: 1.20.0 - recommendations: 3.0.0 - related_resources: 1.5.0 - richdocuments: 8.5.3 - serverinfo: 2.0.0 - settings: 1.13.0 - sharebymail: 1.20.0 - sociallogin: 5.7.0 - spreed: 20.1.3 - support: 2.0.0 - survey_client: 2.0.0 - systemtags: 1.20.0 - text: 4.1.0 - theming: 2.5.0 - theming_customcss: 1.18.0 - twofactor_backupcodes: 1.19.0 - updatenotification: 1.20.0 - user_status: 1.10.0 - viewer: 3.0.0 - weather_status: 1.10.0 - webhook_listeners: 1.1.0-dev - webhooks: 0.4.3 - workflowengine: 2.12.0 ```

Skipped other details, since not necessary.

@WeberSamuel WeberSamuel changed the title Push notifications stopped to work after 60 Push notifications stopped to work after 60 days Jan 22, 2025
@nickvergessen
Copy link
Member

I don't know why we use:

Don't push to devices that didn't authenticate with in the last 60 days

instead of:

Don't push to devices that were not active with in the last 60 days

  • I will check with some colleagues, but it's been a long time and it being mentioned explicitly in the description of Ignore old push devices #656 makes me nervous to flip it to last activity right away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants