Thanks for your report, but this is auplicate of #48. Please search through the issues before creating a new one.
Sync has stopped working after several years
I’ve been using DAVx5 to synch my contacts and between my Nextcloud server and my phone (several different phones in that time) for several years without any problems. Sometime in the last few days it stopped synching, and I can’t work out why. I haven’t upgraded the Nextcloud server recently.
A while back I installed ICSx5 to synch some calendars from band.us, which never really worked properly (it would it pick up when an entry was added on band, but wouldn’t get any deletions or updates until the phone was rebooted - it didn’t appear to be able to synch existing items except on reboot). A few days ago I noticed that ICSx5 was suddenly working properly (except that the automatic synchs weren’t happening), and at the same time that nothing was being synched on my nextcloud calendars, in either direction.
At that stage the calendars were still visible in my calendar apps (both Business Calendar and the built in Calendar app). I tried uninstalling ICSx5 in case the 2 apps were tripping over each other somehow, but that made no difference. Eventually, after trying everything else I could think of, I tried uninstalling and reinstalling DAVx5. Whenever I set up the account again, either by entering the details or using the Nextcloud app (I’ve done this a dozen times today) I see the Contacts and Recently contacted list under CARDDAV (I’ve ticked Contacts) and all of my Nextcloud calendars under CALDAV (I’ve ticked several of them), but they don’t appear in the Calendar apps and almost all of my contacts have disappeared. No amount of manual synching seems to do anything.
I’ve been through the FAQs as well as I can and, as I say, it has worked perfectly for years. I updated the contacts and calendar apps on Nextcloud recently but I can’t remember if that was just before it went wrong.
The Nextcloud server is running on an odroid machine on my LAN. Obviously, the app is able to connect to it because it can see the list of calendars. The server is running Nextcloud 21.0.2, the Contacts app is 4.0.2 and the Calendar app is 2.3.3.
The Calendar pane in Thunderbird on my Windows 10 machine is able to see the Nextcloud Calendars and edits to the entries as usual using TbSync, so I think the server is working OK.
Sorry, forgot to include the phone info. It’s a Samsung Galaxy A20e running Android 11.
I’ve just remembered that I have an Asus tablet with DAVx5 on it as well, set to use the same account. I’ve checked it, and that seems to be working fine, so extremely unlikely to be a server problem.
@trevor-prinn We’ve another report like yours, also having the samsung a20… I think they ruined somethin with the Sync Framework in the latest Android update.
The “problem” is that DAVx5 is embedded into the Android Sync Framework (like many other apps) which calls the DAVx5 sync process at a scheduled time. DAVx5 does never run the sync on its own - it must be always called by the system. So if you’re clicking the Sync button DAVx5 sends a request for a high priority sync to the Android system (=the Android Sync Framework) and then this framework runs the actual Sync process by DAVx5 that synchronizes the data. If this framework is broken (like it seems) no sync can ever be run…
In your debug info I can also see that no initial sync has been ever performed (no timestamp present). On initial sync the calendars and address books are created and then filled with data while syncing.
Do you also use the Email app by Samsung on this device? Does it sync?
@devvv4ever I hadn’t even noticed there was a Samsung email app on there. I use FairEmail (which works fine). Do you want me to try out the Samsung one and see what it does?
@trevor-prinn it would be interesting, yes.
It would also be very helpful if you can manage to create system logs to see what happens when you press the sync button (the verbose logging function of DAVx5 only logs the sync process itself - but since it is never called the logging function of DAVx5 in this case is useless because we don’t see any relevant things). There is a short guide here to perform adb logging:
https://www.davx5.com/faq/how-to-debug (Android Debugging section)
@devvv4ever I don’t think I’ll have time to see to it today, but I’ll get the info to you when I can.
@devvv4ever I’ve managed to check the Samsung email app. It is kind of working, but only synchs when I actually fire up the app. It’s not doing the periodic synch that I set up in it.
I’ll try and do the logging later today.
@trevor-prinn Thank you for providing the adb logs. The process seems pretty normal - nothing logged which would indicate unusual activities… How much free disk space do you have on your root folder?
BTW: Another person solved the exact same problem by making a factory reset of the device. I know thats hard and time intense, but if you rely on DAVx5 it may be worth considering.
@devvv4ever It’s about 97% used at present. 31.25 of 32GB. The more apps I move off onto the SD card the more space the system seems to use.
I may have to try resetting it, but it might take a while to get it all working right again afterwards.
One thing I find odd is that ICSx5 is almost working right. The automatic timed synchs don’t happen, but I can make it synch manually. Is the process for that so different?
@devvv4ever Actually, ICSx5 has stopped updating now, even when I do a manual synch. The only way I can get it to update is to delete the subscriptions and re-create them.