AquaMail Forum

English - Android => Bug reports => Topic started by: davidmark on March 30, 2016, 08:55:11 am

Title: Seems like this latest version has a problem (red exclamations)
Post by: davidmark on March 30, 2016, 08:55:11 am
Don't remember ever having this problem before about a month ago. Could coincide with the new version and maybe its optimizations are an issue. No idea, but have been looking at the debug log. Don't see anything at a glance that indicates a failure of any kind. See lots of subject lines floating by, but these messages never end up in the synchronized folders and Tasker events never fire. There was something about "*** Sync state NOT reset ***".

The thing seemed okay for a day or two. Then noticed it was bogged down with a red exclamation. Have seen it say "Network Error" once or twice, but there are no network problems as other apps are connected the whole time. GMail continues to update the shade while AquaMail sits there complaining of sync errors. Have started up streaming videos, music, etc. without issues while AquaMail fails to deliver messages. Network connection is Fiber and WiFi is not an issue.

Uninstalled. reinstalled. tried stock settings, *many* other settings combinations, verified I'm nowhere near out of space. Changed to the IMAP option (as opposed to the GMail/Google Apps option). Didn't set it up manually, but can't imagine I would use different settings. Have several other IMAP clients running here and none of them just dry up like this. I can't even remember a brief outage with any of them, including those running on the HTC One devices in question.

It's pretty much unusable at this point. It will sputter and get a few messages and then comes the dreaded red exclamation mark. After that it rarely does anything until I reinstall it. Then it might get 15 minutes more.

Turned off the Network settings for "buggy" devices. Turned on debug. It's just generating a huge log file, which includes many message subjects, but never gets any new messages.

I really can't understand how a basic IMAP client could fail like this. Google, OAuth, etc. I could see (though don't recall any other apps having problems). But IMAP?! Something is horribly wrong here. Where do I send the log file?

Edited to note that I sent the log file. It should have some errors followed by an inexplicable string of successes. Ever since I sent this, it's decided to start working again. Would be great if that stuck, but I doubt it, unless due to the latest tweaks to the settings.

Thanks!

PS. I glanced again and see several cases of "Read Timeout", followed by "Aborting the Connection". When those stopped happening, all was well again. Can't imagine how it is timing out on GMail, but I know there are various ways to connect to them (e.g. different servers, ports, etc.) Can I set this timeout somewhere as I'd just as soon it wait longer than give up for the next n minutes.
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: Kostya Vasilyev on March 30, 2016, 03:02:40 pm
Can you please clarify "this recent version" with a specific version number?

---

In general, the red exclamations do mean network errors, and they're genuine.

In addition to what @Paris Geek linked to (those are mostly for MIUI, although other devices too have various "battery optimizers" which may block the app's access to the network, built-in or third party apps) --

Is your mail account @Gmail?

Are you seeing these errors on a mobile network (and everything works on WiFi)?

---

And as far as "basic" (or not) -- if the app's access to the network is blocked, then yep, that's pretty basic and the mail sync code just can't possibly work (if that's what it is).

Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: Kostya Vasilyev on March 30, 2016, 03:04:59 pm
Oh and I would like to see your debug log (or a new, shorter one if you like) so I actually *see* what's going on.

Feel free to email it to kmansoft / gmail.

Don't post it on the forum please -- the log does not record the passwords, but it can contain bits and pieces of your messages.
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: davidmark on April 23, 2016, 04:30:46 pm
Can you please clarify "this recent version" with a specific version number?

---

In general, the red exclamations do mean network errors, and they're genuine.

In addition to what @Paris Geek linked to (those are mostly for MIUI, although other devices too have various "battery optimizers" which may block the app's access to the network, built-in or third party apps) --

Is your mail account @Gmail?

Are you seeing these errors on a mobile network (and everything works on WiFi)?

---

And as far as "basic" (or not) -- if the app's access to the network is blocked, then yep, that's pretty basic and the mail sync code just can't possibly work (if that's what it is).

