thunderbird / thunderbird-android

Thunderbird for Android – Open Source Email App for Android (fka K-9 Mail)
https://thunderbird.net/mobile
Apache License 2.0
10.98k stars 2.51k forks source link

IMAP IDLE push stops working when device switches networks #8574

Open J0nnyMak0 opened 6 hours ago

J0nnyMak0 commented 6 hours ago

Checklist

App

Thunderbird for Android

App version

8.0b5

Where did you get the app from?

Google Play

Android version

15

Device model

Pixel 6a

Steps to reproduce

  1. Reboot device for a fresh start
  2. Make sure both Wifi and Mobile data are active
  3. Make sure "Waiting for new emails" notification is active
  4. Make sure IMAP IDLE push is working by sending yourself a "test" message
  5. You should receive an instant notification
  6. Turn off Wifi and send yourself another "test" message (from a different device)*
  7. Notification does not appear and email is not in the message index
  8. Turn Wifi back on and send yourself another "test" message.
  9. Still no notification.
  10. Open Thunderbird and pull down to refresh
  11. Emails appear
  12. Send yourself yet another "test" message
  13. Still no email
  14. Go to "App info" for Thunderbird and "Force stop" the app
  15. Reopen Thunderbird
  16. Now send one last "test" message
  17. Now the message appears

Other info: Changing the interval for "Refresh IMAP IDLE connection" does not change this wrong behavior

Expected behavior

IMAP IDLE should remain active and email notifications should be delivered instantly

Actual behavior

Receiving email and notifications stop when device switches networks

Logs

Log attached.

thunderbird_logs.txt

cketti commented 6 hours ago

The log doesn't show any obvious errors. IMAP connections seem to be re-established and the IDLE command is issued.

The app downloaded a bunch of messages, but didn't generate notifications because the messages have been marked as read on the server (see K9NotificationStrategy: No notification: Message is marked as read lines in the log). This is intended behavior.

J0nnyMak0 commented 4 hours ago

That is odd, because when I refresh by pulling down, I do see new unread messages appear. Is there any more info I can generate that may be useful?

cketti commented 4 hours ago

There's a lot of traffic in the log. It's hard to tell if everything is working like it should or not. Maybe disable periodic sync and push for all accounts but one. Then perform the steps to reproduce and write down the current time for each step. For the new messages use numbered subject lines. That should make it easier to correlate the information in the log. When sending the messages make sure you don't have another client running that will mark them as read.