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

Never ending desktop notifications for new emails #9132

Closed
ChristophWurst opened this issue Dec 4, 2023 · 13 comments · Fixed by #9157
Closed

Never ending desktop notifications for new emails #9132

ChristophWurst opened this issue Dec 4, 2023 · 13 comments · Fixed by #9157

Comments

@ChristophWurst
Copy link
Member

Steps to reproduce

  1. Set up an account
  2. Leave the tab alone
  3. 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

@ChristophWurst
Copy link
Member Author

This could be caused by #8231.

@hamza221 could you try to reproduce?

@ChristophWurst
Copy link
Member Author

image

the message is constantly reported as new

@ChristophWurst
Copy link
Member Author

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

@ChristophWurst
Copy link
Member Author

Happens on my prod instance too now using Mail v3.5.0-rc.3

@ChristophWurst
Copy link
Member Author

Request Response
Bildschirmfoto vom 2023-12-11 08-45-31 Bildschirmfoto vom 2023-12-11 08-45-45

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:

image

Which tells us that the messages are removed on thefrontend. With the next background sync, they are brought back. Then deleted, synced again, deleted …

@ChristophWurst
Copy link
Member Author

Setting priority back to high because this is quite annoying to get the notification every 30s. It makes me close the Mail tab.

@ChristophWurst
Copy link
Member Author

It only happens with more than one account

@ChristophWurst ChristophWurst self-assigned this Dec 11, 2023
@ChristophWurst ChristophWurst moved this from 📄 To do (~10 entries) to 🏗️ In progress in 💌 📅 👥 Groupware team Dec 11, 2023
@hamza221
Copy link
Contributor

I can reproduce with one account

@hamza221
Copy link
Contributor

Only one account set
https://github.com/nextcloud/mail/assets/40746210/ed33e2e7-68be-42d6-a637-889020d8932e

@ChristophWurst
Copy link
Member Author

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.

@ChristophWurst
Copy link
Member Author

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.

@SafetyIng
Copy link

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.
image
All "new" messages are already read multiple days ago.

@ChristophWurst ChristophWurst removed this from the v3.5.0 milestone Aug 26, 2024
@ChristophWurst ChristophWurst moved this from ☑️ Done to 📄 To do in 💌 📅 👥 Groupware team Aug 26, 2024
@ChristophWurst
Copy link
Member Author

This should be fixed by #10176.

Thank you for your report @SafetyIng

@github-project-automation github-project-automation bot moved this from 📄 To do to ☑️ Done in 💌 📅 👥 Groupware team Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ☑️ Done
Development

Successfully merging a pull request may close this issue.

3 participants