I know they are "genuine", but that's down to the behavior of this app. GMail and other apps go right on about their business while this one gets one red exclamation after another.

Yes GMail. Don't know if it is better on the Mobile Network as don't often pay attention to it when I am gone. I'll try to look out for that.

Don't have any sort of general WiFi or network issues, else every other app in the house, on the phones, etc. would have outages when the Red Menace is present (and they definitely don't). I stream video all day here, and use WiFi for many things, so there's no reason that a *determined* app can't get through to download 50 lousy emails.

I've watched it long enough to figure out what it is doing. Have it set to poll every two minutes (out of desperation) and it takes so long to download the new messages that it times out and gives up entirely until the next two minutes are up. Previously it was set to 15 minutes, which could see it try and fail for hours before finally getting the latest 50 messages. Think it's obvious what has to happen: either make the timeout configurable or create a configuration that allows me to force a retry on errors (rather than sitting around waiting another two minutes). I just want to be able to get the freshest 50 messages without a lot of hassle (not much to ask from an email client). Seems like it should happen faster as well as the GMail client pushes messages almost instantly, while this one sits and spins and flies the red flag.

Six months ago, I had none of these problems with it (or at least they weren't bad enough to notice). Maybe that's because the messages are more numerous now, but can't imagine that matters. I just want the last 50 messages off the top and want them faster than ten minutes ago. Should work whether there are intermittent "network errors" or not. Those happen and email clients have to work around them (and much better than this one does).

Here's a Real World example: It'[s 9:30AM, yet this email client shows the last email from 9:06AM, which is definitely wrong (emails fly around here constantly). And it's spinning... And spinning... And no telling what it is trying to do, but... there's the red exclamation. Now it will give up and sit until the next cycle. So clearly the behavior is failing me and can hardly be blamed on my network (which is streaming video as usual). This is the sort of situation that shows how the app behaves when conditions aren't *exactly* as the developer expected (and tested). It's a complete failure in this context.

Will send another log when I get a chance, but am moving away from relying on this app for anything. It's a shame, but nobody (and don't think I'm the only one with a similar setup and issues) will wait around a half hour for a lousy few dozen emails. Not in 2016 and can't imagine anybody would have put up with such delays out of email clients in 1996. They were/are generally written to be more nimble.

Work on it. Thanks! :)
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: mikeone on April 23, 2016, 06:46:36 pm
Oh and I would like to see your debug log (or a new, shorter one if you like) so I actually *see* what's going on.

Feel free to email it to kmansoft / gmail.

Don't post it on the forum please -- the log does not record the passwords, but it can contain bits and pieces of your messages.
Hi davidmark,
In your response you mentioned nothing about "sending a debug log to kmansoft / gmail".

Without knowing what's really going on, it's obviously not possible to work on "something".
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: StR on April 23, 2016, 10:06:25 pm
@davidmark:

I understand that you are frustrated that something is not working right on your phone.
But just in case you haven't noticed, people here, including the Aquamail developer are trying to help you. However, that would work only if you want the issue to be resolved.
If your main goal is to vent your emotions, that's completely different. -- And I understand your frustration, but I doubt anybody here can help you much with that part here.

So, if you still want to have your problem resolved, a good step would be to send the debug log, as suggested above, and to answer the questions that the developer asked you (including the app version) Without that information from you, it is hard to guess what is happening on your device.

Also, - a few additional thoughts based on a few scattered facts and symptoms you described in your last post:

1. Could you please describe your imap configuration: how many messages do you have configured: (a) to sync and (b) to cache  (Under Settings -> Mail receiving -> Messages to sync and Messages to cache)?
If either of those two settings is too big, you may have the timeout on the connection that you are describing.

2. Not sure if it's true, but I've read somewhere if the sync is done too frequently (whatever that means), Gmail can lock your connection and require a manual web login:
 <i> ERR [AUTH] Web login required: https://support.google.com/mail/bin/answer.py?answer=78754 </i>
So, setting sync interval with Gmail to 2 minutes can be counterproductive.

Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: Kostya Vasilyev on April 24, 2016, 04:08:17 pm
Never got any debug log(s) from this user.

Got an interesting one from someone else, also about "Gmail account spinning and spinning".

Turned out to be OAUTH2, for which AquaMail uses Google Play Services if it's a Gmail account present in the system.

Just like it's supposed to. And it's literally a one liner, one function, "I need that access token please".

And in this other user's log, this function (which I'll say it again, is actually implemented inside Google Play Services) would get stuck, never to return.

