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

Syncing stops with Android 7.0 #2357

Closed
grmblgrmbl opened this issue Mar 7, 2017 · 21 comments
Closed

Syncing stops with Android 7.0 #2357

grmblgrmbl opened this issue Mar 7, 2017 · 21 comments
Labels
type: architecture Architecture of the project and high level design type: bug Something is causing incorrect behavior or errors

Comments

@grmblgrmbl
Copy link

Since upgrading to Android 7.0 K-9 often does not sync for hours, despite having it set up to sync every 30 minutes and keeping open push connections via IMAP. App power saving is explicitly disabled for K-9.

Expected behavior

K-9 should sync as configured. It worked on the same phone with the same configuration with Android 6.0.1.

Actual behavior

No sync for hours, status displays "Syncing disabled".

Steps to reproduce

  1. Start K-9
  2. wait

Environment

K-9 Mail version: 5.203

Android version: 7.0

Account type (IMAP, POP3, WebDAV/Exchange): IMAP

@philipwhiuk
Copy link
Contributor

I don't think this is worth investigating until the issues surrounding #857 are fixed.

@philipwhiuk philipwhiuk added type: architecture Architecture of the project and high level design type: bug Something is causing incorrect behavior or errors labels Mar 7, 2017
@njtinman2148
Copy link

Same issue here. S7 Edge got 7.0 from Verizon. K9 set to 5 minute sync, no longer working. Worked flawlessly on 6.x, now useless. Need the sync for work email - can only manually retrieve presently.

@COGZJA
Copy link

COGZJA commented Apr 3, 2017

Same issue here with ATT S7. Closing K9 with Left Menu, Close All, fixes the issue until it times out again.

@mgolden
Copy link

mgolden commented Apr 19, 2017

Looking at the Syncing Disabled section of this page:

https://k9mail.github.io/documentation/faq.html

I think it would be helpful in the interim to put a comment there explaining this issue on Nougat and telling the users how to turn off power optimization - namely

Go to Settings > Battery > Hamburger menu > Power Optimization
Select All Apps
Click on K-9 Mail
Select "Don't optimize"

@grmblgrmbl
Copy link
Author

... only disabling power optimization does not fix the problem!

@mgolden
Copy link

mgolden commented Apr 20, 2017

It has fixed it for me. I have the syncing set to Always and both of my two IMAP mails set to 15 minute polling, and it hasn't disabled syncing since I turned off the power optimization.

@grmblgrmbl
Copy link
Author

Read the original report above. I have disabled power optimization for K-9, and syncing is still disabled after some time. That's the entire point of this bug report.

@mgolden
Copy link

mgolden commented Apr 20, 2017

I think I may know what may be happening. Once the syncing stops, just changing the power optimization doesn't restart it. You have to do this: Go into one of the e-mail accounts' inbox, go to Hamburger > Settings > Account Settings > Fetching Mail. Change the timing of the sync (in my case, I did from 15 minutes to 10). Then hit back until you're back out at the account. You should see something like "Next sync 3 hours ago". Shortly after that, it will sync, and in my experience, it won't get stuck again.

@njtinman2148
Copy link

I just tried this on mine (changed sync time from 10 minutes to 5) and no effect - still "Syncing Disabled". Power optimization is off for K-9.

@mgolden
Copy link

mgolden commented Apr 20, 2017

And you have it set to Always on the Background Sync under Global Settings > Network?

@njtinman2148
Copy link

That is correct.

@grmblgrmbl
Copy link
Author

That setting doesn't make a difference if you have background sync enabled in your global phone settings.

Basically, if you change any settings that affect syncing you can trigger a new sync if it's due, but eventually syncing will be disabled again. That's the bug.

@mgolden
Copy link

mgolden commented Apr 21, 2017

Very odd. My experience was different. On Nougat I was having the problem you described, but once I disabled the power optimization the issue went away - at least, it did after I did what I said.

I would note that one of the two accounts I am using K-9 for is actually not known to the phone - that is, it's not known in settings to the gmail app - I just set it up in K-9. That's why I made sure the setting was Always.

@ajweber
Copy link

ajweber commented Apr 24, 2017

I am having the same prob on my new GS8 (nougat). I actually didn't have any probs on my GS6, which was Android 6. I double-checked all my settings and they are set to "Always", etc. I actually use "PUSH" email (not sure why you wouldn't use that for IMAP unless you have an old server that doesn't allow for it) instead of polling, but same result: says Syncing Disabled after some amount of time.

I have been using K9 mail for a very long time (many phones), and this is the first I've seen of this prob. Must be some change in nougat or a recent version of K9. Please fix!

@ghost
Copy link

ghost commented Apr 26, 2017

I was using different email app. But for few days I had a problem with notifications. I did try another app but same problem. So I did end up with K-9 which I did used in past on old phone.

I did go over setting many times and I think that I have correct config.
It is funny, but notifications are working for while, but after longer time I am not getting any notifications. Sometimes after unlock phone notification just appears, but opening email I find out that it is lets say 40minutes old email. I have polling 10min and refresh IDLE at 12min.

I did find this thread so I am not alone, hope that we will find solution.

I dont remember when phone get update to android 7.0 but maybe it is possible that my problems with notifications did start from that time.
Maybe that DOZE #857 is the problem, and that could effect another app too -> my case with another email app.

anyway, I did switch off batter optimisation on K-9 and will see what happen

@njtinman2148
Copy link

BTW - Significant other has same phone as mine, also with K-9. Have kept her phone on 6.0.1 by deferring Verizon upgrade, and K-9 is functioning normally for her.

@ajweber
Copy link

ajweber commented Apr 26, 2017

I switched off all the battery optimization features I could find - like completely off, not even just "exclude K9", and it did not fix the issue.

@ghost
Copy link

ghost commented Apr 28, 2017

Looks that problem is solved, I did not miss any email notification for last two days.
I think that switch off batter optimisation on K-9 app did help.
I have Moto G4 with android 7.0

@njtinman2148
Copy link

Problem is absolutely not solved. Verizon pushed an update to 7.0, but no change in K-9 behavior.

@ghost
Copy link

ghost commented Apr 30, 2017

well, I did mean that problem is solved on my phone ...

@philipwhiuk
Copy link
Contributor

I'm not sure that there's much useful that a non-developer can contribute here and, as I said, fixing Doze should come first because it's precursor to this problem. Locking.

@thunderbird thunderbird locked and limited conversation to collaborators May 4, 2017
@cketti cketti closed this as completed Feb 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: architecture Architecture of the project and high level design type: bug Something is causing incorrect behavior or errors
Projects
None yet
Development

No branches or pull requests

7 participants