Author Topic: [Resolved] Not synchronisation in background  (Read 20095 times)

dersie

  • Newbie
  • *
  • Posts: 14
[Resolved] Not synchronisation in background
« on: May 07, 2013, 07:18:53 pm »
Hello,

I just buy Aqua-Mail after a long time with K9-Mail. The main reason is the add-on for Sony smartwatch.

I setup for background synch every 10min. I have 2 accounts, 1 POP3 et 1 GMAIL. I don't use push mail.

Aqua-Mail does'nt synch in background ??? When I open Aqua-Mail, I see in red "Last sync at 16H40" for exemple (it is 17H30") If if synch with the sync icon the account synch correctly so all account setup is OK.

I don't know why it does'nt sync automatically ? I setup all parameter but I don'nt know what is wrong ?
My connection if wifi at this time and all it seem right ?
« Last Edit: May 20, 2013, 02:19:13 am by dersie »

dersie

  • Newbie
  • *
  • Posts: 14
Re: Not synchronisation in background
« Reply #1 on: May 08, 2013, 12:59:32 am »
It seem that Aquamail sync the account only when the screen is ON. Never sync when screen is OFF.

I setup sync every 5 minutes.

If I light up the phone and go on AquaMail app I see :



We see that it is 22H48, the last Time I open Aquamail was 22H40 and after phone go on sleep mode and the next schedule at 22H45 not happen.

With screen on at 22H50 AquaMail has sync the account.

Samsung Galaxy S : Android 4.2.2 CyanogenMod 10. Wifi always ON.

K9Mail or buit-in mail app sync without issue every 5min anytime even with screen off and phone in sleep mode.



« Last Edit: May 08, 2013, 01:07:51 am by dersie »

Thomas

  • Sr. Member
  • ****
  • Posts: 273
  • Just enjoying life...
Re: Not synchronisation in background
« Reply #2 on: May 08, 2013, 02:02:17 am »
How did you setup when AM can sync? When Android background sync is on/off, etc.
Have you Android Sync in general activated?
Be careful some provider kill your connection when the sync is less than 15 minutes.
Moto X - XT1058
Stock 4.4.4
Root, Faux Kernel, Boot-loader unlocked, etc. blabla ..

Samsung Galaxy Note 10.1 (N8013)
Gnabo Rom V7 - 4.4.2
Root, Boeffla's Kernel, etc. bla bla ..

dersie

  • Newbie
  • *
  • Posts: 14
Re: Not synchronisation in background
« Reply #3 on: May 08, 2013, 04:49:55 am »
sync even if "Auto-Sync" not enable. Sync at planified time = 5min. No Imap Push.

At home only wifi activated, no GSM connection activated (no 2G or 3G, like no SIM card)

Android sync only calendar and contact with one Gmail account but it does'nt know all others POP account.

Setting are like this example :





So auto-sync checked but maybe ignored by Aquamail ? It's different on Android 4.2

Account in Aqua Mail are sync when screen is ON.

I just unchecked "Test Network" because I have only wifi at this time and not GSM network.

It seem that it works now. I think that is option :

Sync even if "Auto-Sync" not enable that change on work or not.
the others : "Even background data not enable" or "Respect all" seem does'nt work ?

I'll definitely see if it works like this.
« Last Edit: May 08, 2013, 04:52:18 am by dersie »

dersie

  • Newbie
  • *
  • Posts: 14
Re: Not synchronisation in background
« Reply #4 on: May 08, 2013, 06:33:24 am »
Now I have still the red message from a last sync there are more than 1H with a setup sync every 10min.

I used K9Mail until yesterday and for more than 2 years and never problem to retrieve Email.

All review say that Aquamail is a fantastic mail app and in less than 1 day using, Aquamail seem not able to retrieve mail on scheduled time. it really is a big disappointment. K9mail is free and working and  AquaMail is paid and with big issue.

dersie

  • Newbie
  • *
  • Posts: 14
Re: Not synchronisation in background
« Reply #5 on: May 08, 2013, 08:34:44 pm »
It same for notification. Most notifications are not transmited. as I use the sony smartwatch that are very easy to see.

Even using with tasker for checking mail we have errors most ot the time to read account.

This is the only app of reading mail I see that has so many problems ??? I think it can not works on Android 4.2. All my others mail apps have no problem to read mail and send notification, so it is only an AquaMail issue.
« Last Edit: May 08, 2013, 08:50:38 pm by dersie »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12742
Re: Not synchronisation in background
« Reply #6 on: May 13, 2013, 03:04:46 am »
I'm running the app on two devices with 4.2, no compatibility issues there, let's not make it into something it's not.

