K-9: Synchronisation disabled - Android 6.0.1

Created on 21 Dec 2015  ·  85Comments  ·  Source: k9mail/k-9

Using two devices with Android 6.0.1 (N5 and N7 (2013)) I'm experiencing the synchronisation getting disabled in (random?) intervalls.
It seems I can get it enabled again by switching WIFI Off and on again.

bug

Most helpful comment

I have a Galaxy S8, running Android 7.0. Here are the steps I took to solve the K9 app syncing problem:

K9 > Settings > Global Settings > Network > Background sync: change it to "When 'Auto-sync' is checked". It might work with Background sync set to "Always", but I haven't tried it.

Android Setting > Device Maintenance > Battery, K9 did not appear in the App power monitor section. If you see K9 here, make sure it is not checked.

Android Setting > Device Maintenance > Battery > Unmonitored apps (at very bottom of Battery screen) add K9 to "Unmonitored apps"

Android Setting > Device Maintenance > Battery > Battery Usage (right below "Estimated battery life" at top of screen). Then click on 3 vertical dots at top right and select "optimize battery usage". Select "All apps" and turn off optimization for K9.

All 85 comments

sounds like it might be related to the android doze mechanism, see #857

That might be. However, I did not experience this with 6.0, but only with 6.0.1.

I have a similar problem where the next poll is showing as being 1 hour ago.

I experience no such issues of K-9 under Cataclysm, Android 6.0.1.

I'm having the same problem here, Nexus 5X on Android 6.0.1 with K-9 Mail 5.007. Account set for Push.

I've set "Background sync" on "Always" now, (was: "When 'Auto-sync' is checked"), as that is suggested in the FAQ. But time will tell if that's gonna work..

Background Sync "Always" is set in my N7, but doesn't seem to make a difference.

Hmm, indeed, that didn't make any difference :sob:

Please record a debug log while this happens.

K-9 Mail 5.007 on Nexus 7 with Android 6.0.1
since the last update syncing keeps disabling itself. I trolled all the settings and tweaked here and there but nothing helps when I look again syncing is disabled. it also does not matter if we set the background sync to Always or when auto sync is enabled. the tablet does not have an auto sync global setting. my LG G3 phone has a global sync button though.running Android 5.0 and seems to work fine. so problem is probably Android 6.0.1?

Hello, this is a debug log. Actually, I enabled logging while my N7 was in the state of disabled synchronization. I synced once or twice manually and then switched Wifi off and on again. This enabled the synchronization again. I left logging on and this afternoon I realized that synchronization got disabled again somewhen. Unfortunately, I don't know the exact time. Again I manually synced once or twice and switched Wifi off and on again. Once more, synchronization got enabled afterwards.

Hope this helps debugging the issue.

k9-log.txt
k9-log_1.txt

Just realized, that logging seems to hold just a very limited time. Unfortunately, the issue is not willingly reproducible. Nevertheless I hope there is some valuable information in there.
Is it possible to get a longer timeframe logged?

FWIW: It _is_ doze that is causing this issue.
The current workaround is to whitelist k9 from doze.

System Settings --> Apps
Hit the "gear" button up beside the menu button, brings you to "configure apps".
Hit "Battery Optimization", choose "all apps" from the spinner, click k9mail, and select "Don't Optimize". That will prevent doze from knocking it out.

Thank you, workaround seems to be working.
Luckily for now it does not seem as if k-9 is using much more battery
without optimization.

On Wed, Dec 30, 2015 at 5:16 PM, lbdroid [email protected] wrote:

FWIW: It _is_ doze that is causing this issue.
The current workaround is to whitelist k9 from doze.

System Settings --> Apps
Hit the "gear" button up beside the menu button, brings you to "configure
apps".
Hit "Battery Optimization", choose "all apps" from the spinner, click
k9mail, and select "Don't Optimize". That will prevent doze from knocking
it out.


Reply to this email directly or view it on GitHub
https://github.com/k9mail/k-9/issues/970#issuecomment-168017656.

