Never ending desktop notifications for new emails
Steps to reproduce
- Set up an account
- Leave the tab alone
- Receive a new email
Expected behavior
I get a desktop notification once
Actual behavior
I get a desktop notification about the very same message every 30 seconds.
Mail app version
3.5.0 RC3
Mailserver or service
No response
Operating system
No response
PHP engine version
None
Web server
None
Database
None
Additional info
No response
This could be caused by https://github.com/nextcloud/mail/pull/8231.
@hamza221 could you try to reproduce?
the message is constantly reported as new
The thread has two latest messages because they were sent at the exact same unix timestamp. This seems to make the sorting toggle between one or the other message constantly, therefore creating desktop notifications.
We can lower the priority of this fix
Happens on my prod instance too now using Mail v3.5.0-rc.3
| Request | Response |
|---|---|
It is the request that syncs my INBOX in the background, not the sync of the priority inbox that is shown.
On the console I see some related errors:
Which tells us that the messages are removed on thefrontend. With the next background sync, they are brought back. Then deleted, synced again, deleted …
Setting priority back to high because this is quite annoying to get the notification every 30s. It makes me close the Mail tab.
It only happens with more than one account
I can reproduce with one account
Only one account set https://github.com/nextcloud/mail/assets/40746210/ed33e2e7-68be-42d6-a637-889020d8932e
The issue I'm hunting shows that \OCA\Mail\Service\Sync\SyncService::getDatabaseSyncChanges is called with message ids that belong to another mailbox.
I'm trying to track it down. It's an issue somewhere in the frontend. https://github.com/nextcloud/mail/blame/19b07d65e814c98107bfee11c18eeda300995c01/src/store/mutations.js#L287 is definitely suspicious. With two accounts, addEnvelopes is called three times. Account 1's inbox, account 2's inbox and then the unified inbox. But the combined envelope lists have the first or second account's inbox mailbox_id set on the first envelope. This wrongly adds all envelopes there.
This actually makes perfect sense. Envelopes were added two two mailboxes. At sync, one mailbox was fine, for there other there were some alien entries that are removed. At the next sync they return where they belong and the foreign mailbox. Then the process goes in an endless cycle.
Unfortunately, I have to inform you that this error has recently occurred for me on NC 29.0.5 and Mail 3.7.7.
Every 20-30 seconds one notification. It's really annoying.
All "new" messages are already read multiple days ago.
This should be fixed by https://github.com/nextcloud/mail/pull/10176.
Thank you for your report @SafetyIng