So far I've only seen it happen on "mobile data", not WiFi (as per user reports).

---

Workaround:

Removing the account from AquaMail

Adding it again as an "internet mail" account type, *not* upgrading to OAUTH later (when prompted), to make sure the app will use the good old "login + password" to authenticate

It may be necessary to enable "access for less secure apps":

https://support.google.com/a/answer/6260879

( despite the scary wording, it just means "allow apps to log in by sending the password"... the network connections are encrypted, of course )
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: mikeone on April 24, 2016, 04:39:39 pm
Never got any debug log(s) from this user.
Unsurprisingly
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: StR on April 24, 2016, 07:42:45 pm
Got an interesting one from someone else, also about "Gmail account spinning and spinning".

Turned out to be OAUTH2, for which AquaMail uses Google Play Services if it's a Gmail account present in the system.

Just like it's supposed to. And it's literally a one liner, one function, "I need that access token please".

And in this other user's log, this function (which I'll say it again, is actually implemented inside Google Play Services) would get stuck, never to return.

So far I've only seen it happen on "mobile data", not WiFi (as per user reports).

Could this be caused by what had been discussed here at some point, - when Google Play services are disabled on mobile network?
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: Kostya Vasilyev on April 24, 2016, 07:47:31 pm
Re: Could this be caused by what had been discussed here at some point, - when Google Play services are disabled on mobile network?

Don't think this was the case:

Only one user ever reported the "endless spinning", but there are more who get "oauth network error".

For the latter, Google Play Services reports an IOException, and then my code waits a few seconds and retries, but that doesn't help either.
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: Old Faithful on May 16, 2016, 05:40:43 am
So far I've only seen it happen on "mobile data", not WiFi (as per user reports).

---

Workaround:

Removing the account from AquaMail

Adding it again as an "internet mail" account type, *not* upgrading to OAUTH later (when prompted), to make sure the app will use the good old "login + password" to authenticate

It may be necessary to enable "access for less secure apps":

support.google.com/a/answer/6260879

( despite the scary wording, it just means "allow apps to log in by sending the password"... the network connections are encrypted, of course )

THANKS A MILLION, I registered here simply to say a BIG THANK YOU!!! The issue was driving me nuts and setting my accounts to allow access to less secure apps (look for it in security settings) finally resolved this issue. I can now use Aquamail as my only email client on android, it now works on the mobile network, YEAH!!!

This should be a sticky for everyone having issues with setting up Aquamail with gmail :-)

[PS - removed the link in YOUR quote as requested by the forum software ;) ]
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: Kostya Vasilyev on May 17, 2016, 11:13:19 pm
Since 1.6.2-dev6, it's no longer necessary to switch to "Internet Mail" or enable "Less secure".

( I will update the FAQ when 1.6.2 ships )

There is a fairly detailed explanation here, but the steps are actually quite simple:

http://www.aqua-mail.com/forum/index.php?topic=4662.0
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: davidmark2 on November 01, 2016, 03:22:53 am
Just an update. I haven't updated the app for at least six months and the problem did go away for a while, but now it's back as bad as ever. I have no network problems, either wireless or wired and get email from various clients (both through wireless and wired) all day long (and usually instantly via IMAP push), stream HD videos, etc. No issues, ever. It's also an extremely high-speed connection.

The other day I noticed the red exclamation and that the inbox was behind by hours. I have it set to check every 2 minutes, but that shouldn't matter with push enabled (though suspect it never quite worked right on my phone). It's an older HTC One, but don't have this sort of trouble with any other apps (including GMail).

