We have moved to a new Sailfish OS Forum. Please start new discussions there.
33

HowTo: temporarily fix the erratic email syncing problem [released]

asked 2013-12-26 23:19:31 +0200

clau gravatar image

updated 2014-02-25 23:43:05 +0200

jgr gravatar image

UPDATE 2014/02/05:
IMPORTANT: manually setting the update interval by using ag-tool for email accounts introduces a whole range of new problems (see VDVsx' answer below), so it is better to stay away from it. If you have manually changed the update interval, either change it back to 0, or delete and re-create the account.

UPDATE 2014/01/08:
the email syncing problem seems to be caused by the system not waking up from suspend to check for new emails. Have a look at this for details: Overzealous suspend everything watchdog (workaround included). The discussion is about sshd responsiveness, but it looks like the email syncing problem has the same root cause.
The advice from there is to change the suspend policy to "early". Make sure you read the entire thread and understand it before playing with it.

I can confirm it works, but use it with great care. The most visible side effect is increased battery consumption during suspend, but there might be other unforeseen effects. Battery life is still much better compared to having tohd.service running, and for my usage patterns it is comparable to N9.

If you can live with the current situation, I'd advice you wait for a proper fix, and vote up all questions related to email client problems.

The initial guide can still be used to fine tune the email checking interval, but it will still not work properly while the device is in suspend mode with the stock configuration.

UPDATE 2014/01/05:
this method may improve the sync behavior in certain conditions, however it is not a general solution. I will do another update with more details in the next days.

----------

Here's a simple way of fixing the missed syncs for the email client. You need to activate the developer mode and get into the terminal.

1. Switch to root (ie. devel-su)

2. Install ag-tool:

pkcon install libaccounts-glib-tools

If it fails, try to activate mer-tools repository before running it again:

ssu er mer-tools
pkcon refresh

3. Exit from su (or Ctrl-D)

4. Get the account ID:

ag-tool list-accounts

You will get a list of the accounts, with the ID in the first column. You will need the ID in the following steps. I will use 3 as a demo value.

5. Verify the current settings (not necessary):

NOTE: this assumes an imap4 account, but it will probably work in the same fashion for pop3

ag-tool list-settings 3 | grep checkInterval

You will get something like:

imap4/checkInterval = 0

6. Set the interval to how many minutes you want, in this example 5 is used:

ag-tool update-service 3 email int:imap4/checkInterval=5

7. Enjoy getting notifications for new emails every 5 minutes ;)

Unfortunately, there's still a problem: you will only get a notification (light and sound) for the first batch of new emails. Subsequent emails will be visible in the notification screen, but the phone will not notify you at all. It will start notifying again after you clear the current notifications.

I am still waiting for the proper solution and, more importantly, for the IMAP IDLE support. These settings (both check interval and IMAP IDLE) should be available per account.

edit retag flag offensive reopen delete

The question has been closed for the following reason "released in a software update" by ortylp
close date 2014-03-17 22:11:22.046747

Comments

if i do a grep on that interval afterwards, it still says 0 ... didn't receive an error message though... should it be 5 on grep after the update-service command?

egnat69 ( 2013-12-28 19:25:09 +0200 )edit

egnat, if you are using a Google account (as opposed to IMAP), the command in step 6 has to be changed to this:

ag-tool update-service 3 google-gmail int:imap4/checkInterval=5

email is replaced by google-gmail.

clau ( 2013-12-29 21:23:57 +0200 )edit

You might also need to reboot, for the changes to take effect.

clau ( 2013-12-30 11:51:14 +0200 )edit
1

I followed your suggestions and set successfully the imap4/checkInterval=5 for my IMAP mail account but syncing is still not every 5 minutes but every "sometimes" (half an hour, hour or even two hours...). So I'm waiting for a real fix... Anyway: IMAP IDLE would be my prefered choice.

Alexander ( 2014-01-02 15:55:32 +0200 )edit
1

You are right, it still does not work as expected. There seems to be a deeper issue with the suspended state of the phone, in which the email app does not wake up to check for new emails. This definitely needs to be addressed officially.

For some details, check this link.

clau ( 2014-01-02 16:05:34 +0200 )edit

3 Answers

Sort by » oldest newest most voted
21

answered 2014-01-08 01:31:05 +0200

simo gravatar image

In my opinion, an issue with this importance should be roadmapped asap. Many of us are using the phone in work (or would like to use...). Email bugs just can't be accepted. Check this search result (tags email & bug):

https://together.jolla.com/questions/scope:all/sort:activity-desc/tags:email,,bug/page:1/

