Sync problem with default Android application
-
yes, I installed from scratch, actually the version that came with ubuntu 18.4 LTS, which was 2.3.something. I did not migrate anything.
-
I still can’t get z-push to work on any android device. Over the last few weeks I have:
- Changed the AS version in the GetSupportedASVersion() function of the imap.php. I tried ZPush::ASV_12 or ZPush::ASV_121 or ZPush::ASV_141 but no improvement
- Removed android encryption, reformatting data partition, no change
- Tried various devices, Android stock roms and LineageOS, none work
- Tried installing Z-Push from ‘final’ and ‘old-final’ repositories, no change
Bottom line is Z-Push does not work on any android device, mail app or any combination I can find. The symptoms are a bit different in each case, but none work:
- Using LineageOS Android 7.1.2, mail syncs, but then flashes and disappears as described above.
- With Android 4.4.4 default mail app, the mail synchronizes and does not disappear, but message body is blank and emails sent from the device arrive without any message body
- With Android 7.0 with Samsung mail app - configuration seems to succeed but no mail is visible on the device at all
Again, all these devices and Android versions synchronize perfectly with Z-Push 2.1.3 / Zarafa.
It might be important to note that the same flashing / disappearing happens to contacts and calendar items with LineageOS Android 7.1.2, not just IMAP mail. So this issue doesn’t seem to be particularly related to the IMAP backend.
My software versions for reference:
Ubuntu 16.04
Apache 2.4.18
PHP 7.0.28
Dovecot 2.2.22
Z-Push 2.3.9+0-0I am completely at wits end over this. My gut says maybe the issue is with the Apache configuration, character encoding or something like that.
At this point I would be willing to try just about anything to get this issue resolved. Does anyone have any suggestions? Manfred?
-
Hi enrice ,
@enrice said in Sync problem with default Android application:
yes, I installed from scratch, actually the version that came with ubuntu 18.4 LTS, which was 2.3.something. I did not migrate anything.
Did you try adding z-push repositories as described at https://wiki.z-hub.io/display/ZP/Installation? Did you make any changes to the imap backend config file?
Manfred
-
Hi @jsda
Z-Push 2.3.X has been deprecated. Current Z-Push stable is 2.4.4. It’s been a while since your last post, so providing Z-Push logs might give some better insight.
Manfred
-
Have you allowed for long enough sessions on your web server/firewall? Remember an active PING from a device to the server can last just shy of 1 hour. That is way more than a normal web server is configured for. Also, an active session, gathering emails can take longer than is typically allowed before the first byte is returned to the client.
A good suggestion when debugging an issue like this is to reduce this in the main config file
define(‘SYNC_MAX_ITEMS’, 512);to something like 128
-
Thank you Manfred for your continued attention to this issue.
I have rolled back my test server for a fresh start and installed z-push from repos and confirm it is now v2.4.4.
I also changed SYNC_MAX_ITEMS to 128 as liverpoolfcfan suggested, although since my test inbox never has more than a handful of emails, I’m guessing that makes no difference. But I do suspect some kind of timeout in the webserver or z-push configuration as being the root of this issue, just a hunch.
My test mailbox has just 1 unread message when I configure the default Android mail app in LineageOS.
Unfortunately I see the same behavior as before: The first synchronization seems to stall, but toggling the sync icon on the device restarts the syncronization and the inbox is synced. Then after sending a new message to the test inbox, synchronization seems to stall again. Toggling the sync icon restarts it, and all messages appear in the inbox. But then one or more will disappear, usually after viewing a message, or doing a manual refresh of the inbox.
I have WBXML logs for all this, but they are way too verbose to post here. I can clip sections if you tell me what to include.
FYI, I noticed each line in the log displays “… [DEBUG] [#unknown] …” where on earlier z-push versions it includes the username “… [DEBUG] [test.user] …”, not sure if that might be related to this issue or not.
Also, I noticed the apache configuration file at /etc/apache2/conf-available/z-push.conf does not include some of the directives seen in 2.3.x, and am wondering if that is intentional or maybe an oversight.
php_value magic_quotes_gpc off php_value magic_quotes_runtime off php_value register_globals off php_value short_open_tag on
Thanks again for helping.
-
Hi jsda,
you can upload the log somewhere and send me the link per PN. I’m not able to tell what to include as I don’t know what’s in the logs.
We removed those php_value settings to support fpm in webserver config: https://jira.z-hub.io/browse/ZP-1145.
Manfred
-
Hi Manfred, I have sent an external link via this site’s chat function, not sure if that is what you meant by ‘PN’. If there is another way to send a direct message, I can’t find it. Thanks.
-
Hi jsda,
yes, by “PN” I meant chat. I’ve downloaded the logs in case you want to remove them from the download site.
It has probably nothing to do with your issue, but did you update the Z-Push config? There are quite some log entries like:
The configuration parameter 'USE_X_FORWARDED_FOR_HEADER' was deprecated in favor of 'USE_CUSTOM_REMOTE_IP_HEADER'. Please update your configuration.
You have to replace USE_X_FORWARDED_FOR_HEADER with USE_CUSTOM_REMOTE_IP_HEADER.
I don’t see anything obviously wrong in the log, only a couple of strange things.
The device performs FolderSync quite often which is not usual (it might be due to the fact that you forced sync though).
Are there really only 4 folders? Isn’t there deleted items or wastebasket or similar folder? Isn’t there outbox folder? Please also post your imap.conf.php contents.
Manfred
-
@manfred said in Sync problem with default Android application:
Hi enrice ,
@enrice said in Sync problem with default Android application:
yes, I installed from scratch, actually the version that came with ubuntu 18.4 LTS, which was 2.3.something. I did not migrate anything.
Did you try adding z-push repositories as described at https://wiki.z-hub.io/display/ZP/Installation? Did you make any changes to the imap backend config file?
Manfred
Hi.
yes, I added them to install the latest stable version. I will again provide you with current logs.
I also fiddled around with some config settings. -
I gave the PHP scripts 256M, that seemed to have fixed the issue.
-
@Enrice said in Sync problem with default Android application:
I gave the PHP scripts 256M, that seemed to have fixed the issue.
hmm. not really. got better, but problem still remains…
-
status update: changed from Xperia Z5 Compact (Android Nougat) to Samsung Galaxy Xcover 4 (Android Oreo 8.1). Works like a charm. No problems so far whatsoever. Most email clients seem to use the same system services to do ActiveSync, so they all had the same glitch, with one exception: nine, as mentioned before. they may have their own implementation. the only thing that concerns me is, older z-push versions have been working on my old phone.