This workaround seems to be working for me as well. Leaving the issue open though, since there might be a better solution in future. Not sure about the effect on battery usage right now.

Well, don't know for sure about that "not using much more battery" on my Nexus 5X with K-9 Mail whitelisted:

screenshot_20160103-174028

OK, granted, this isn't with much extensive usage (just the occasional WhatsApp/browsing/e-mail), but I thínk K-9 Mail's unoptimized Push mail has quite the impact.

@osirisinferi For what its worth, the power consumed by k9mail can be dramatically impacted by a lot of factors, number of accounts, number of directories being synchronized, configuration of the IMAP server, etc. In the end though, it won't be drawing any more power with this workaround than it did prior to the introduction of doze.

Running Android 6.0.1 on Nexus 6.
Have two Google accounts that are accessed through GMail.

K-9 is used to access two unrelated IMAP accounts.

One of the above Google accounts is not really used on the phone. However, if I completely disable its sync then I notice this K-9 thinks that AutoSync is off system wide even though one if the Google accounts is full sync enabled.

Once I re-enable at least App Data sync on that disabled account K-9 detects that AutoSync is on again with the next sync 3 hours ago.

Just as an added data point, I see this happening on my Nexus 7 (2013), but not on my Nexus 9. Both are running 6.0.1. As far as I can tell, K-9 has not been added to the whitelist on the N9 or anything like that.

