Not able to use calDAV or cardDAV with Fastmail
gnome-online-accounts 3.50.1
I was excited about explicit DAV support in Gnome Online Accounts and being exposed in Settings. I've tried setting up my Fastmail account for DAV, but only webDAV seems to work. Fastmail supports app-specific passwords for integrations, and provides an option for a combined web/cal/cardDAV option. Opening the Calendar, Contacts and Files option in Online Accounts seems to correspond here. So I was hoping setting this up with that single password should work.
I was confused at how to read Fastmail's documentation and map it to the dialog since DAV seems to be structured around a "primary" DAV address (the webDAV one) whereas Fastmail documents these features as all independent.
Now I want to note that for me I use a custom domain with Fastmail. This means my username to log in is USERNAME@CUSTOMDOMAIN.com
.
So first I tried "fastmail.com" in the Server Address field (instead of my custom domain) and the app password I got that supports all DAV protocols. However this results in a "Cannot find webDAV endpoint (Try Again)" toast.
Okay, rereading the dialog it says "Add a calendar, contacts and files account by entering your webDAV server and account details". Fair enough, looks like the "server address" is really a "webDAV server address". So let's use https://webdav.fastmail.com/
as they suggest. Okay, that didn't complain. Then it shows my username for this integration as USERNAME@webdav.fastmail.com
, which is a bit confusing, as my username for this service is USERNAME@CUSTOMDOMAIN.com
. Okay, I also want Calendar and Contacts to work so I check those boxes. A little confused by the previous fields for this and worried it won't work, but with no way to tell if I should've entered the other addresses, I forge ahead.
Okay, the first time I did this, it showed webDAV in Nautilus, and I could access files. Nothing in Contacts and Calendar however. It doesn't show up as another address book in Contacts' preferences. So I search online and find https://www.reddit.com/r/fastmail/comments/zd2rbb/using_fastmail_account_in_the_gnome_accounts/. First I confirm I'm running gnome-online-accounts 3.50.1. Perfect. Then I restart, still no syncing. I see no logs in dmesg
nor in Journal, okay, no idea how to debug.
So let's try with the other web addresses, again, doesn't seem to sync nor do I know how to check if things are syncing. There's no last update time in Calendar, Contacts, nor Online Accounts. So I'm stuck again.
Something I found while routing around in Fastmail's docs is that they support alternate usernames for systems that don't allow the @
symbol in usernames. I try with #
instead and got a segfault:
[ 1093.725062] gnome-control-c[5385]: segfault at 0 ip 00007f964803672a sp 00007ffc500e2300 error 4 in libgoa-backend-1.0.so.2.0.0[7f9648010000+2d000] likely on CPU 5 (core 5, socket 0)
[ 1093.725076] Code: d4 fd ff 48 8b 7b 50 48 89 85 b0 fe ff ff e8 bd f3 fd ff 48 8b 7b 58 49 89 c4 e8 b1 f3 fd ff 48 89 85 a8 fe ff ff 48 8b 43 20 <4c> 8b 28 4d 85 ed 0f 84 7a 02 00 00 41 80 7d 00 00 0f 84 6f 02 00
But then I just tried it again and it works. It also shows the complete username properly in the name of the account. However, when trying to access the webDAV share, I get an "Unable to access..." error: `HTTP Error: Not Found". Not certain what to do with that.
Now at this point I've also deleted a few account attempts trying to test and figure out the right way to do this. So now I have a second entry showing in Nautilus that doesn't correspond to an entry in Online Accounts, so I don't know how to get rid of it. Clicking on it gives another "Unable to access... error": The given volume was not found
. Deleting the last webDAV account I tried to add and then restarting Nautilus fixed this though.
#315 (closed) discusses that Fastmail should work, however nothing is mentioned in that issue of how to properly input the settings to use it. Looking through that code, the primary webDAV address is actually myfiles.fastmail.com, so trying that gets webDAV working in Nautilus. However, it doesn't get the calendar and contacts stuff working.
I figured out that running G_MESSAGES_DEBUG=all gnome-control-center
shows the g_debug
messages I saw in the MRs from the above issue. Running it, I don't see anything odd:
10:45:43.3179 GoaBackend[10447]: DEBUG: > OPTIONS / HTTP/1.1
10:45:43.3179 GoaBackend[10447]: DEBUG: > Soup-Debug-Timestamp: 1714553143
10:45:43.3179 GoaBackend[10447]: DEBUG: > Soup-Debug: SoupSession 1 (0x55e1fa885d70), SoupMessage 1 (0x55e1fabc6da0), GSocket 1 (0x55e1fbb592b0)
Doing the same for Contacts to see why the calDAV isn't showing up, I think these are the relevant logs from it:
(gnome-contacts:10903): folks-DEBUG: 10:51:20.458: individual-aggregator.vala:1539: Inserting links:
(gnome-contacts:10903): folks-DEBUG: 10:51:20.458: individual-aggregator.vala:1549: im-addresses
(gnome-contacts:10903): folks-DEBUG: 10:51:20.458: individual-aggregator.vala:1549: email-addresses
(gnome-contacts:10903): folks-DEBUG: 10:51:20.458: individual-aggregator.vala:1565: bryant@mai.rs
(gnome-contacts:10903): folks-DEBUG: 10:51:20.458: individual-aggregator.vala:1549: local-ids
(gnome-contacts:10903): folks-DEBUG: 10:51:20.458: individual-aggregator.vala:1565: system-address-book:pas-id-c9ea3fb40169437f5aa650f422b863059844adc0
(gnome-contacts:10903): folks-DEBUG: 10:51:20.458: individual-aggregator.vala:1549: web-service-addresses
(gnome-contacts:10903): folks-DEBUG: 10:51:20.458: individual-aggregator.vala:1699: Relinking Personas:
(gnome-contacts:10903): folks-DEBUG: 10:51:20.458: individual-aggregator.vala:1151: Emitting individuals-changed-detailed with 1 mappings:
(gnome-contacts:10903): folks-DEBUG: 10:51:20.458: individual-aggregator.vala:1161: ((nil)) → 43b20423bf16060786511338e042cf9ba9514002 (0x564efbd900e0)
10:45:43.3179 GoaBackend[10447]: DEBUG: > Accept-Encoding: gzip, deflate, br
10:45:43.3179 GoaBackend[10447]: DEBUG: > User-Agent: gnome-online-accounts/3.50.1 libsoup/3.4.4
10:45:43.3180 GoaBackend[10447]: DEBUG: > Connection: Keep-Alive
10:45:43.3180 GoaBackend[10447]: DEBUG: > Host: myfiles.fastmail.com
10:45:43.3180 GoaBackend[10447]: DEBUG:
10:45:43.4067 GoaBackend[10447]: DEBUG: < HTTP/1.1 401 Unauthorized
10:45:43.4067 GoaBackend[10447]: DEBUG: < Soup-Debug-Timestamp: 1714553143
10:45:43.4067 GoaBackend[10447]: DEBUG: < Soup-Debug: SoupMessage 1 (0x55e1fabc6da0)
10:45:43.4067 GoaBackend[10447]: DEBUG: < Server: nginx
10:45:43.4067 GoaBackend[10447]: DEBUG: < Date: Wed, 01 May 2024 08:45:43 GMT
10:45:43.4068 GoaBackend[10447]: DEBUG: < Content-Type: text/html
10:45:43.4068 GoaBackend[10447]: DEBUG: < Content-Length: 172
10:45:43.4068 GoaBackend[10447]: DEBUG: < Connection: keep-alive
10:45:43.4068 GoaBackend[10447]: DEBUG: < WWW-Authenticate: Basic realm="myfiles.fastmail.com"
10:45:43.4068 GoaBackend[10447]: DEBUG: < X-Content-Type-Options: nosniff
10:45:43.4068 GoaBackend[10447]: DEBUG: < X-XSS-Protection: 1; mode=block
10:45:43.4068 GoaBackend[10447]: DEBUG: < Content-Security-Policy: default-src 'none';
10:45:43.4069 GoaBackend[10447]: DEBUG: < x-frontend: frontend2
10:45:43.4069 GoaBackend[10447]: DEBUG: < X-Trace-Id: ti_c9d37b8f93d39294e2b8a0e82211a812
10:45:43.4069 GoaBackend[10447]: DEBUG: < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
10:45:43.4069 GoaBackend[10447]: DEBUG: <
10:45:43.4069 GoaBackend[10447]: DEBUG: < <html>
10:45:43.4069 GoaBackend[10447]: DEBUG: < <head><title>401 Authorization Required</title></head>
10:45:43.4069 GoaBackend[10447]: DEBUG: < <body>
10:45:43.4070 GoaBackend[10447]: DEBUG: < <center><h1>401 Authorization Required</h1></center>
10:45:43.4070 GoaBackend[10447]: DEBUG: < <hr><center>nginx</center>
10:45:43.4070 GoaBackend[10447]: DEBUG: < </body>
10:45:43.4070 GoaBackend[10447]: DEBUG: < </html>
10:45:43.4070 GoaBackend[10447]: DEBUG:
10:45:43.4071 GoaBackend[10447]: DEBUG: > OPTIONS / HTTP/1.1
10:45:43.4071 GoaBackend[10447]: DEBUG: > Soup-Debug-Timestamp: 1714553143
10:45:43.4072 GoaBackend[10447]: DEBUG: > Soup-Debug: SoupSession 1 (0x55e1fa885d70), SoupMessage 1 (0x55e1fabc6da0), GSocket 1 (0x55e1fbb592b0), restarted
10:45:43.4072 GoaBackend[10447]: DEBUG: > Accept-Encoding: gzip, deflate, br
10:45:43.4072 GoaBackend[10447]: DEBUG: > Connection: Keep-Alive
10:45:43.4072 GoaBackend[10447]: DEBUG: > Host: myfiles.fastmail.com
10:45:43.4072 GoaBackend[10447]: DEBUG: > User-Agent: gnome-online-accounts/3.50.1 libsoup/3.4.4
10:45:43.4072 GoaBackend[10447]: DEBUG: > Authorization: Basic [bryant@mai.rs:****************]
10:45:43.4073 GoaBackend[10447]: DEBUG:
10:45:43.5079 GoaBackend[10447]: DEBUG: < HTTP/1.1 200 OK
10:45:43.5080 GoaBackend[10447]: DEBUG: < Soup-Debug-Timestamp: 1714553143
10:45:43.5080 GoaBackend[10447]: DEBUG: < Soup-Debug: SoupMessage 1 (0x55e1fabc6da0)
10:45:43.5081 GoaBackend[10447]: DEBUG: < Server: nginx
10:45:43.5081 GoaBackend[10447]: DEBUG: < Date: Wed, 01 May 2024 08:45:43 GMT
10:45:43.5081 GoaBackend[10447]: DEBUG: < Content-Type: httpd/unix-directory
10:45:43.5081 GoaBackend[10447]: DEBUG: < Content-Length: 0
10:45:43.5081 GoaBackend[10447]: DEBUG: < Connection: keep-alive
10:45:43.5081 GoaBackend[10447]: DEBUG: < X-Content-Type-Options: nosniff
10:45:43.5081 GoaBackend[10447]: DEBUG: < X-XSS-Protection: 1; mode=block
10:45:43.5082 GoaBackend[10447]: DEBUG: < Content-Security-Policy: default-src 'none';
10:45:43.5082 GoaBackend[10447]: DEBUG: < Content-Disposition: attachment
10:45:43.5082 GoaBackend[10447]: DEBUG: < dav: 1, 2
10:45:43.5082 GoaBackend[10447]: DEBUG: < ms-author-via: DAV
10:45:43.5082 GoaBackend[10447]: DEBUG: < allow: COPY, DELETE, GET, HEAD, LOCK, MKCOL, MOVE, OPTIONS, PROPFIND, PROPPATCH, PUT, UNLOCK
10:45:43.5082 GoaBackend[10447]: DEBUG: < public: COPY, DELETE, GET, HEAD, LOCK, MKCOL, MOVE, OPTIONS, PROPFIND, PROPPATCH, PUT, UNLOCK
10:45:43.5082 GoaBackend[10447]: DEBUG: < x-backend: web3
10:45:43.5083 GoaBackend[10447]: DEBUG: < X-Frontend: frontend2
10:45:43.5083 GoaBackend[10447]: DEBUG: < X-Trace-Id: ti_938e7c01fdb6c03c319a793b9fdf9d30
10:45:43.5083 GoaBackend[10447]: DEBUG: < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
10:45:43.5083 GoaBackend[10447]: DEBUG:
10:45:43.5084 GoaBackend[10447]: DEBUG: goa_dav_client_discover(): (0x55e1fabc6da0, 200)
10:45:43.5084 GoaBackend[10447]: DEBUG: goa_dav_configuration_autoconfig_fastmail(): Fastmail WebDAV account: bryant@mai.rs
Calendar didn't show anything interesting in the logs that I could see.
Now, one last attempt: use myfiles.fastmail.com as the webDAV address and specify the calDAV and cardDAV addresses explictly: no change.
Could someone clarify how cardDAV or calDAV is supposed to work with Fastmail accounts in GOA?