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.

    davx5-debug.zip


  • 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.

  • admin

    @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?

  • admin

    @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.


  • @devvv4ever And here’s the adb log

    adb.zip

  • admin

    @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.


  • @devvv4ever I bit the bullet and reset the phone to factory. It’s taken me almost a day to get everything back as it was, but DAVx5 and ICSx5 seem to be working again. I’ve also got something like 6GB of storage space back.

  • admin

    @trevor-prinn It’s a pity that this was necessary, but it seems that this really has come from an update of the firmware in combination with very low disk space 😕


  • This post is deleted!

  • I had this same issue. I’m confident it is caused only by a lack of disk space, after removing a big video file, it immediately started working again.

    Once I figured this out I realized that I’ve had this issue before, about a year ago. That time I also spent a few hours, very annoyed, not being able to find the cause of this issue.

    I would very much appreciate it if the app would give any feedback on this. Why is there no error produced? I use the app so sparingly (usually it “just works” so I never have to open it) that I didn’t even notice there were no “progress bars” when refreshing the calendars. I skimmed through the debug info/logs, but did not see anything about disk space mentioned there.

    I would expect some kind of feedback when it can’t sync the calendars, right? I understand that in this case it probably succeeds in connecting with the server, but then fails when it’s actually downloading the new data, or handling this. But there should also be a check in place for that right? And a error message that gives some clue as to what has gone wrong?

    The calendar apps I use on my android phone both did show some appointments, but the appointments were a few weeks out of date, and did not match what I saw in thunderbird on my laptop, or in the webinterface to my calendar software. I guess that is still stored in the android calendar database?

  • developer

    Hi,

    @kingannoy said in Sync has stopped working after several years:

    I had this same issue. I’m confident it is caused only by a lack of disk space, after removing a big video file, it immediately started working again.

    Very interesting to hear. Didn’t know that little free space is a reason for not syncing. Probably the debug info should contain the free disk space, too.

    Once I figured this out I realized that I’ve had this issue before, about a year ago. That time I also spent a few hours, very annoyed, not being able to find the cause of this issue.

    Dont’ ask how many hours we have spent with that problem 😉 It’s one of the most frequent problems; and there is no clear solution for that. I would have never thought that the most complicated problem in app programming is to convince the operating system to actually start it.

    I would very much appreciate it if the app would give any feedback on this. Why is there no error produced?

    Because the sync is managed and started by Android. It should produce an error when it’s not able to sync. DAVx⁵ does not get any feedback or information that the system doesn’t fulfill its duties.

    I would expect some kind of feedback when it can’t sync the calendars, right?

    When DAVx⁵ would be started by the system, it could give some feedback…

Similar topics