While writing this (8-Jan-2014), only 6/53 questions shown with this search have an accepted answer:

  • 1 fixed (great!)
  • 1 "awareness"
  • 1 mistake
  • 3 duplicates
  • No roadmap tags in any of 53. (tag would mean: mapped to development = bug getting a fix some day)

A humble wish: Please get onto this (and all the other email problems)

edit flag offensive delete publish link more

Comments

3

Yes agree, smooth and reliable email is a must have. If I remember correctly there was a comment from Jolla that the email-app fixes had to pulled of from 1.0.2.5 update because of regressions for some users. So, I think there is even more need for improved email-experience. FYI: the reason that I downvoted this question is that it gave a wrong impression that there actually is work-around for this, while in fact there isn't, and IMO votes should be given to questions that direct the attention to fixing this by Jolla, and not for us to invent non-optimal and unreliable workarounds.

foss4ever ( 2014-01-08 01:45:04 +0200 )edit

In my opinion, the question shouldn't include an answer at all - this way we could give votes for the questions we see as important. People should convert these QA posts to Q+A (like described at #4389)

simo ( 2014-01-08 01:54:54 +0200 )edit
1

So why did you answer this question, then? I still think seeking temporary solution in its own question to an important email sync problem, takes away votes from those questions where the pursuit is to seek permanent and official solutions from Jolla. PS. this wasn't my question, and I just edited the title to a question (otherwise it as it originally was stated 'seeking a temporary fix'). Rather than that, we should focus on official enhancements and fixes, right?

foss4ever ( 2014-01-08 02:04:12 +0200 )edit
2

@jjaone We totally agree here :) and this answer is just for that. (If voted & accepted, it means that people do not want a temporary fix, but rather a permanent fix).

simo ( 2014-01-08 02:10:17 +0200 )edit
3

I'll try to add tags to the ones under work during in my free time, I've acknowledge all reports in this site for Email and EAS already, but this takes time, until I can clone myself, I need to choose between fix the issues or spend more time here :). Thanks for understanding.

VDVsx ( 2014-01-08 08:52:35 +0200 )edit
4

answered 2014-02-04 19:59:46 +0200

VDVsx gravatar image

Be aware that enabling this will cause random issues, like all your folders will be always synced (yes that includes spam and trash), no notifications of new emails sometimes or notifications from folders you are not interested(like spam), plus two sync process will be running wasting also your battery.

edit flag offensive delete publish link more

Comments

Enable what, more exactly? Early suspend policy or manually setting the interval? In both cases I have serious doubts these changes are the cause of what you are seeing.

Battery life is very good in my case, much better than when I had the buggy tohd.service started (with tohd I was losing about 20% over night, while without tohd and early suspend policy I was losing just a few percent). It is also better than my N9, with even more aggressive usage on Jolla than on N9.

AFAICT, there's simply no connection between these settings and the behavior you are seeing. This is most likely just another bug in the email app. Also, please note that I didn't see any of the problems you have reported.

clau ( 2014-02-04 20:11:15 +0200 )edit

Manually setting the interval, good that you don't have such problems, it will not drain your battery, just consumes a bit more(probably not very noticeable). You only trust me if you want, I just happen to be the developer of that MW :)

VDVsx ( 2014-02-05 08:27:15 +0200 )edit

@VDVsx, I verified and I had it set to 0 (the default). I have changed it to something else, and it did notify me about new email in Drafts. What is the reason behind such different behavior with this setting modified?
And what MW are we talking about, messageserver5?

clau ( 2014-02-05 11:33:41 +0200 )edit

The difference is that you should not even touch that, original sync is not done there, this just makes another sync process start working that is not tested possibly causing problems elsewhere and making our life harder since I already received logs of problems caused by this change, so results will be unpredictable, also there's no guarantee that account modified by command line will not break when a update comes.

Original problem is related to wakeup/suspend not to the sync schedulers, as you know, but ofc you can play as much as you want, I'm just warning the users of the consequences of such changes.

VDVsx ( 2014-02-05 12:42:52 +0200 )edit

Fair enough. I will update the original post later with the new info.

clau ( 2014-02-05 12:57:02 +0200 )edit
2

answered 2014-03-17 21:02:35 +0200

VDVsx gravatar image

This is not needed after 1.0.4.20, Ohijärvi. if you still have issues please comment in the relevant thread: https://together.jolla.com/question/8516/bug-email-app-sometimes-doesnt-sync-at-specified-intervals/

edit flag offensive delete publish link more

Question tools

Follow
13 followers

Stats

Asked: 2013-12-26 23:19:31 +0200

Seen: 5,267 times

Last updated: Mar 17 '14