I’ve been trying to replace z-push 2.1.1 with 2.3.9 and, more recently, 2.4.0.
With both newer versions, arriving mails are sometimes pushed to the client, but sometimes not. The whole thing seemed totally random at first, but after several hours of testing I now narrowed it down to the following phenomenon:
If a new mail arrives while the Android device is online, the mail is pushed within a few seconds.
If a new mail arrives after the device has been offline for several hours, the mail is pushed to the device as soon as it goes online again.
If the Android device goes offline (for example WiFi disconnect), there is still a Ping command running on the z-push server until the timeout is reached. If a new mail arrives while that Ping command is still active, the mail is NOT pushed to the device after it goes online again.
But if another mail arrives now with the device being online, both mails are pushed within a few seconds.
So it seems that if there are any folder changes detected while a Ping command is still running, but the device is not reachable because it has been disconnected, these changes are never pushed until there are either some other changes in that folder (for example another mail) or a manual resync is triggered.
This seems kind of weird to me as it has always been working perfectly with z-push 2.1.1. Also it doesn’t seem to be an issue with the device because it happens both on Android 6.0 and 7.0 and both on Boxer and Nine.
I didn’t do any state migration from the old version or anything like that, just a plain new installation. The configuration files are pretty standard too, I didn’t change any of the default values except:
And for now, I also set
which mitigates the problem somehow, but it doesn’t seem like a sufficient solution and also means that if a new mail arrives within 60 seconds after the device went offline, that mail will still not be pushed.
10:05 device connecting to z-push server
10:06 device disconnecting, Ping command still running on z-push server, new mail arriving and apparently being recognized by z-push
10:08 device going online again and reconnecting, but mail not being pushed
10:09 second mail arriving, both mails are pushed to the device