Unable to sync Fastmail Calendars after 3.4.0.24 Upgrade

REPRODUCIBILITY (% or how often): Always
BUILD ID = OS VERSION (Settings > About product): 3.4.0.24
HARDWARE (Jolla1, Tablet, XA2,…): XA2
UI LANGUAGE: English
REGRESSION: (compared to previous public release: Yes, No, ?): Yes

DESCRIPTION:

Since upgrading to 3.4 I am unable to sync with my Fastmail calendar.

Calendar events fail to sync and I see this in the logs:

[D] unknown:0 - Starting process “/usr/lib/buteo-plugins-qt5//oopp/caldav-client” with plugin name “caldav” and profile name “caldav-sync-43”
[D] unknown:0 - New network state: true New type: “WLAN” ( 2 )
[D] unknown:0 - Network status:
[D] unknown:0 - Online:: true
[D] unknown:0 - Connection:: 2
[D] unknown:0 - attempting to register dbus service: “com.buteo.msyncd.plugin.caldav-sync-43”
[D] unknown:0 - Plugin “caldav” with profile “caldav-sync-43” registered at dbus “com.buteo.msyncd.plugin.caldav-sync-43” and path /
[D] unknown:0 - Process “/usr/lib/buteo-plugins-qt5//oopp/caldav-client” started with pid 25235
[D] unknown:0 - Client plug-in runner initialized
[D] unknown:0 - New network state: true New type: “WLAN” ( 2 )
[D] unknown:0 - Network status:
[D] unknown:0 - Online:: true
[D] unknown:0 - Connection:: 2
[D] unknown:0 - sync-ui dbus interface is getting called
[D] unknown:0 - Sync session started
[D] unknown:0 - ClientPluginRunner started thread for plugin: “caldav-sync-43” , returning: true
[D] unknown:0 - attempt to start sync session due to network session opened succeeded.
[D] unknown:0 - Sync status changed for account “43”
[D] unknown:0 - Primary profile path set to “/home/nemo/.cache/msyncd”
[D] unknown:0 - Secondary profile path set to “/etc/buteo/profiles”
[D] unknown:0 - Initiating config…
[D] unknown:0 - Sync running for 43
[D] unknown:0 - Init done. Continuing with sync
[D] unknown:0 - Authenticated!
[D] unknown:0 - “---------------------------------------------------------------------”
[D] unknown:0 - “Depth : 1”
[D] unknown:0 - “Prefer : return-minimal”
[D] unknown:0 - “Content-Length : 93”
[D] unknown:0 - “Content-Type : application/xml; charset=utf-8”
[D] unknown:0 - “URL = https://user:pass@caldav.fastmail.com/
[D] unknown:0 - “Request : PROPFIND”
[D] unknown:0 - “<d:propfind xmlns:d=“DAV:”> <d:prop> <d:current-user-principal /> </d:prop></d:propfind>”
[D] unknown:0 - “---------------------------------------------------------------------”
[D] unknown:0 - Process PROPFIND response.
[W] unknown:0 - The “PROPFIND” operation failed with error: QNetworkReply::NetworkError(ContentNotFoundError) : 401
[W] unknown:0 - “PROPFIND” request failed. 401 “Network request failed with QNetworkReply::NetworkError: 203”
[W] unknown:0 - Cannot find the calendar root for this user, guess it from account.
[W] unknown:0 - CalDAV sync failed: 401 “no calendar listed for detection”
[D] unknown:0 - Session finished: “caldav-sync-43” , status: 3
[D] unknown:0 - Clean up session for profile “caldav-sync-43”
[D] unknown:0 - Stopping the OOP process for “caldav”
[D] unknown:0 - Process “/usr/lib/buteo-plugins-qt5//oopp/caldav-client” finished with exit code 15

PRECONDITIONS:

Setup a Fastmail calendar account.

STEPS TO REPRODUCE:

  1. Setup Fastmail calendar account
  2. Try to sync

EXPECTED RESULT:

No errors and a updated calendar.

ACTUAL RESULT:

Errors and no calendar changes.

ADDITIONAL INFORMATION:

I have also tried to update the sync agent as mentioned here: After upgrade to 3.4.0.24 caldav sync stopped working but that didn’t help.

With since upgrading you mean that it worked OK on 3.3?

The FastMail calendar is a quite unique beast, I’ve been following its development from the beginning. Luckily, the product is fully open source.

The mixture of NetworkError 203 (along the lines of there was no calendar data, sorry) and 401 look odd. 401 makes me think of something common, but perhaps this number has a different meaning in CalDAV context or comes from somewhere else.

