Author Topic: Struggling with Exchange Push mail  (Read 19249 times)

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: Struggling with Exchange Push mail
« Reply #15 on: December 30, 2016, 11:21:37 pm »
@Taepoong:
In the other thread I've already pointed out to Kostya's posting in this thread (just a few posts above), and he just quoted himself again.

Is there still something missing, I have to adjust?
Just in case it is not obvious from the quote above, - you can talk to your IT people and ask if they can enable "Push subscriptions". (I assume EWS works for you, it is only push that doesn't.)

Yet another option is to change your job and go to the place that has more cooperating IT people.  ;D 
Or, you can become the CEO and fire those IT folks.  8)

ewill

  • Newbie
  • *
  • Posts: 27
Re: Struggling with Exchange Push mail
« Reply #16 on: January 02, 2017, 05:04:28 pm »
I have just upgraded my phone to Nougat (Lineage/CM 14.1) and my push issues have returned.

I have checked and I have push enabled in all 3 places.

I set AquaMail to not be battery optimized

I have even deleted and re-set up my Exchange account.

I am on the latest development build (1.8.0-107).

Any ideas?

Edit: I was browsing some more and I saw that Doze under Nougat is a bit more strict.  As a test, I added a calendar event 2 minutes to the future in my google calendar - and the notification app that I use recognize the appointment and started the notification.  All this while the screen is off and within 2 minutes of adding the appointment to my calendar.
« Last Edit: January 02, 2017, 07:40:20 pm by ewill »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Struggling with Exchange Push mail
« Reply #17 on: January 04, 2017, 01:03:45 am »
Aqua Mail's push for Exchange uses Google Cloud Messaging, which is not supposed to be affected by Doze Mode.

If you post the "Exchange push device ID" from Aqua Mail's settings -> debug, I will check server logs (tapping that setting copies the value into the clipboard).

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/

ewill

  • Newbie
  • *
  • Posts: 27
Re: Struggling with Exchange Push mail
« Reply #18 on: January 04, 2017, 02:23:57 pm »
Aqua Mail's push for Exchange uses Google Cloud Messaging, which is not supposed to be affected by Doze Mode.

If you post the "Exchange push device ID" from Aqua Mail's settings -> debug, I will check server logs (tapping that setting copies the value into the clipboard).
Thanks. Exchange push device id:
b22efcbec3dc31f36f2b7c5b7941b7e5cff9ae22

I have it set meanwhile for a sync every 15 minutes. Let me know if you would like me to change that for testing purposes.



Sent from my LG-H811 using Tapatalk


Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Struggling with Exchange Push mail
« Reply #19 on: January 06, 2017, 10:21:55 pm »
Quote
Thanks. Exchange push device id:
b22efcbec3dc31f36f2b7c5b7941b7e5cff9ae22

Thank you.

Our server actually is receiving events from your Exchange server, and then routes them to Aqua Mail on the device, over Google Cloud Messaging.

( so I was wrong with my guess about the underlying reason )

This is very interesting. Most recent event was received just a few minutes ago.

There are new messages, messages being moved between folders, etc (I'll mention again that all that's there is abstract message and folder hashes, nothing more).

Please enable debug logging, with "raw session data" as described in my signature below (link), re-enable all three push options, and collect a log over say 2-3 hours.

Over this time, please make it so that there are actual changes (new messages, changes of read/unread state, etc), maybe make some changes like that 3-10 minutes after you start the log.

Then send the log file to support / at / aqua-mail / dot com please.
« Last Edit: January 06, 2017, 10:24:32 pm by Kostya Vasilyev, Aqua Mail »
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/

ewill

  • Newbie
  • *
  • Posts: 27
Re: Struggling with Exchange Push mail
« Reply #20 on: January 06, 2017, 11:43:09 pm »
Thanks for looking into it - I will not be able to do that for another day, but I will certainly collect the log and send it to you (making sure that I have the activity you described).

One question, I now have it set for a 15 minute sync (so that I get something) - during my logging period, should I change that to any other setting?


ewill

  • Newbie
  • *
  • Posts: 27
Re: Struggling with Exchange Push mail
« Reply #21 on: January 08, 2017, 03:11:01 am »
This is somewhat of a mystery.  I started the debugging and noticed that push seemed to be working.  The only thing that I changed is that I had uploaded the newest development version 1.8.0-112, set analytics to off and started debugging.   Push seems to be working now with debugging set to off.  I will continue to monitor and send a log if push stops.