I checked my Kindle, which is obviously also wireless and on the same network and it had the latest emails up to the minute. I suspect that after AquaMail has a timeout it waits n minutes to try again, but would think that with the delay set to 2 minutes (lowest allowed), it would catch up quickly. Seems impossible that it would get hours behind like this, but it does. :(

If I go through the hassle of clearing space to update (my phone has atrocious storage management) are there any fixes in the last six months that might address this problem (e.g. like trying again immediately on a timeout?)

Just checked it side by side with the Kindle (which runs its own email client) and the Kindle is up to date to the minute. Aqua Mail on my phone is behind by 2 hours (and just saw a "Network Error" pop up). Can't understand what could cause this or why it would settle down for six months and start up again. Clearly, whatever problem it is detecting (timeout?), the Kindle email client (among several others) is able to negotiate its way around it without issue.

As we discussed before, there are tons of unread emails in the monitored folder, but I can't imagine that would make a difference as it is set to only download 50 at a time. GMail doesn't allow me to mark them all read at once (and never had any luck doing it with Aqua Mail either), but will take some time and mark them read and see if that makes any difference. ISTM I did do this last time I had this problem, but never came close to marking them all read.

Thanks in advance for any thoughts or more nimble versions.
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: davidmark2 on November 01, 2016, 04:02:56 am
Got an interesting one from someone else, also about "Gmail account spinning and spinning".

Turned out to be OAUTH2, for which AquaMail uses Google Play Services if it's a Gmail account present in the system.

Just like it's supposed to. And it's literally a one liner, one function, "I need that access token please".

And in this other user's log, this function (which I'll say it again, is actually implemented inside Google Play Services) would get stuck, never to return.

So far I've only seen it happen on "mobile data", not WiFi (as per user reports).

Could this be caused by what had been discussed here at some point, - when Google Play services are disabled on mobile network?

I posted the original and definitely did not have Google Play services disabled on the mobile network. Also, it's something I check on WiFi only; never bothered to see what it was doing when using the 4G network.
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: davidmark2 on November 01, 2016, 04:06:44 am
Oh and I would like to see your debug log (or a new, shorter one if you like) so I actually *see* what's going on.

Feel free to email it to kmansoft / gmail.

Don't post it on the forum please -- the log does not record the passwords, but it can contain bits and pieces of your messages.
Hi davidmark,
In your response you mentioned nothing about "sending a debug log to kmansoft / gmail".

Without knowing what's really going on, it's obviously not possible to work on "something".

There are two threads and the debug log was sent and definitely discussed. I recall kmansoft commenting on the size of it (which he alluded to here). It stated there was a "network error", yet I have no problem with a dozen other IMAP clients on the same network, including a couple more on wireless devices. This is the only email client that does the endless spinning, followed by a "network error" and gets behind by hours at times. But thanks for your concern. :)
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: davidmark2 on November 01, 2016, 04:08:21 am
Never got any debug log(s) from this user.
Unsurprisingly

I assume you are some sort of fanboy, but I did indeed send a debug log to Kostya at one point and it was discussed here somewhere (or maybe by private email).
Title: Re: Seems like this latest version has a problem (red exclamations) SOLUTION
Post by: davidmark2 on November 01, 2016, 04:22:55 am
Went back and found what looks like a clue in an old private email thread. Here is the salient excerpt:

"The app asks for the list of UIDs (identifiers, they're fairly short,
numeric) of ALL unread messages -- so it can count how many there are
and show a *server side* unread count, per folder."

So "mikeone", in future, please keep your ignorant assumptions private; they just confuse the issue for everybody else. And Kostya, you must have forgotten our email discussion entirely.

Anyway, thanks Kostya, as you seem to have hit it on the head with that. I must have lost interest in our discussion last spring and never read the last message. My advice is to make this behavior optional as it is clearly the cause of my issues. Will post back after going through the drudgery of telling GMail to mark them all as read. It will do maybe 10-20K at a time and then throw an error like clockwork. Tried repeatedly to do this operation in Aqua Mail and it never took. I figure that will do it. Thanks again!