Can I ask a bit more information ? The log you provided clearly show the code path followed in your case : the server is not providing any information on the default user (or we didn’t ask the right question) and the location of his / her calendars. So the Buteo plugin is falling back on saved list of calendars. But this saved list is empty ! So two questions :

  • can you go to the account setting page and confirm that you can see a list of calendars there (or at least one if you have only one) ?
  • can you execute the following SQlite commands ?
    • cd $HOME/.config/libaccounts-glib/ go to the account database directory
    • sqlite3 accounts.db open the database
    • select * from accounts; list the stored accounts and their ids
    • you should see that account 43 is your Fastmail account (this is visible from the Buteo logs)
    • select * from settings where account == 43 and key like "calendar%"; to list all account settings related to calendars. What does it report ?

There should be a string array setting named calendars and two other string arrays named calendar_colors and calendar_display_names.

Yes, it was working when I was using version 3.3.

There are no calendars in the account settings page. Originally after the upgrade form 3.3 to 3.4 there was a list of calendars, but I removed that account and re-added the account to try and fix the sync issue.

I ran the sqlite3 commands you mention and I do see the list of accounts when running select * from accounts;. I don’t see any calendars under the select * from settings where account == 43 and key like "calendar%"; command.

That’s very weird that the account can be created without any calendars, I thought I fixed this in early 2020 already (see https://together.jolla.com/question/102729/rescan-for-new-calendars-on-caldav-server/, the latest comments in the first answer).

Let’s try to debug this again. Could you run the account creation from CLI to get debug messages ?

  • devel-su -p to get the right privileges.
  • jolla-settings to start the setting app, then go to the account creation page and setup a new Fastmail account for your calendars.
  • Copy-paste the debug output somewhere.

Thank you in advance !

Yep, the debug output is:

[W] unknown:0 - Account: setAccount() called with null account! Aborting operation.
[W] unknown:0 - writeProfileFile() called, forcing disk write: “/home/nemo/.cache/msyncd/sync/carddav.C
ontacts-44.xml”
[W] unknown:0 - writeProfileFile() called, forcing disk write: “/home/nemo/.cache/msyncd/sync/caldav-sy
nc-44.xml”
SailfishKeyProvider_storedKey(): error: no scheme or key found for provider/service
SailfishKeyProvider_storedKey(): error: no scheme or key found for provider/service
SailfishKeyProvider_storedKey(): error: no scheme or key found for provider/service
SailfishKeyProvider_storedKey(): error: no scheme or key found for provider/service
[W] unknown:0 - sendAuthenticatedRequest(): request error: QNetworkReply::NetworkError(ContentNotFoundE
rror) response code: 404 url: “https://caldav.fastmail.com
[D] onFailed:75 - failed to create account: Check the sign-in details and try again. Authentication fai
led for url: https://caldav.fastmail.com

I have checked so many times, the username and password are correct, I’m not sure why the authentication fails.

I did some more digging. I removed my contact sync (which works) and then re-added the carddave sync again. I see a similar error about the authentication failing, but after a reboot it works.

Hi, I’ve having the same problem with Fastmail calendar. After upgrading to 3.4.0.24, I’m unable to add new CalDAV/CardDAV accounts. The UI says it’s an authentication error and the output in the terminal is exactly the same as @alistair23 had but the reboot is not helping. However, when I did a factory reset which threw me to 3.2.0.12, I was able to add the account and after an upgrade to 3.4.0.24, it still works.

I’ve tested adding Google Calendar which also supports CalDAV and I get the exact same response. Does any sailor know whether it’s a know regression that’s being worked on? Or can some other user please confirm it’s not working on other devices either? This really makes the devices close to unusable for people needing *DAV. Thanks.

I think this is the same issue than the one reported here:
https://forum.sailfishos.org/t/kolab-now-and-sfos-3-4

I give a workaround there, maybe you can try it if you’re stuck without calendar… Besides, as said on the other thread, I’ll discuss this with @chris.adams next Tuesday on IRC channel #sailfishos. Lets see then what solution can come out.

1 Like

More detailed answer there: Kolab Now and SFOS 3.4 but in short, developpers have opened a bug on this issue and will investigate.

Is there any progress in the develoippers bug investigetion?
I miss my Calendars.

Yes, @chris.adams has mentioned in the Kolab thread, that a fix is done, but missed the 4.0 window, so will be included in 4.1.

1 Like

When is 4.1 expected?

1 Like

2021-05-27: 4.1.0.24 was released to all users of Jolla C, Jolla Tablet, Xperia and Gemini devices.

Now, my XA10 can reach my CalDAV-Server.
But my XA10 loaded all 9 Calendars in the CalDAV-Direktory under the same name “Calendar”. The Calender-Path is “/sync/hb-akt”. “sync” is the Direktory of the CalDAV-mashine and the Calendername “hb-akt” is the name of one of the 9 existing Calendars.
Before the last two updates the Path /sync/hb-akt includes only the one Calendar named “hb-akt”.
What is wrong?