nextcloud / nextcloud/notifications

Browser webpush tokens is misbehaving heavily

Open
#3,318 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug feature: push 📲 performance regression
Dominant language
JavaScript
Stars
153
Forks
67
Avg merge
15h 3m
Merged PRs (30d)
96

Description

  1. They should expire somehow (maybe keep a timestamp of the activation request?) currently we always push to all entries that registered ever
  2. Many users on our instance have many entries with the same endpoint+auth+activated=1 but different activation_token
    Is this a bug and they should actually replace each other? cc @p1gp1g
  3. Session ID is treated as integer by math in
    https://github.com/nextcloud/notifications/blob/562a51dfe7eeefab812c8b130ac02e42c6fd2892/lib/Controller/WebPushController.php#L369
    but it's actually a string. Basically every user on our instance has an entry with -1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/Controller/WebPushController.php, especially around line 369, and trace how webpush registrations are stored and selected for delivery. Check how activation timestamps, duplicate endpoint/auth entries, activation tokens, and session IDs are represented. Done means expired registrations are excluded, duplicate active entries behave consistently, and session IDs are handled as strings without producing -1.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.