One other note for those interested in the behavior when you have an extraordinarily large number of unread messages. It appears, as Kostya alluded to in the same email, that most email clients do NOT ask for the entire list of IDs. I went around to every email client in the house and did find one other (a dusty old MacBook Pro that I rarely use) that seemed to be timing out in similar fashion. Again, this should probably be an optional feature; I, for one, don't care about the unread message counts. Another suggestion is to use more descriptive error messages (preferably in the client, but certainly in the log). "Network Error" doesn't help diagnose the issue. Something like "Timed out retrieving unread IDs" would have solved this last spring. Granted, it's better than what the Mac does in this case; just leaves a little clock icon by the folder forever. Another suggestion: get the messages first, then get the unread counts (when possible). A timeout getting the unread counts should not prevent the client from getting new mail. ;)

I admit I have been hard on you here, but I use this app for automation with Tasker and hate it when apps work for a while then inexplicably fail with vague error messages. When it works it is almost perfect; apologize for calling it a PoS in an earlier post. The one thing I still don't get is why the push isn't working for me. Surely it doesn't try to get this unread ID list during a push operation. (?)

Also, this forum lost one of my replies on a session timeout. Had to type it all over again. :(
Title: Re: Seems like this latest version has a problem (red exclamations) SOLVED
Post by: davidmark2 on November 01, 2016, 06:46:56 am
Yep, that seems to have done it. The two clients (including Aqua Mail) seem to have settled down now that I marked the bulk of the messages unread. Adjusted GMail filters to do that automatically for most messages. Unfortunate that I can't see those messages in the shade now (they are new after all, just read), but beats the endless timeouts. :)

And got lucky and found the answer (or an answer) in another thread as to why push was not working for me. Apparently it only works for the Inbox folder? Not thrilled about that feature, but can live with it. It's misleading in that the shade shows that push is enabled, but as I am synchronizing a different folder, there's apparently never going to be a push. It also indicates IMAP push is enabled for the folder in Account | Options and Folders | Folders. So perhaps the post in the other thread was a red herring? Maybe the lack of push notifications was due to it being constantly busy trying to do a 2+ minute sync every two minutes? Please advise.

Thanks again!
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: davidmark2 on November 01, 2016, 10:20:16 am
One other note, does Tasker match only unread messages? At a glance that appeared to be the case, so had to turn off the GMail filter that set that attribute. No big deal now that the root of the problem is known; just have to take care to clean up the mailbox once a year.
Title: Re: Seems like this latest version has a problem (red exclamations) SOLVED
Post by: StR on November 01, 2016, 03:26:11 pm
And got lucky and found the answer (or an answer) in another thread as to why push was not working for me. Apparently it only works for the Inbox folder? Not thrilled about that feature, but can live with it. It's misleading in that the shade shows that push is enabled, but as I am synchronizing a different folder, there's apparently never going to be a push. It also indicates IMAP push is enabled for the folder in Account | Options and Folders | Folders. So perhaps the post in the other thread was a red herring? Maybe the lack of push notifications was due to it being constantly busy trying to do a 2+ minute sync every two minutes? Please advise.

If you are still experiencing problems, you may want to read and follow this FAQ item: "How do I enable Push mail?" http://www.aqua-mail.com/?page_id=227

If you make sure that PUSH is enabled in all 3 places as described there, and your mail provider (who is that?) has a standard PUSH (e.g. Yahoo doesn't), then I'd suggest changing sync frequency to a higher number. I am not sure if that interferes, but 2 minutes is too frequent, IMHO.
If PUSH is working, you can safely set that back to the default 15 minutes.

Also, you can enable other folders for PUSH (as described in the FAQ). Inbox is enabled by default.
Title: Re: Seems like this latest version has a problem (red exclamations) SOLVED
Post by: davidmark2 on November 01, 2016, 05:17:59 pm
And got lucky and found the answer (or an answer) in another thread as to why push was not working for me. Apparently it only works for the Inbox folder? Not thrilled about that feature, but can live with it. It's misleading in that the shade shows that push is enabled, but as I am synchronizing a different folder, there's apparently never going to be a push. It also indicates IMAP push is enabled for the folder in Account | Options and Folders | Folders. So perhaps the post in the other thread was a red herring? Maybe the lack of push notifications was due to it being constantly busy trying to do a 2+ minute sync every two minutes? Please advise.

If you are still experiencing problems, you may want to read and follow this FAQ item: "How do I enable Push mail?" http://www.aqua-mail.com/?page_id=227

If you make sure that PUSH is enabled in all 3 places as described there, and your mail provider (who is that?) has a standard PUSH (e.g. Yahoo doesn't), then I'd suggest changing sync frequency to a higher number. I am not sure if that interferes, but 2 minutes is too frequent, IMHO.
If PUSH is working, you can safely set that back to the default 15 minutes.

Also, you can enable other folders for PUSH (as described in the FAQ). Inbox is enabled by default.

Push is most assuredly enabled per the configuration and shade notification. However, I read in another thread here that it is only for the Inbox, not other IMAP folders. Glad that's not the case. :)

I use GMail and it certainly supports IMAP push and perhaps it is working now (the previous issues were likely causing it to not work as expected). Will keep an eye on it, but it's been working much better since I marked the majority of my messages as read. Seems almost instant in most cases, which is what I would expect. May try setting sync back to 2 minutes and see what happens, but pretty happy with it the way it is now.

Thanks!
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: Kostya Vasilyev on November 01, 2016, 10:25:55 pm
If you've got push enabled, you will want to keep scheduled sync enabled (so it gets the other folders that don't have push enabled, by default only the Inbox does) and also acts as a watchdog on push mail.

But you don't need "every 2 minutes", this will drain the battery or will be throttled by Android. Every 15 minutes is just fine.

To enable push for other folders (not too many, please -- maybe 2-3 is fine):

Please long press the account -> options and folders -> folders.

Let it refresh.

Tap "a" folder, make sure to set it to sync ("Sync, plain folder" is fine, or for Sent/Deleted/Drafts, keep as "Sync as Sent", "Sync as Deleted", etc).

Then tap the settings icon to the right of folder name, and enable push for that folder in a popup window.
Title: Re: Seems like this latest version has a problem (red exclamations)
Post by: davidmark2 on November 02, 2016, 05:39:55 am
If you've got push enabled, you will want to keep scheduled sync enabled (so it gets the other folders that don't have push enabled, by default only the Inbox does) and also acts as a watchdog on push mail.

But you don't need "every 2 minutes", this will drain the battery or will be throttled by Android. Every 15 minutes is just fine.

To enable push for other folders (not too many, please -- maybe 2-3 is fine):

Please long press the account -> options and folders -> folders.

Let it refresh.

Tap "a" folder, make sure to set it to sync ("Sync, plain folder" is fine, or for Sent/Deleted/Drafts, keep as "Sync as Sent", "Sync as Deleted", etc).

Then tap the settings icon to the right of folder name, and enable push for that folder in a popup window.

No question the app at least thinks it is enabled for the one folder I monitor as it says so right in the settings (must have already did what you indicated). It's the root of a huge hierarchy of folders related to my automation system, so ideally push needs to work for it. Assume it does, but was previously foiled by the ID retrieval timeout. Again, I'd get the mail first and worry about the totals after; that really fouled things up for me and I wasn't using the app in any sort of undocumented way. Realize it was a rare case, but those are the ones that get you as an app developer. Glad we could finally get on the same page and figure it out, now I hope you will make the changes it demands in a future release.

Glad to hear that the other post I read was erroneous; stated that Inbox was the only one that could do push. Figured that was wrong, but seemed to explain at least part of the behavior I was experiencing. Red herring as it turns out.

I'll keep an eye on it and may well put it back to check every 15 minutes instead of 2. I agree that's all it should require.

Thanks again for what is truly an excellent app (that one bug notwithstanding).