Like I say, it is somewhat of a mystery, but if it is working, that is all good.

Thanks for the help.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Struggling with Exchange Push mail
« Reply #22 on: January 08, 2017, 11:18:45 pm »
Quote
This is somewhat of a mystery.  I started the debugging and noticed that push seemed to be working.  The only thing that I changed is that I had uploaded the newest development version 1.8.0-112, set analytics to off and started debugging.   Push seems to be working now with debugging set to off.  I will continue to monitor and send a log if push stops.

Like I say, it is somewhat of a mystery, but if it is working, that is all good.

Maybe your IT dept has removed the blocking.

Maybe installing a newer Aqua Mail version "fixed" the previously broken GCM (the app asks Google Play Services to regenerate its device token ID when it detects that it's been updated... and I've seen those tokens go bad, push messages not delivered).

Anyway, glad to hear about the improvement.
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/

ewill

  • Newbie
  • *
  • Posts: 27
Re: Struggling with Exchange Push mail
« Reply #23 on: January 09, 2017, 01:30:56 am »
Quote
This is somewhat of a mystery.  I started the debugging and noticed that push seemed to be working.  The only thing that I changed is that I had uploaded the newest development version 1.8.0-112, set analytics to off and started debugging.   Push seems to be working now with debugging set to off.  I will continue to monitor and send a log if push stops.

Like I say, it is somewhat of a mystery, but if it is working, that is all good.

Maybe your IT dept has removed the blocking.

Maybe installing a newer Aqua Mail version "fixed" the previously broken GCM (the app asks Google Play Services to regenerate its device token ID when it detects that it's been updated... and I've seen those tokens go bad, push messages not delivered).

Anyway, glad to hear about the improvement.

I don't think there was any blocking by my IT department - this all happened over the weekend.

However, the token ID seems to be a great possibility.  When I upgraded to Nougat, I did a fresh install and restored my apps a Titanium Backup.  Perhaps that process resulted in a bad token. 

Thank you very much for the help.

ewill

  • Newbie
  • *
  • Posts: 27
Re: Struggling with Exchange Push mail
« Reply #24 on: January 24, 2017, 06:02:44 am »
I just went through an episode of push mail not working - then it began working again.

The steps were as follows:
-I installed the latest development build (design refresh).  I didn't have much time to look through the differences and wanted to revert until I had a bit more time, so I restored (using titanium) the prior version
-About a day later, I notice that push was no longer working.

Then, I did a bunch of stuff:
-installed the latest development build
-erased cache and rebooted
-detached aqua from google play (using the Titanium utility)
-reinstalled the latest development build
-unchecked and rechecked all 3 places were push is configured
Push was still not working

Got tired of fooling with it and just set the sync to 15 minutes (from my typical setting of 24 hours - just relying in push).

Then, after nearly a day, push starts working.

Right now all is good.  If you want me to try to replicate the issue and send you a log when the issue is occurring, I can do that - however I will be traveling over the next few days and will not be able to do that immediately.

The one thing in common both times that push stopped is that it happened just after a restore (using titanium backup).

« Last Edit: January 24, 2017, 06:04:34 am by ewill »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Struggling with Exchange Push mail
« Reply #25 on: January 24, 2017, 10:03:04 pm »
Re: both times that push stopped is that it happened just after a restore (using titanium backup).

Maybe it's the wrong token issue too.

Play Services is supposed to notice app updates and re-generate the tokens, but I've seen it get out of sync with the cloud side of Google Cloud Messaging.
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/

ewill

  • Newbie
  • *
  • Posts: 27
Re: Struggling with Exchange Push mail
« Reply #26 on: January 24, 2017, 10:26:59 pm »
Token issue would explain it.

Is there a way to force a regeneration of the token?

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Struggling with Exchange Push mail
« Reply #27 on: January 24, 2017, 10:56:31 pm »
Re: Is there a way to force a regeneration of the token?

It's one of those magical things that is supposed to happen automatically.

Aqua Mail requests a new token when it sees a change in its own version, the phone's Android version or build number (e.g. 6.0.1 -> 6.0.1 with patches), etc.

But tokens are managed by Google Play Services, and I have seen them get "stuck" and the only way to fix it was to reinstall the app.

https://github.com/firebase/quickstart-android/issues/72#issuecomment-267410547
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/