It _definitely_ happens on N9 (we have two N9's). Yours is probably not getting all the way to sleep. Possibly something is holding a wakelock.

My mistake. Putting the N7 and N9 next to each other and leaving them both alone for the same amount of time did show that behavior on the N9.

I'll have to do further testing to see if there's something keeping the N9 out of Doze or if it's actually restarting the syncing on its own somehow. Just odd that this would be the first time I've noticed the problem on the N9.

Just bumping the things around can keep them out of doze. I'm not actually sure if the 7 has a low power motion sensor that it can be used for this purpose, so it could have a greater tendency to go into doze, whereas the 9 will reset its timers by being moved slightly.

Having the same problem with a HTC One M9 since having upgraded to Android 6.0 (the latest version available from HTC). Before updating to Android 6.0, on 5.xx everything was o.k.
As suggested, I tried to disable all 'power saving' functions, no luck...

Please record a new debug log if this is still happening with whitelisting configured @Rhenania

Here‘s the requested bug report with all power saving options disabled.

Rgds

From: Philip [mailto:[email protected]]
Sent: Freitag, 15. April 2016 12:07
To: k9mail/k-9 [email protected]
Cc: Rhenania [email protected]
Subject: Re: [k9mail/k-9] Synchronisation disabled - Android 6.0.1 (#970)

Please record a new debug log if this is still happening with whitelisting disabled @Rhenania https://github.com/Rhenania


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub https://github.com/k9mail/k-9/issues/970#issuecomment-210399272 https://github.com/notifications/beacon/ARn8KRAf2DBZ9r_iJnY7YFyPHvYS2--Lks5p32NAgaJpZM4G5UKJ.gif

Debug log as referenced above

debugLog.txt

Why is this bug still labeled as "needs info"? This is a matter of doze kicking in. No info is needed -- the cause is well established.

There's a bug for Doze - #857. I believe this bug was for issues despite disabling Doze. We still need to get to the bottom of those.

In my case, K9's periodical sync works but push doesn't work in Doze on Sony xperia z5 with 6.0 Marshmallow. K9 is whitelisted and notification is set as "High priority" (←GCM setting?).

Though it's Doze caused problem, can next update of K9 solve this???
So far I put "Android system" app into whitelist aside K9, then the push seems working fine.
But im not sure if it's just temporal behavior....anyone has tried same way?

About the same symptoms I also observe on my HTC M9. Was waiting for either an Android update or a K9 fix. Being fed up with waiting, now also considering installing an alternative ROM.

From: takaox [mailto:[email protected]]
Sent: Tuesday, June 07, 2016 3:22 AM
To: k9mail/k-9 [email protected]
Cc: Rhenania [email protected]; Mention [email protected]
Subject: Re: [k9mail/k-9] Synchronisation disabled - Android 6.0.1 (#970)

In my case, K9's periodical sync works but push doesn't work in Doze on Sony xperia z5 with 6.0 Marshmallow. K9 is whitelisted and notification is set as "High priority" (←GCM setting?).

Though it's Doze caused problem, can next update of K9 solve this???
So far I put "Android system" app into whitelist, then the push seems working fine.
But im not sure if it's just temporal behavior....


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/k9mail/k-9/issues/970#issuecomment-224135977 , or mute the thread https://github.com/notifications/unsubscribe/ARn8KQNs14oJUWVIU0tphSiWjUSCeP0Iks5qJMe5gaJpZM4G5UKJ . https://github.com/notifications/beacon/ARn8KUzqUBhv0h0QCH_iIbM0MEIaSxonks5qJMe5gaJpZM4G5UKJ.gif

As Rhenania said above, yes, we are waiting for "either an Android update or a K9 fix".
Hope both are aware of this to make out a fix. Whether push works or not, it's very fatal issue for some users.

I just want to add that I have the same problem with latest OmniROM and had it with CM13. Sometimes push is working, and sometimes not. And I get notifications about new e-mails on my Pebble (with Gadetbridge) but not on my phone. I need manually open K-9 Mail and tap on synchronice and then I got a notification that I got a new message.

On my Nexus 5x (rooted and running 6.0.1), the solution/workaround @lbdroid posted has worked fine since I used it a few months ago.

All what I have done didn't work, even the way @lbdroid mentioned...
Or if I would root my phone, will there be more options to do?
So far I set K9 poll frequency as every minute.

Is all info needed available? I still get the issue - disabling K-9 in app optimising doesn't help. Nor changing sync to "always". It seems log gets truncated - not sure if there's enough infor here:
k9-log.txt

Please let me know if additional info is required, I gladly try to help out.
I don't want to be forced to abandon this app ;-(

I realise that if "Power saving mode" is completely disabled syncing works.

Recently my Xperia Z5 Compact had updated to [Android 6.01 - 32.2.A.0.224].
The doze mode seems to have gone and Sony's Stamina mode is back now.

But point is that no matter whether I use Stamina mode, K9's push got recovered to
properly work now as it has been on old Android versions except for [6.0].
(Of course, if you use Stamina mode on, then K9 still needs to be whitelisted)

Now it's proved that after all the problem was obviously being caused by Doze,
Doze's [Optimize] even didn't work, it almost has killed core functions.

Not sure how other users with similar phones would be now....?
Hope this update helped many like us and Android will never have strange updates again.

I believe I have this problem; let me know if a log would be useful.

Samsung Note 4, 6.0.1; global sync enabled. On wifi.

k-9 beta 5.109

IMAP account; polling disabled for all folders. push enabled ("1st class") for one folder (not INBOX).

Background sync when Auto-sync.

After a few hours, k-9 reports "syncing disabled". In settings, that folder is still set to push: 1st class. Changing push to none, then back to 1st class, seems to temporarily sort the issue, for a few hours, then back to "syncing disabled".

I don't think this is Doze, since:

  • I have it disabled entirely: Settings - Battery - app power saving - OFF. Assuming that is what Samsung call Doze? Both other power saving modes (regular, and Ultra) are disabled)
  • Doze is supposed to kick in after 3 days, minimum, not just a few hours.

I have identical k-9 version, and settings, on a Note 3 running CM, Android 5.1.1, with the same server, and this "syncing disabled" never happens.

are my symptoms in line with this bug, now that Doze is being treated separately?

please let me know if it more data would be helpful, or a log (some have said that the log is truncated and it doesn't happen for several hours).

thanks much.

I have a Samsung Galaxy Note 4 and I have two POP3 accounts. I have Android V6.0.1 and the phone is up to date. After my phone's last software update, K-9 mail has been so erratic. Sometimes it works fine and the next thing I know syncing is disabled. ...or it will tell me the next sync is some hour or more in the past. I did find that when I turned on WiFi and then turned it off again, syncing was disabled. Now that I know shutting WiFi off causes K-9 to stop syncing, I can immediately check it to get it started again. However, I don't know why it decides to stop syncing otherwise. I went into my settings and made sure that K-9 was not set to doze to save battery life. That has not helped. What's more, sometimes it's a crap-shoot whether I can get it to start syncing again. Frankly, I'm frustrated. I need my email notifications. I have a business and I need to know when my clients have sent mail. This needs to get fixed.

Also having same problem. Syncing disabled shows up if I set Global settings -> Network -> Background sync -> Always. When I set the option to 'When auto-sync is checked' everything worked fine again.
Samsung Galaxy S5, official 6.0 ROM, battery optimization was enabled (default system settings, didn't touch that), K9 5.010

S7 Edge here and K9 is pretty much incapable of notifying me of new mail. It's configured for IMAP push and is working fine on my old S3 Neo. Setting it to poll doesn't help.

I've tried whitelisting it in the battery app but no go. S7 Edge is on Android 6.0.1.

:(

same Problem on Nexus 5X Android 7.0

any solution ??

I have found that white listing the app solved the problem. You have to white list it in the correct place though. There's 'Doze white listing' which is easy to find but the offender in this case is 'Battery Optimisation' since Doze doesn't kick until several days of inactivity.

http://www.tech-recipes.com/rx/58206/set-battery-optimization-samsung-galaxy-s7/

While you're there consider white listing GMail, Calendar and Contacts sync since they were suffering as well.

i have "white listed" k9mail now,
thank you for your answer,
will report if this helps

found that "tasker" app was whitlisted automaticaly
maybe k9mail can do this also?

Using IMAP settings for email (yahoo in my case) k-9 working perfect on android 6.0, the same with pop3 settings are not syncing when phone is in standby, otherwise is work fine

I'm still having occasional issues. Sometimes the idle IMAP connection is being allowed to terminate. Just now I ended up with the draft monitoring still active but my INBOX terminated. I've adjusted the K-9 keep-alive to 12 minutes to see if that helps but obviously that's going to increase battery usage :-/

Same here on Nexus 5x with Android 7.0.

Mine has been a lot better since installing Disable Doze.

Curiously the two apps I use to turn things on and off on a schedule sometimes fail to turn wifi on but otherwise my phone is now scheduling events like it should. Battery life isn't much affected either.

It's strange, because synchronisation works randomly, and I can't figure out what causing it starts to work again (for some time of course).

I've been looking at causes of sync failures recently. I may have some changes to go in for the future surrounding better handling of network disconnection.

I've been playing around with my device sending it in and out of aeroplane mode and onto a captive portal (which K-9 is not a fan of because it thinks it has a network connection but it doesn't in practice).

Also there's a permanent sync disabling function which prevents sync until the app is actually killed. It was added because of some bad behaviour where we didn't reflect an error case. But I'm no longer convinced that case is justified and if it is we could do better.

I don't want to delay the current stuff though (it's been a large 'merge window'), so I'll work on it and get it ready for a future release after the current (large) release is done.

syncthing is having similar problems: https://github.com/syncthing/syncthing-android/issues/543

I have K-9 whitelisted; before that it was not reliable. For me, the syncthing happens after doze and from the debug logs syncthing thinks it doesn't have working WiFi. Turning WiFi off/on causes it to get a WiFi OK notification and then things work. So my theory is that in coming out of doze (probably, or maybe just some othertimes) somehow a notification to the apps about WiFi is wrong/missed.

I put the idle timeout back to the default BTW. 12 minutes didn't help any.

_somehow a notification to the apps about WiFi is wrong/missed._

Interestingly it _seems_ that mine might be as well. It seems to relate to the switch over from data to wifi when I get home. I'm not compeltely sure but I don't think I've ever had the phone lose a connection at work. It seems to always be the evening when I'm at home. And as noted several times it's only dropped one connection, the other continues just fine.

For what it's worth my scheduling app does the following:
2300 - turn off wifi and syncing.
0700 - turn on syncing.
1715 (roughly when I get home) turn on wifi.

I am having the same issue with Samsung Galaxy Note 4. I have power saver on, but whitelisted (turned off) K-9 Mail. But after some time, the sync shows disabled. I have sync always set in global settings. When I turn off power saving it works. Sync interval is every minute.

Same problem with my Samsung Galaxy Tab S2 (Android 6.0.1) and Wileyfox Swift with Lineageos 14.1: sync is disabled and IMAP push doesn't work any longer. In Lineageos 14.1 I can't find any power saving options described as workaround above...

Did you try installing Disable Doze as per my link above?

This seemed to be the cure for me. At least until the next major release of Android where apparently the Doze functionality is even more aggressive :(

On my Samsung Galaxy Tab S2 it works by setting background sync in K9 global settings to "always".

On my Wileyfox with Lineageos it doesn't work with this setting. Additionally there doesn't exist a doze function to disable (or I cannot find it: it isn't in the app settings menu, nor in the battery settings...).

I don't think the Android OS respects the app specific settings if the power saver is turned on with background data restriction enabled. Could be more of an OS behavior than app specific.

Yes, you are right: I have completely disabled any power saving function on my Samsung tablet in the menu. Additionally I had to enable the "always" option K9 mail the get push working again. Only to disable the power saving hasn't solved the problem...

On wileyfox with Android 7 (lineageos) I haven't found a solution. With CM13 (Android 6.0.1) it works...

Other apps than K9 are working well in background... How they have solved it? Isn't there any solution to get K9 working again with IMAP push?

I have found the energy saving option under lineageos 14. It was my fault, sorry. It's the same way, described in your link. I need some glasses ;-)

Just thinking about the theory that the os is incorrectly signaling availability of WiFi... I've noticed that a couple of apps will flash up a warning on my phone sometimes (Samsung s6) saying that there's no internet connection, but then proceed to function just fine.

On 12/02/2017 07:01, Bugsbane wrote:

Just thinking about the theory that the os is incorrectly signaling
availability of WiFi... I've noticed that a couple of apps will flash up
a warning on my phone sometimes (Samsung s6) saying that there's no
internet connection, but then proceed to function just fine.

Yes, my S7e (Nougat) does the same: regularly gets an icon that
indicates “no internet” despite everything working perfectly. Resolves
itself after a few minutes, often.

Can a button be added that manually re-enables sync without having to kill and restart k9 completely?

The refresh button already does that for me.

Yeah, I just tap the sync button whenever I want to see new emails.

Syncing stays disabled if i refresh. I don't see a sync button.

When "background sync is enable" is selected. This seems to work for me.

Always on = syncing disabled.

Lineage OS 14.1.

Edit. Same problem.

Back on modified stock oneplus 3T rom, no issues .

I can unfortunately confirm the same problem on a Samsung Galaxy S7 with Android 7.0. Prior to Android 7.0 (don't remember the old version) it worked, but since I got the upgrade, K9 disables sync sporadically. It's already whitelisted, but I'll try to switch the setting in K-9 to sync always.

UPDATE: switching in K-9 to sync "always" doesn't help either.

UPDATE2: added K-9 debug logfiles, k9-log_anon.txt, I hope they catch the time when sync was disabled. However, what you do see that this seems to happen in an environment with unstable wi-fi connection. I guess after some time, sync get's deactivated. But, this didn't happen with Android 6, or, it was automatically re-enabled and I just didn't notice it.

Okay, I did one more debug session and did find this one here, containing a NPE:

...
03-31 23:44:10.160 V/k9      (10378): LockableDatabase: Transaction ended, took 40ms / com.fsck.k9.mailstore.LocalFolder.appendMessages(LocalFolder.java:1255)
03-31 23:44:10.166 V/k9      (10378): syncFolder(INBOX) got latch release
03-31 23:44:10.166 I/k9      (10378): About to IDLE for XXX:INBOX/Thread-14
03-31 23:44:10.167 V/k9      (10378): TracingWakeLock for tag ImapFolderPusher XXX:INBOX / id 135 for 60000 ms: acquired
03-31 23:44:10.168 E/k9      (10378): Got exception while closing for exception for XXX:INBOX/Thread-14
03-31 23:44:10.168 E/k9      (10378): java.lang.NullPointerException: Attempt to invoke virtual method 'void com.fsck.k9.mail.store.imap.ImapConnection.close()' on a null object reference
03-31 23:44:10.168 E/k9      (10378):   at com.fsck.k9.mail.store.imap.ImapFolderPusher$PushRunnable.reacquireWakeLockAndCleanUp(ImapFolderPusher.java:252)
03-31 23:44:10.168 E/k9      (10378):   at com.fsck.k9.mail.store.imap.ImapFolderPusher$PushRunnable.run(ImapFolderPusher.java:202)
03-31 23:44:10.168 E/k9      (10378):   at java.lang.Thread.run(Thread.java:762)
03-31 23:44:10.168 E/k9      (10378): Failed synchronizing folder XXX:INBOX @ Fri Mar 31 23:44:10 GMT+02:00 2017
03-31 23:44:10.168 I/k9      (10378):  Command 'synchronizeMailbox' completed
03-31 23:44:10.170 E/k9      (10378): Got exception while idling for XXX:INBOX/Thread-14
03-31 23:44:10.170 E/k9      (10378): java.lang.NullPointerException: Attempt to invoke virtual method 'void com.fsck.k9.mail.store.imap.ImapConnection.setReadTimeout(int)' on a null object reference
03-31 23:44:10.170 E/k9      (10378):   at com.fsck.k9.mail.store.imap.ImapFolderPusher$PushRunnable.setReadTimeoutForIdle(ImapFolderPusher.java:362)
03-31 23:44:10.170 E/k9      (10378):   at com.fsck.k9.mail.store.imap.ImapFolderPusher$PushRunnable.run(ImapFolderPusher.java:187)
03-31 23:44:10.170 E/k9      (10378):   at java.lang.Thread.run(Thread.java:762)
03-31 23:44:10.170 D/k9      (10378): SleepService Preparing CountDownLatch with id = 33, thread Thread-14
03-31 23:44:10.171 I/k9      (10378): BootReceiver Got request to schedule alarmedIntent com.fsck.k9.service.SleepService.ALARM_FIRED.33
03-31 23:44:10.176 V/k9      (10378): TracingWakeLock for tag ImapFolderPusher XXX:INBOX / id 135: releasing after 5639 ms, timeout = 60000 ms
03-31 23:44:10.183 E/k9      (10378): Got exception while idling for XXX:Drafts/Thread-13
03-31 23:44:10.183 E/k9      (10378): javax.net.ssl.SSLException: Write error: ssl=0x6fb0beee00: I/O error during system call, Software caused connection abort
03-31 23:44:10.183 E/k9      (10378):   at com.android.org.conscrypt.NativeCrypto.SSL_write(Native Method)
03-31 23:44:10.183 E/k9      (10378):   at com.android.org.conscrypt.OpenSSLSocketImpl$SSLOutputStream.write(OpenSSLSocketImpl.java:824)
...

Interesting enough, the same NPE happened later with the DRAFT folder. Perhaps this messes up sync and afterwards it fails?

I could paste more, but somebody needs to hint me into anonymizing these files.

Something I noticed was when I'm on mobile data (at work or out and about) I get all my work emails via IMAP Idle. When I get home and my Pixel connects to wifi I stop getting emails. This was with Doze optimization disabled or enabled. I also see the inverse when I reboot my phone at home and it starts out with a wifi connection. It seems as if when switching from mobile to wifi data and vice versa the IMAP idle connection isn't reestablished with the new IP address.

If this is related to doze, I was reading about disable doze completely through this app and script.
I am going to try it later when I am at said phone.

"dumpsys deviceidle disable"

https://forum.xda-developers.com/android/apps-games/root-doze-settings-editor-android-t3235130/page138

@cketti does this issue still needs to be labeled with "needs info"? I've posted some debug log entries here. Either remove that label or state what more information you need and how to retrieve it. Thanks!

Seems pretty obvious; not all of the code in ImapFolderPusher.java checks if connection is null.

ImapFolderPusher.java

Line 185:

                        ImapConnection conn = connection;
                        setReadTimeoutForIdle(conn);
                        sendIdle(conn);

Line 249:

            try {
                connection.close();
            } catch (Exception me) {
                Timber.e(me, "Got exception while closing for exception for %s", getLogId());
            }

@nyetwurk

Sure but we catch the exception. It's not the reason.

Any update on this topic? Can I help with any further information you need for analysis?

I have a Galaxy S8, running Android 7.0. Here are the steps I took to solve the K9 app syncing problem:

K9 > Settings > Global Settings > Network > Background sync: change it to "When 'Auto-sync' is checked". It might work with Background sync set to "Always", but I haven't tried it.

Android Setting > Device Maintenance > Battery, K9 did not appear in the App power monitor section. If you see K9 here, make sure it is not checked.

Android Setting > Device Maintenance > Battery > Unmonitored apps (at very bottom of Battery screen) add K9 to "Unmonitored apps"

Android Setting > Device Maintenance > Battery > Battery Usage (right below "Estimated battery life" at top of screen). Then click on 3 vertical dots at top right and select "optimize battery usage". Select "All apps" and turn off optimization for K9.

@Newbie1980 I have been disabling doze ever since it stopped viber from working properly. Does not help with k9 though

This issue (for me) seems to be entirely linked from connecting initially to my work mail server (imap idle) on mobile data, which works fine, and then getting home and the phone connects to wifi. At that point I get no more emails until I leave my home and get back on mobile data.

It is as if the connection to the mail server needs to be reset when switching from mobile to wifi (or more to the point when the ip address changes).

Just wanted to let people know that fivemail's post 3 above this one fixed the issue for me on my S6. Please try it.

FWIW, I also noticed that I sometimes (I haven't figured out exact circumstances) don't receive any notifications on WiFi (and when I checked, it did say "Synchonisation disabled"), but as soon as I go out and switch to mobile connection, K-9 suddenly decides to check e-mail.
Android 7.1.2 (LineageOS 14.1), Redmi Note 4, K-9 5.208.

I've just did the workaround mentioned above, I will update this post if it actually helps.

I had to switch mine to 'synchronise always' at the weekend because it just couldn't keep a connection at home over wifi. I refreshed it three times and it still kept dropping out. I don't know where that came from as it's been fine since the end of Summer. I've noticed though that the old 'background sync' option seems to have gone from my S7 Edge. I don't know when that happened but it's at least a month since my phone firmware was last updated.

So far 'synchronise always' has solved the problem for me though.

I can confirm the behavior @WGH- and @drhill have reported: Often e-mails don't get fetched when the device is connected to WiFi, but as soon as it changes to mobile connection e-mails are synchronized again.

I will try the instructions @fivemail has written. The last setting was not set as in the comment.

  • [x] power saving is disabled for that app
  • [x] background mobile data is enabled for that app
  • [x] background synchronization in K-9 Mail is set to 'always'
  • Android 7.0
  • K-9 Mail 5.600

I think I haven't had this problem since I posted my last message. That workaround might've helped, or maybe something else has changed. The bug is tough to reproduce reliably.

Duplicate of #3950

I will try the instructions @fivemail has written. The last setting was not set as in the comment.

* [x]  power saving is disabled for that app

* [x]  background mobile data is enabled for that app

* [x]  background synchronization in K-9 Mail is set to 'always'

* Android 7.0

* K-9 Mail 5.600

Since I tried the recommendations I did not observe the issue any more.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NovaViper picture NovaViper  ·  3Comments

ByteHamster picture ByteHamster  ·  3Comments

philipwhiuk picture philipwhiuk  ·  3Comments

jimimaseye picture jimimaseye  ·  3Comments

asbach2 picture asbach2  ·  3Comments