Nextcloud syncing fails with the following in the journal:
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17421]: [D] unknown:0 - Sending request: "GET" to: "davs://next.poetaster.de/ocs/v2.php/cloud/user" data: ""
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17418]: [D] unknown:0 - Sending request: "GET" to: "davs://next.poetaster.de/ocs/v2.php/cloud/capabilities" data: ""
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17421]: [W] unknown:0 - Nextcloud "nextcloud-images" sync for account 5 finished with error: "User info request failed (http
status=0)"
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17421]: [C] unknown:0 - Nextcloud Images sync failed: Buteo::SyncResults::MinorCode(INTERNAL_ERROR) ""
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17418]: [W] unknown:0 - Nextcloud "nextcloud-posts" sync for account 5 finished with error: "Capabilities request failed (ht
tp status=0)"
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17418]: [C] unknown:0 - Nextcloud Posts sync failed: Buteo::SyncResults::MinorCode(INTERNAL_ERROR) ""
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17424]: [W] unknown:0 - The "PROPFIND" operation failed with error: QNetworkReply::NetworkError(ProtocolUnknownError)
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17424]: [W] unknown:0 - "PROPFIND" request failed. Buteo::SyncResults::MinorCode(CONNECTION_ERROR) "Network request failed w
ith QNetworkReply::NetworkError: 301"
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17424]: [W] unknown:0 - Cannot find the calendar root for this user, guess it from account.
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17424]: [W] unknown:0 - The "PROPFIND" operation failed with error: QNetworkReply::NetworkError(ProtocolUnknownError)
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17424]: [W] unknown:0 - "PROPFIND" request failed. Buteo::SyncResults::MinorCode(CONNECTION_ERROR) "Network request failed w
ith QNetworkReply::NetworkError: 301"
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17424]: [W] unknown:0 - Cannot list calendars, fallback to stored ones in account.
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17424]: [W] unknown:0 - The "REPORT" operation failed with error: QNetworkReply::NetworkError(ProtocolUnknownError)
Jun 01 11:54:51 Phone22 buteo-oopp-runner[17424]: [W] unknown:0 - "REPORT" request failed. Buteo::SyncResults::MinorCode(CONNECTION_ERROR) "Network request failed wit
h QNetworkReply::NetworkError: 301"
PRECONDITIONS:
A nextcloud server setup for syncing. This one is on linux (debian 11) version 24.
The name of the account may be an issue. It’s ‘poetaster.de’
The setup on device is ‘standard’
STEPS TO REPRODUCE:
Set up account at davs://next.poetaster.de/
configure Nextcloud account with two way syncing
try to sync
EXPECTED RESULT:
Files, Calendars, etc, syncing.
ACTUAL RESULT:
The error message above.
MODIFICATIONS:
Chum and Openrepos are installed, but this is the ‘stock’ device with no patches.
I have tried with the xperia 10iii yet.
ADDITIONAL INFORMATION:
Also tried https instead of davs.
rclone can sync to the same paths as are listed in the Nextcloud account settings.
CalDAV and CardDav setup seems to work to some extent (the calendars from nextcloud seen on jolla)
Whoever keeps promoting davs: needs to stop. It is not a known URI scheme, and plonking an s onto a known one does not make it “that, but with encryption”.
Hah. Stranger and stranger. The nextcloud notifications show up on the phone, but syncing does not work. What in the world does that mean?
Ah, and the calendars from nextcloud are shown under Manage calendars. syncing does not have any effect.
Just to make sure, I disabled everything but calendar. It does seem like the phone talks to the server as the apache logs show on selecting sync in the SFOS calendar:
Wait for msyncd to start, you can ignore most of the debug output. Then trigger a calendar sync via the account setting for instance.
The log is very verbose and long. Start from the end where the caldav plugin return an error to msyncd. If you want me to investigate, send me the full log.
To get back to normal operations, stop your command line msyncd and run as normal user systemctl --user start msyncd.
Thanks @dcaliste! I’ve got vdirsyncer running on the phone and just noted that although discovery works, it also has issues which look like some server side thing. Unfortunately I didn’t save every config change separately. sigh. But this is a usefull approach in any case! Thanks!
I do see errors on the nextcloud side (I had forgotten where the admin logs are
Sabre\DAV\Exception\UnsupportedMediaType: Validation error in iCalendar: A calendar object on a CalDAV server may only have components with the same UID.
EDIT: that error was from trying to vdirsync the ‘entire’ calendar ics file (with a local .caldendars/personal). The sync attempts from the phone’s calendar don’t generate errors in the logs.
Further up in the logs, after getting the etags of every incidences on the server, there is a line specifying how many changes are done locally. The debug line starts with “upsyncing local changes:” (if any local changes, otheriwse it may be “no local changes to upsync” or “Not upsyncing local changes”). Do you have it ? What are then the response of the server for every PUT ?
Sync process completes sucessfully but there may be non blocking error per incidence.
Something is very fugged. I manually deleted the duplicate entries (sql). Checked that the correct calendars (aka the ones that actually exist on nextcloud) are shown in the settings app. Open calendar and ‘manage calendars’. Initially the correct remaining (local only) calendars are shown. Then all the incorrect (ie. a calendar I removed on the server) calendars are shown again. Strange.
Uhg. But, I added the Personal ‘back’ to nextcloud and to THAT I can sync from the phone. But out of the default/Personal calendar I cannot sync.
EDIT: Just to satisfy my curiosity I did splits of the ical/vcard output and dumped those into vdirsync directories on device. Those sync just fine. As do REMOTE calendars from within the calendar. Contacts didn’t sync from the device either.
You can look at the account column in the calendar database for your duplicated entries : they belongs to two different accounts (one in 5 while the other one is 6, you can see it also with the syncProfile column).
I’m sorry, I don’t fully get what happened. What do you call “default/Personal”, is it the calendar with id 20e65251-bc72-4c52-8157-2eebd449ceb9 or with id dea24d7a-a34b-41b6-9b94-0bad079586e9 ?
If I get it well, you mean that a calendar that is created by default in Netxcloud, you can get events from, but sync are not sending events to it ? While if you create a new calendar on server, you have two way sync ? Which calendar is it in the above list that you cannot send event to ? You may notice that several calendars have flags = 215, which means being read-only (normally you can’t add event to them anyway from the UI, so I guess we’re not speaking of any of these).
I just realized that I had created those endpoints with caldav/cardav so that has nothing to do with the nextcloud account. well, except that they are the same.
I mean the Personal calendar that is created by default along with the Birthdays Calendar. I have a feeling that something goes awry when you have a unique id local ‘Personal’ and there is also one (also on nextcloud by ‘default’) called ‘Personal’ but obviously with it’s own UUID? I had tried deleting the one on nextcloud, but that did not seem to make a difference.
All of the calendars on nextcloud, if I create an event on device with that calendar, sync works. Just local ‘Personal’ is never synced up.
I just removed the car/caldav account to make sure that was not playing a role and looked in the db:
Ah things are getting clearer. If I understand well, Nextcloud calendars are properly synced both directions.
The remaining point I still feel unclear with, is this “Personal” calendar status. As far as I know, Jolla is creating only two calendars on device, the “Default” one and the “Birthdays” one. These ones are local to the device and obviously not synced with anything.
In the last list you provided, there are two calendars labelled “Personal”, one with the default flag (663 means “accept events, tasks and journals, is master, visible and default”) and one without (151 means “accept events, tasks and journals, is master and visible”), see sailfishos/mkcal/src/sqliteformat.h#CalendarFlag for the flag values. From your previous messages, I guess the first “Personal” is the default Nextcloud calendar, while the second one is the one you added on server and synced. You can check that they belongs to the same account from the SQLite database, with the column account.
If I’m still understanding properly, you can sync both direction with the second “Personal” calendar, while you can only downsync with the first.
So, add an event on device in the “first” Personal calendar (don’t confuse with the second one : /), and get a debug trace from msyncd. Can you then look at the upsync part in the log, particularly if there is a PUT request for this new event on device and what is the server answer to this request ?
Ok, so those are never synced anyway? If that’s the case then my dump (I have a full year of stuff on the local calendar) and vdirsync to remote was inevitable anyway.