K9 6.0 randomly stops background sync

I’m a long time K9 user, but recently I have the issue that mails do not arrive. Only when I open K9 it seems to synchronize. I haven’t changed settings. K9 is still excluded from power saving and set to “always” for synchronization. I know this was an issue for many in the past, but it was always working for me.
I’ve 5 mail accounts: 3 IMAP push, 1 IMAP check every 24h and 1 IMAP manual check.
(Pixel 3, Android 12, K9 6.000)

Hi, can you check if your background data usage is restricted for K9?

Thanks for the hint, I’ve checked now but background data usage is/was allowed.

Any other ideas? In the meantime I upgraded to 6.2, but no change in behavior. It seems to take some time to happen, typically it’s working fine for some hours, but on the next day no mails arrive until I open the app.

I think I am seeing the same thing. I have to manually pull to refresh to get new mail (even opening the app doesn’t sync).
I have a Gmail and an Outlook account, and have just changed them to OAuth2 authentication. Sync worked fine previously (K9 6.200, Android 11)

K9 6.200, Android 11 (custom rom) with 2 Gmail + 2 Yahoo accounts, all with IMAP Push and addtionally 1 of them Pulls every half an hour, and sync is working fine here. I also changed to OAuth just recently when it was implemented, so I can’t imagine that’s the reason for your issues :woman_shrugging:

I have shown again the “waiting for mail” notification which was hidden before. This notification also vanishes when the issue occurs. (not sure if this is important)

That sounds like your rom is killing the bits that are needed for K-9 to listen for email Push. Make sure you have K-9 excluded from battery optimization and allow unrestricted background use of data. Both can be found under your rom Settings - Apps - All Apps - find K-9 and check battery and data categories.
Something is killing the background process, the problem is going to be finding the culprit :woman_shrugging:

Hi Nimueh - it’s excluded from battery optimization and background data are allowed. I haven’t changed these settings in years. I also have no battery optimization app, but maybe some other app is causing issues? (but I’ve nothing special here)

Which mail servive provider(s)? Might be an issue from their side, although it seems to be unprobable if it is different prividers.

What else? Maybe post a debug log where something could be seen. But make sure to check sensible data first.

Hi stphn - I have three mail addresses from my German hoster (1und1), they’re one of the biggest in Germany and were quite reliable in the past. Those are on push. Then I’ve a gmail address I’ve switched now to oauth2 with no push, but a daily pull.
I’ve activated the debug log now.

It happened again, roughly 24h after the last manual pull. I exported the logs, but they contain only entries from after opening K9 again. As the 24h re-occurence seems like it could be related to the 24h pull interval for my gmail address.
Let me disable the gmail sync and see what happens.

1 Like

It does not seem to be connected to the gmail sync, it happens also without. Is there a trick to get the logs? After starting K9 again, I only get “fresh” logs. But if the whole app is closed, most likely they are not of value anyway.

Sorry for pushing, but has anyone an idea how to figure out why k9 is killed?