[fixed with NC 12.0.1] Syncing issue with Thunderbird + Lightning

Nextcloud version: 12.0
Operating system and version: iOS 10.3.1

I have this simple problem, but I don’t know where to start to debug it: on an instance of NextCloud with 5 calendars, 2 of them don’t get synced on iOS. They appear in the list of calendars on the iPhone, but events on this calendar don’t show up. It is not related to their shared status (one is shared, one is not, and other working calendars are either shared or not).

I have no clue if it is related, but I noticed the discrepancy after I switched to HTTPS… I have already deleted the account altogether on the iPhone to start from scratch, and updated to NextCloud 12.0 to see if it would make any difference, to no avail.

Any idea where I could start to fix this issue?

Note that all calendars are working without any problem in the Calendar app as well as on Thunderbird/Lightning, so it might be an iOS issue, not a NextCloud issue. Still, I’d be happy to have pointers to resolve the issue.

Thanks,
Mathieu.

1 Like

Which cardDAV link did you use?

Thanks for your attention. I used:

https:<my.server>/cloud/remote.php/dav/principals/users/mathieu/

on port 443 (my server is secured, with a certificate).

But in the meanwhile, things got a lot more complicated (and I don’t think I have changed anything):

  • All calendars stopped working in Thunderbird: They’re all turned off, and if I try to turn any of them on, it briefly works before switching off again. The error message led me nowhere after a web search:

    Timestamp: 06/08/2017 01:26:53 PM
    Error: [calCachedCalendar] replay action failed: null, uri=https://[my.server]/cloud/remote.php/dav/calendars/mathieu/events/, result=2147500037, op=[xpconnect wrapped calIOperation]
    Source File: file:///usr/lib/thunderbird/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCachedCalendar.js
    Line: 327

  • On my iPhone, it seems that I have now some of the events showing up from the two problematic calendars! But I can’t make sense out of it. This week, for instance, I can see events from all of my calendars. If I go back two months in time, events from two calendars don’t show.

Could it be that there is an internal error in one or several events, that makes iOS and Thunderbird to run into problems with the calendars? Do you know if there is a way to check the integrity of calendars?

Thanks for any pointer, I feel completely in the dark with this issue.

(I have renamed the subject to reflects these recent developments)

What helped me a bit with iOS was to set the service discovery links (.well-known-stuff) in my webserver:
https://docs.nextcloud.com/server/12/admin_manual/issues/general_troubleshooting.html#service-discovery

I had a couple of syncing problems as well. In general, deleting and adding the account again helped. I wasn’t able to properly reproduce this issue. If you find a way to reproduce an error, you can submit a bug report.

I’m still experiencing the problem with Thunderbird (v45.8.0). I even tried with a completely fresh install of NextCloud (v12.0), with no difference: if I try to subscribe to a calendar using Lightning in TB, it is quickly disable and greyed out…

As suggested in this thread, I tried setting network.http.spdy.enabled.http2 to false, but it did not fix it. I am now wondering whether that could be related to OpenSSL (v1.0.1e-fips, which may not be enough).

Note also that on the same server, I also run an old instance of ownCloud (v8.2.9), which syncs the calendar without any issue (using HTTPS too).

Any feedback or idea greatly appreciated.

For the record, here is the complete list of messages and errors if I enable the calendar (before it greys out again):

(message) [calCachedCalendar] replayChangesOn finished.
(message) [calCachedCalendar] sync queue empty.
(message) [calCachedCalendar] Performing playback operation add on 0 items to [my-calendar]
(message) [calCachedCalendar] Performing playback operation modify on 0 items to [my-calendar]
(message) [calCachedCalendar] Performing playback operation delete on 0 items to [my-calendar]
(message) [calCachedCalendar] Doing changelog based sync for calendar https://[my-server]/cloud/remote.php/dav/calendars/mathieu/events/
(message) CalDAV: send: <?xml version="1.0" encoding="UTF-8"?>
<D:propfind xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/" xmlns:C="urn:ietf:params:xml:ns:caldav"><D:prop><D:resourcetype/><D:owner/><D:current-user-principal/><D:supported-report-set/><C:supported-calendar-component-set/><CS:getctag/></D:prop></D:propfind>
(message) CalDAV: Status 401 on initial PROPFIND for calendar [my-calendar]
(error) [calCachedCalendar] replay action failed: null, uri=https://[my-server]/cloud/remote.php/dav/calendars/mathieu/events/, result=2147500037, op=[xpconnect wrapped calIOperation]
Source File: file:///usr/lib/thunderbird/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCachedCalendar.js
Line: 327
(message) [calCachedCalendar] replayChangesOn finished.
(message) [calCachedCalendar] sync queue empty.

I went a bit deeper with this, but I’m still hitting a wall (no sync of the NextCloud calendar, which makes me very reluctant to upgrade my other ownCloud instance!). Here is what I tried:

  • Creating a new empty profile, with nothing added, except for the calendar. Same problem as described here: it doesn’t even get to the authentication step, and throws the messages and error just above.

  • I tried turning the option enabling calendar.network.multirealm to true, as suggested here for example. No difference…

Any suggestion (or pointer to debug this) would be really really appreciated. Thanks in advance!

Another piece of information which seems to blame Thunderbird and not NextCloud: I can synchronize to the faulty calendar account using Gnome Accounts + Calendar, and it seems to work without any issue… Probably time to file a bug in TB, or look for help on the side of Mozilla…

There is an authentication bug with some clients, and a fix for it (which will be included in NC 12.0.1):

1 Like

Thanks again for your help! I failed to identify if that was a bug related to my own issue… What would be the best way to install the fix? Switch to the daily or maybe beta channel? (and can I switch back to stable later if I do that?)

I would only try this patch specifically and then update, as soon as 12.0.1 comes out (was announced for the end of June, so it should come the next 2 weeks). For applying a specific patch, @jospoortvliet wrote a little howto:

Mmmh… I’m off to a rough start: although I do have NextCloud 12.0, 2 of the three files modified by the patch are absent from my install (apps/dav/tests/unit/Connector/Sabre/BearerAuthTest.php and build/integration/features/webdav-related.feature). I have to admit I am very unfamiliar with patch (but have a fairly good command of Linux), so I’m very unsure what to do with this patch.

Again, thanks for your guidance. Any pointer will be greatly appreciated.
(at this stage, I may as well wait for 12.0.1 to be released…)

I finally opened a bug for Thunderbird too, to see what they have to say about it there… I’ll keep both synchronized, if any useful development happens on any side.

These are files for automated testing, they are not packaged in the releases… So finally it’s only one file that changes, you can click on the raw-view of a file in github and download it:
https://raw.githubusercontent.com/nextcloud/server/913758dc283d510d7e2400d52280939ab2d97d36/apps/dav/lib/Connector/Sabre/BearerAuth.php

You can use this file to replace yours manually.

12.0.1 will have it, I checked the release schedule again, now it is early July (https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule)

3 Likes

Hallelujah!!! Thanks a lot for your help and guidance: I was able to update this one file on my NextCloud, and everything seems to work properly! I can finally use Thunderbird + Lightning again with my NextCloud calendars, sync works in both directions.

I will close TB’s bug and comment on the other thread (I have changed the subject of this thread accordingly). Again, thank you so much for helping me all along!

1 Like