We have moved to a new Sailfish OS Forum. Please start new discussions there.
23

CalDAV calendars get lost when the sync server isn't available

asked 2016-08-19 17:47:05 +0300

Fellfrosch gravatar image

updated 2017-07-22 10:23:42 +0300

well all is said in the headline. The calendarserver is an owncloud server. Anyone else has that problem? I experience this behavior on two devices.

Edit: The problem is still there with 2.0.4.13. I can better handle it, because Jolla finally implemented the possibility to sync inside the calendar app. But pleeaaase fix that. It's not the intention of a caldav calendar server to be available all the time.

Edit II: Problem still exists under 2.0.5.6 Edit III: Still existent on 2.1.0.11

edit retag flag offensive close delete

Comments

Maybe it fits to caldav calendars gone after a while. It could be, that my radicale server wasn't available too.

jolladiho ( 2016-08-20 19:06:38 +0300 )edit

I have to look if that is the same problem. But I don't think so. I never experienced such problems before. If I set Sync on manual all is fine. If my Own Cloud Server is available there are no problems. Only if I am on Autosync and my Server is not reachable the calendars disappear. And it's not only that the dates are gone. No the complete calendars are gone and you can't see them under "manage calendars"

Fellfrosch ( 2016-08-21 22:04:05 +0300 )edit

Update: Also my Tablet looses the calendars. So now it's three devices. I have on one device disabled the option to sync automatically when a date is generated or edited So it is now just syncing every 30 Minutes. This one runs now stable since nearly a day. I will report if this indeed does the trick or if it is just random behaviour.

Fellfrosch ( 2016-08-22 12:15:17 +0300 )edit

Seems to be random behaviour. Just lost the calendar again. It's strange, because as soon as the server is available again. The calendars reappear and stay there for a while. Thinking about downgrading my devices to 2.0.1.11 again. Unfortunately that probably will not work with Jolla C.

Fellfrosch ( 2016-08-23 14:56:00 +0300 )edit

Yes, seems to be a bit different from the other issue. I did not get back the calendars with the existing account. Had to create a new one.

jolladiho ( 2016-08-23 20:48:17 +0300 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2017-08-24 12:59:23 +0300

updated 2017-08-26 15:52:20 +0300

Sorry, not an answer, but a tentative to find the root of the problem.

After the work of @chris.adams on the concurrent access on the clean flag file, the disappearance should not appear anymore. But it does for some. Let's investigate.

Can anyone with the disappearance issue still happening reports the content of the file located in /home/nemo/.local/share/system/privileged/Sync/caldav.ini, before sync and after sync, in both senarios where the server is reachable or unreachable. It should be true for all account ids.

Additionally, can anyone also report the log of msyncd when the server is not reachable. Particularly the lines near the answer with the network error reply.

Thank you, hopefully we can find the root of the issue.

From a technical point of view, looking at the source in buteo-sync-plugin-caldav, there are some possible roots for calendar deletion:

  • Network answer is ContentNotFoundError (server is reachable and reply that calendar has been deleted upstream), see src/notebooksyncagent.cpp#720, and lines 351 and 440.
  • The flag in the caldav.ini file is present but not true, so on startup of sync action, the calendars are deleted, see src/caldavclient.cpp#201. Then if server is not reachable, the calendars will stay deleted of course otherwise, they will be recreated.
  • On sync finished, if it is first sync and there are some errors, the calendars are deleted also, see caldavclient.cpp#387. The first sync status has itself two causes, either the calendars have been removed because of clean flag (cf. latter point), or there is no last succesfull sync as found in file /home/nemo/.cache/msyncd/sync/logs/caldav-sync-xx.log.xml.

2017/08/26 edit: I think, I've found the root cause: when on autosync, there may be no last successfull sync in the caldav-sync.log.xml file because only the last five entries are kept. Which means after five failed attempts to contact the server, the plugin switch to the clean sync and delete the notebooks. I'll discuss with @chris.adams on Monday on the best way to correct this.

edit flag offensive delete publish link more

Comments

1

I'll have a look, if I can spend some time on testing next weekend.

Fellfrosch ( 2017-08-24 15:57:51 +0300 )edit
1

Ok, great thank you. You may also give a look to the two files (caldav.ini and xx.log.xml one) to see if you can spot unexpected content there.

Damien Caliste ( 2017-08-25 12:13:46 +0300 )edit

With your edit in the post, I assume, that i don't have to test anymore?

Fellfrosch ( 2017-08-29 10:11:02 +0300 )edit
2

@Fellfrosch, exactly ;) I'm testing two patches currently. If they work well, I'll submitted them next week. Thanks for your patience !

Damien Caliste ( 2017-08-30 16:17:21 +0300 )edit
Login/Signup to Answer

Question tools

Follow
9 followers

Stats

Asked: 2016-08-19 17:47:05 +0300

Seen: 899 times

Last updated: Aug 26 '17