The "last sync time" in red under the account means the app was having trouble connecting to the mail servers.

Please give me something specific to go on, so I can help you. Your incoming server settings would be a start (don't need the logins / passwords obviously, but please let me know server name / port / security type).
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

dersie

  • Newbie
  • *
  • Posts: 14
Re: Not synchronisation in background
« Reply #7 on: May 13, 2013, 04:57:54 am »
Hello,

It's very difficult to know what is happen ?

Very often I open Aquamail and I see the red message for the last sync wich have 1H or more late,  sync every 10min.

But every time I  push the power button, the screen go on but in locked mode. I see the blue icon of AquaMail, mean that sync in progress.  I wait until the icon disapear and after I unlock phone to open Aquamail, I have still the red message with fail sync. Every time, if I unlock phone when I see the blue sync Icon, the sync works without error and I have the time sync for now at this time. Also, every time I open Aquamail and I press the sync icon, all account are synched without error.

I changed the parameter "Délai d'établissement " à "Aucun" (none) and it seem that it work better than other value like 5,10 or 30s. Sometime the scheduled sync work for awhile and other time it does'nt work for 1H or more, execpt if I unlock and screen on the phone. I setup also parameter system for sync at "sync even if background data" is not enable. I try also with even if "Auto-sync" not enable. It seem that no change anything. Maybe better with the even if "Background data" not enable. But it seem that this variable are not same in Android 4.2. There are not your "Master kill sync", the account are different, see snapshot above.

I work at home with wifi only and not GSM function (airplane mode with wifi and bluetooth ON). In outdoor with GSM network it seem work without error.

My account are :
POP3 : pop.dersie.eu; security : all option works and I used all, at this time I'm on STARTTLS(tout accepter); PORT 110; no SMTP

POP3 : pop.wanadoo.fr; sécurité : non chiffrée; port 110; no SMTP. Sync every 1H.

2 Gmail account at @gmail.com sync every hour.







dersie

  • Newbie
  • *
  • Posts: 14
Re: Not synchronisation in background
« Reply #8 on: May 14, 2013, 02:20:24 am »
Monday May 13 at 23H00 I see that AquaMail has not retrieved mail since more than 1H. Red message in main windows. I start a Log to record that is happen.

At 00H08 Tuesday 14 I look anew on Aquamail main Windows and I see one more time a red message with 23:32 with last Sync (made manually)

I transfert the Log File hoping to find out why there was no sync between 11:32 p.m. and 0:08.

Maybe you can know what is happen.

Log file :
http://dersie.eu/Docs/Internet/AquaMail/log-AquaMail-Echec23H32a00H08.zip [nofollow]

You can just look at : pop.dersie.eu it is the main account.

EDIT
Other log file at 5H29 when Aquamail not synching since 05H10 (sync every 10min)

http://dersie.eu/Docs/Internet/AquaMail/log-AquaMail-Echec05H10a05H29.zip [nofollow]

And like every time, if I launch Aquamail (when I see the red message) and I press the sync button Aquamail check all account witout error.
« Last Edit: May 14, 2013, 07:36:49 am by dersie »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12742
Re: Not synchronisation in background
« Reply #9 on: May 20, 2013, 02:07:49 am »
Ok, from the first log, it's a connection error galore, one after another:

2013.05.13 23:03:27.558 +0200   AquaMail   [NETWRK.4289] Connecting to [pop.dersie.eu:110, tlsRelaxed]
2013.05.13 23:03:32.591 +0200   AquaMail   [NETWRK.4289] ***** ERROR: Unable to connect to [pop.dersie.eu:110, tlsRelaxed]
java.net.UnknownHostException: Host is unresolved: pop.dersie.eu

2013.05.13 23:03:33.357 +0200   AquaMail   [NETWRK.4289] Connecting to [pop.wanadoo.fr:110, none]
2013.05.13 23:03:33.383 +0200   AquaMail   [NETWRK.4289] ***** ERROR: Unable to connect to [pop.wanadoo.fr:110, none]
java.net.UnknownHostException: Host is unresolved: pop.wanadoo.fr

2013.05.13 23:03:34.246 +0200   AquaMail   [NETWRK.4289] Connecting to [imap.gmail.com:993, sslStrict]
2013.05.13 23:03:34.284 +0200   AquaMail   [NETWRK.4289] ***** ERROR: Unable to connect to [imap.gmail.com:993, sslStrict]
java.net.UnknownHostException: Host is unresolved: imap.gmail.com

2013.05.13 23:03:34.478 +0200   AquaMail   [NETWRK.4289] Connecting to [imap.gmail.com:993, sslStrict]
2013.05.13 23:03:34.481 +0200   AquaMail   [NETWRK.4289] ***** ERROR: Unable to connect to [imap.gmail.com:993, sslStrict]
java.net.UnknownHostException: Host is unresolved: imap.gmail.com

I believe this sync was "kicked off" by the device's connecting to WiFi (event based sync).

I think your WiFi connection is not quite ready (why Android sends a "connected to WiFi" event before it's fully connected is beyond me...)

Please trying increasing the "settle in" delay to give it more time.

Or, just try keeping WiFi on + use scheduled mail checking, not event based checking, as a test (besides, modern Android versions put WiFi hardware into deep sleep mode, so it's no longer a battery issue like it was prior to 2.3).

Then at 23:08, you checked mail "manually" and everything worked, the network was ready and everything's connected nicely.

Then at 23:11, the time "ticks" and my code sets an alarm for 23:21.

And then, as soon as the app starts syncing mail at 23:11, the firmware says that it's completely lost connectivity. You can see it in the log yourself:

2013.05.13 23:11:08.068 +0200   LostConnectionReceiver   {}{}{}{}{} onReceive ConnectivityManager.CONNECTIVITY_ACTION: ni = NetworkInfo: type: WIFI[], state: DISCONNECTED/DISCONNECTED, reason: (unspecified), extra: <unknown ssid>, roaming: false, failover: false, isAvailable: true,  isConn = false, isConnOrConn = false
2013.05.13 23:11:08.074 +0200   LostConnectionReceiver   {}{}{}{}{} onConnectionLost, EXTRA_NO_CONNECTIVITY is set

And then we go again with a full round of connection errors:

2013.05.13 23:11:09.993 +0200   AquaMail   [NETWRK.4467] Connecting to [pop.dersie.eu:110, tlsRelaxed]
2013.05.13 23:11:10.062 +0200   AquaMail   [NETWRK.4467] ***** ERROR: Unable to connect to [pop.dersie.eu:110, tlsRelaxed]
java.net.UnknownHostException: Host is unresolved: pop.dersie.eu

So, to reiterate, your device's connectivity to WiFi is unstable, or the firmware is lying that it is (the "lost connection" event).

One other suggestion I have, since you're running 4.2.2, is to go into the device's WiFi settings, then Menu / Advanced, and disable "WiFi Optimization" if you have that item (see the attachment from Galaxy Nexus 4.2.2). According to Google Engineers, these "Optimizations" are not 100% compatible with all WiFi equipment, and it's a good test to try and disable them.

PS - not sure if K9 would report these errors at all.

Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

dersie

  • Newbie
  • *
  • Posts: 14
Re: Not synchronisation in background
« Reply #10 on: May 20, 2013, 02:14:07 am »


One other suggestion I have, since you're running 4.2.2, is to go into the device's WiFi settings, then Menu / Advanced, and disable "WiFi Optimization" if you have that item (see the attachment from Galaxy Nexus 4.2.2). According to Google Engineers, these "Optimizations" are not 100% compatible with all WiFi equipment, and it's a good test to try and disable them.

PS - not sure if K9 would report these errors at all.

Thank you for your support ;)

It is exactly this issue. I try this since a few days and all is right :)

This option reduce the power of wifi and if your connection is poor it lost when the phone is sleeping. We don't see this issue if you are near the antenna or with a strong signal. Not easy to see because as soon as you unsleep the phone, the wifi power become normal and the transmission works fine without errors.
« Last Edit: May 20, 2013, 02:18:46 am by dersie »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12742
Re: [Resolved] Not synchronisation in background
« Reply #11 on: May 20, 2013, 02:36:36 am »
That's excellent!

According to Android developers at Google, this is a compatibility issue between some WiFi routers, and the drivers they get from Broadcom and other chip manufacturers for WiFi hardware.

https://code.google.com/p/android/issues/detail?id=9781

https://groups.google.com/d/msg/android-developers/3FvPZp5n2K0/xPzLn1ZbB8oJ

It's a really good thing that with 4.2, this deep power saving mode can be turned off.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/