nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.39k stars 4.07k forks source link

Thunderbird 60.x unable to use caldav/carddav #10134

Closed egal88 closed 5 years ago

egal88 commented 6 years ago

When trying to access calendar (Lightning) and addressbooks (CardBook) on a Nextcloud 13.0.4 server, Thunderbird 60.0b9 receives status 503 from the server and therefor cannot access any data.

Using Thunderbird 52.x everything works as expected.

Cross reference see https://bugzilla.mozilla.org/show_bug.cgi?id=1468912

The admin of our webserver tried the same with owncloud 7.0.4, but he did not test newer versions. Using this really old version of owncloud, Thunderbird 60.0b9 manages to access the caldav and carddav urls without any error. Since Nextcloud is a fork of owncloud, it might be, that the described issue is not Thunderbird related. Perhaps the bug has to be searched for in Nextclouds code.

brunt82 commented 6 years ago

When prompted for username and password I get the following warning: my-hostname is requesting your username and password. WARNING: Your password will not be sent to the website you are currently visiting! What does this mean really? Could this have something to do with the issue?

No, this means that you retrieves your e-mails from another site than your calendar data.

morph027 commented 5 years ago

Hm, even with the workaround it does not work for me (14.0.4 and TB 60.2.1):

"Exception":"OCA\\DAV\\Connector\\Sabre\\Exception\\PasswordLoginForbidden"

Edit: Nargh, 2FA was enabled ;) Okay, works now!

ftoral commented 5 years ago

I'm also affected. Workaround ok with network.cookie.same-site.enabled=false

Nextcloud server version: 13.0.1 Thunderbird: 60.3.0 Lightning: 6.2b6

ftorto commented 5 years ago

same issue, workaround works (network.cookie.same-site.enabled=false)

Nextcloud server version: 14.0.3 Thunderbird: 60.2.1 Lightning: 6.2b6

FreeMinded commented 5 years ago

same issue, workaround works (network.cookie.same-site.enabled=false)

Nextcloud server version: 14.0.4 Thunderbird: 60.2.1 (64bit on KDE neon) Lightning: 6.2.2.1

I had the problem only with newly added calenders. Older calenders from another NC13/14 instance worked all the time.

georgehrke commented 5 years ago

No further comments that it doesn’t work on Nc 13/14 with Thunderbird 60 please. We are aware and more and more comments won’t fix it ;):)

If you want to help us fix this, please grab the RC of Nextcloud 15 and verify that it fixes it.

Luegengladiator commented 5 years ago

I'm on 15 since Alpha, got Beta 1 and 2 now. The Problem is there too. Also with the workaround it doesn't work in Thunderbird 60.3.0 (64-Bit). Client is on Debian 4.9.130-2 Server is Raspian 4.14.79-v7+ #1159 armv7l GNU/Linux

EDIT: Changed to RC1, RC2 and RC3. Problem still exits. Removed all CalDAV Calendars and imported new on RC3. Working now without the workaround. Seems to be a DNS-Problem.

fuzsin commented 5 years ago

NextCloud 15 beta RC3, Thunderbird 60.3.2 (32-Bit), Lightning 6.2.3.2, Windows 10 (64-Bit) - same issue, workaround works.

Schroedingers-Cat commented 5 years ago

@Luegengladiator if you fixed the issue by removing the calendars and reimporting them. how do you end up with the conclusion that this is a DNS problem? I don't see any relation there.

@georgehrke as there are already two users reporting the issue still exists, is there anything we can do to help so this issue will get fixed?

Luegengladiator commented 5 years ago

@Schroedingers-Cat I removed the calendar referencing http://my.local.domain/path/to/calendar (nonworking) With http://127.0.0.1/path/to/calendar (working) So the only thing I changed was replace a Name with the corresponding IP. I think this is a local DNS Problem ;)

mbiebl commented 5 years ago

Tested with version 15.0.0 and Thunderbird 60.2.1 and 60.3.1 and was hoping this would be fixed. Problem is unfortunately not fixed so #11433 did not help unfortunately.

Would really be great to have some focus on this issue. This affects a lot of users and is very simple to reproduce.

georgehrke commented 5 years ago

Would really be great to have some focus on this issue. This affects a lot of users and is very simple to reproduce.

There is focus on this issue. You, being a developer yourself, should know best that simple to reproduce is not the same as simple to debug / simple to fix 😉

Having the same logic for same-site cookies work with all major browsers and other Calendar applications just fine, I tend to say this is a bug in Thunderbird / Lightning, but we are still figuring that out together with the people at Mozilla who wrote the Same Site Cookie code.

lyu0001 commented 5 years ago

Solved the problem via option --> General --> config editor --> network.cookie.same-site.enabled=false Nextcloud server version: 15.0.0 Thunderbird: 60.4.0 Lightning: 6.24 You need to add the correct calendar path. For example, the calendar named "nextcloud" http://xxx,com:8080/remote.php/dav/calendars/USER_NAME/nextcloud/

svenmauch commented 5 years ago

I have found a safer workaround: If you have changed it already set network.cookie.same-site.enabled to true again. Then set all third party cookies to be denied and add an exception for the domain your Nextcloud installation is running on.

rvanlaar commented 5 years ago

I have found a safer workaround: If you have changed it already set network.cookie.same-site.enabled to true again. Then set all third party cookies to be denied and add an exception for the domain your Nextcloud installation is running on.

@svenmauch Could you walk me through the steps to add an exception for nextcloud?

MichaIng commented 5 years ago

@rvanlaar Settings > Privacy > Web content > Exceptions > Enter https://your.domain.org[/nextcloud]

mnlipp commented 5 years ago

I have found a safer workaround: If you have changed it already set network.cookie.same-site.enabled to true again. Then set all third party cookies to be denied and add an exception for the domain your Nextcloud installation is running on.

Does not work for me (60.3.1).

megies commented 5 years ago

I have found a safer workaround: If you have changed it already set network.cookie.same-site.enabled to true again. Then set all third party cookies to be denied and add an exception for the domain your Nextcloud installation is running on.

Does not work for me (60.3.1).

Same. Doesn't work for me (60.4.0). Nextcloud 13

Schroedingers-Cat commented 5 years ago

The workaround by @svenmauch and @mjmunger does not work for me (TB 60.4, Nextcloud 13.0.8).

georgehrke commented 5 years ago

I created a topic for workarounds in our forum: https://help.nextcloud.com/t/workarounds-for-same-site-cookie-bug-with-thunderbird/44873

As the developer, I recommend to stick to the workaround described in https://github.com/nextcloud/server/issues/10134#issuecomment-411322692

Please take all further discussion about workarounds to that forum topic.

mbiebl commented 5 years ago

Is there a way to disable this functionality on the server side? I'm asking because this particular issue is what's currently preventing me from upgrading one of my nextclound instance to v15. This installation has quite a few users and a lot of them do use TB. Asking all those users to update/change their TB configuration is not really an option. If I could change the cookie handling on the server side and switch it back once fixed, that would be workable solution for me.

HorlogeSkynet commented 5 years ago

I can confirm that this is happening on the v14 too. It may be something related to the Thunderbird configuration, accounting for the second workaround not working as expected for everyone (?).

@mbiebl It is definitely not recommended to tweak cookie settings on the server-side, as it would endanger ALL your clients, including regular WEB usage, and not only Thunderbird synchronization.

EDIT : Still happening with Thunderbird v60.3.1 and Nextcloud v14.0.5

gohrner commented 5 years ago

Is there a way to disable this functionality on the server side? I'm asking because this particular issue is what's currently preventing me from upgrading one of my nextclound instance to v15.

Not upgrading NextCloud won't help you - at least V13 and V14 are affected as well.

You will have to keep your users from updating Thunderbird to V60, which in turn probably would be a bad idea from the security perspective. (Not even speaking of the difficulty of preventing users to update their software which possibly also auto-updates.)

So giving your users instructions of how to configure Thunderbird to work around the issue probably is the best approach.

j-ed commented 5 years ago

I had trouble with this function too in the past with Thunderbird v60.3.1, but after I exactly followed the tip of @svenmauch, I was successfully able to configure Thunderbird 60.4 with Lightning 6.2.4/Cardbook 33.5 and NC 14.0.4/.5. I would recommend to always give it a personal try before relying on others feedback. There are so many system in the wild, which are all configured differently, that you couldn't rely on it.

tleydxdy commented 5 years ago

the safer workaround didn't work for my setup (Thunderbird 60.4.0 arch, and Nextcloud 15.0.2), but the official one did.

rfc2822 commented 5 years ago

Just wanted to try some Thunderbird events with Nextcloud to notice TB doesn't work with NC anymore… cookies.same-site workaround helped. Which is the currently recommended workaround? Has this been fixed already (either in Thunderbird or in NC or in both)?

JtheBAB commented 5 years ago

Thundebird found the issue:

https://bugzilla.mozilla.org/show_bug.cgi?id=1468912

See latest comments.

rfc2822 commented 5 years ago

Ok thanks… I got it now working but I have to delete the credentials/cookies every time I want to see the other calendar. Confusing but it somehow works now.

georgehrke commented 5 years ago

@rfc2822 Hey, the recommended workaround is the one i mentioned further above.

Has this been fixed already (either in Thunderbird or in NC or in both)?

Looking at the latest comments in https://bugzilla.mozilla.org/show_bug.cgi?id=1468912, the issue was fixed on the Thunderbird side and I expect a fix to be released soon.

georgehrke commented 5 years ago

I'm closing this ticket, because it's an issue in Thunderbird.

Looking at https://bugzilla.mozilla.org/show_bug.cgi?id=1468912#c83, they already have a fix and consider releasing a new beta version of Lightning 6.7, so i expect this fix to be available soon.

darmbrust commented 5 years ago

Has anyone actually confirmed that things got fixed? It still doesn't work for me today, using thunderbird 60.7.0, CalDav 0.15.0.2, TbSync 1.7 against NextCloud 16.0.3. The TbSync folks seems to have closed it, just telling people to use the security hack workaround... https://github.com/jobisoft/DAV-4-TbSync/issues/41 but its really hard to track which bugs are actually tracking this, as so many were opened across different projects, then closed again, claiming fixed... yet it still doesn't work.

MichaIng commented 5 years ago

@darmbrust Why not just test it? I just did, switched network.cookie.same-site.enabled back to true (default), closed Thunderbird, removed all cookies via CCleaner (shame on me...), reopened Thunderbird, toggled and re-synced my Lightning calendars and CardBook and it works 😃. I also created a new calendar and successfully synced with Lightning. So as long as there is no cache influence or something I forgot, the issue indeed seems to be resolved (Lightning 6.2.8).

darmbrust commented 5 years ago

Well, I did test it, thats how I got here. I recently set up nextcloud... installed the calendar app today, and tried to sync it with thunderbird, and could not successfully link to my calendar. Not until I changed the cookie setting. And this was with a clean install that has never attempted this before. Happy to change it back and get debug logs... if there is something you want to see....

georgehrke commented 5 years ago

@darmbrust I can confirm that plain Thunderbird Lightning without TbSync works.

As pointed out in the mozilla bug report, it was a bug in the mozilla implementation. So if it's still not working in DAV-4-TbSync, perhaps open a new bug report there?

darmbrust commented 5 years ago

well, as recently as 15 days ago, people are commenting on that bug that it isn't fixed either.

Though, perhaps they are using the DAV plugin too.

darmbrust commented 5 years ago

So, I upgraded Thunderbird to 60.8.0. Tried adding my nextcloud calendar via the Network -> CalDev option directly in Lightening. It adds the calendar... but shows nothing. Sync does nothing.

No errors are shown to the user.

Error log contains stuff like: 503 Service Unavailable. [calCachedCalendar] replay action failed: null, uncaught exception.

Toggled network.cookie.same-site.enabled to false, and suddenly the calendar syncs.

So, yea.... probably on the thunderbird side, but still not fixed... and doesn't work at all without finding this obscure toggle.

Of course, Lightening also doesn't let you view or edit the events properly either... they all come up with garbage times if you try to view them... but guessing that is on the lightening side too, since they show up on the calendar GUI with the correct dates and times.

brunt82 commented 5 years ago

I cannot confirm any of your described behavior: Neither with Lightning nor with TBSync. I tested it with:

Maybe it is any other issue?

Benedikt81 commented 5 years ago

Works for me:

network.cookie.same-site.enabled = true

darmbrust commented 5 years ago

Maybe this is related to the issue, but I don't understand how people keep reporting they are testing with Lightning 6.2.8 when 6.2.5 is the newest version I see: https://addons.thunderbird.net/en-US/thunderbird/addon/lightning/versions/

The other difference in versions with my setup, compared to the recent works for me posts is that I'm on NextCloud 16.0.3.

Happy to grab logs / debug from whatever parts people would like to see.

darmbrust commented 5 years ago

Ok, guessing this is where the fix landed: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&product=Calendar&target_milestone=6.2.5.1&list_id=14828679

6.2.5.1, while my calendar is still at 6.2.5. According to this list: https://developer.mozilla.org/en-US/docs/Mozilla/Calendar/Calendar_Versions I'm like 5 versions behind on Lightning.... I know its not your issue, but what the heck is wrong with the Lightning distribution that they aren't pushing their updates to the central update site?

Sigh... reading more, it appears that they want you to uninstall the extension, cause its no longer necessary... as its supposed to be bundled. That is the stupidest update path I've ever heard of.... something tells me they will bite a lot of people with this, when they didn't manage the extension properly for users that already had it installed.... and they aren't properly updating the update site, so if you installed it from there, the older version overrides the integrated version.

I'll retest after sorting this out so I actually get the current version of lightning. If anyone else encounters this bug, it appears that the solution is to uninstall the lightning extension, so that thunderbird will go back to using the embedded one released with it, and not the out-of-date broken version mozilla has published on the update site.

MichaIng commented 5 years ago

@darmbrust ~What is wrong about the TB internal addons management? I installed Lightning from there and are automatically updated to the latest version since long time.~

Lol this addons web page gets even worse when you download from the main Lightning page: https://addons.thunderbird.net/en-US/thunderbird/addon/lightning/ You will get 6.2(.0) there 😄. ~However as said I see no reason to use this website for downloading+installing addons manually anyway, at least in case of a single home PC.~

EDIT

Okay now I am confused, TB internal addons management directs you to the same website. Somehow if offers slightly different versions there compared to opening in browser, found 6.2.5 offered indeed now instead of older 6.2(.0). So I am not sure now how I got updated to 6.2.8, if somehow the internal updater finds later versions or the new versions were revoked for some reason at a later time? Indeed very confusing...

darmbrust commented 5 years ago

Ok, there is just a whole lot of stupid with the Mozilla / Lightning / Ubuntu package maintenance folks. I installed Thunderbird using the package manager, but they stripped Lightning, which is supposed to be included. Lightning as published by mozilla is 5 versions out of date. If you uninstall the extension again, its just gone, because Ubuntu stripped it.

To get the proper, up-to-date version, you have to install it using the Ubuntu package manager, (assuming you let ubuntu install thunderbird in the first place) which restores the extension they stripped, and you get the proper 6.2.8 version.

After sorting that out, I can confirm that it is indeed fixed, when using the native remote caldav option. Though I am still seeing issues when trying to use the TBSync addon. But guessing that problem is over there... https://github.com/jobisoft/DAV-4-TbSync/issues/100

MichaIng commented 5 years ago

Okay, then finally things seem to match. Perhaps for @brunt82 the same works, as you're on v6.2.5 as well.

r3pek commented 5 years ago

Anyone here got it to work with thunderbird 68.x? I can't even add an account on TbSync :(

MichaIng commented 5 years ago

@r3pek I suggest you open a new issue for this to not mix things with the different 60.x bug that was discussed+solved here.

j-ed commented 5 years ago

@r3pek I would recommend to ask for help in the official Nextcloud help forum first, because this is repository is primarily used to track bugs 😉

MichaIng commented 5 years ago

I just realized that TB 68 is now released and not beta anymore. However it is common that not all plugins support new versions immediately.

Not sure about the Nextcloud plugin (Lightning/CardBook), will try as well later, but this should then discussed in a separate issue or indeed Nextcloud forum first to verify and collect some info.


EDIT: Just tested and everything I use works very well, Lightning and CardBook including CalDAV/CardDAV sync with my Nextcloud server. I recognised that there is no network.cookie.same-site.enabled setting anymore, but so far no problems without it, as expected due to fix.

xpressio commented 4 years ago

I still cannot get syncing to work in our lab (5+ users). We are on Nextcloud 14/15 using TB 60.x or TB 68.x. Can anyone confirm that upgrading to NC 16 definitively solved their issues?

In my experience the recommended fix using network.cookie.same-site.enabled ceased to work some months ago. It used to work in earlier versions of TB, I have tested various combinations of NC, TB and Lightning - to no avail...

Any experiences / suggestions would be much appreciated - using the web interface for now but usability is less then ideal.

j-ed commented 4 years ago

Any experiences / suggestions would be much appreciated - using the web interface for now but usability is less then ideal.

Unfortunately this is the bug tracker for the development and NOT the Nextcloud help forum. You should use the search function of the help forum to find an answer on your question first, before you raise a new request. I can personally confirm that the original problem described here has already been solved and Thunderbird 68.2.2/Cardbook 43.0 work like a charm with Nextcloud 17.0.1.

manoranjith commented 4 years ago

I was still facing sync issues with Nextcloud 19 and Thunderbird 68.10 (linux).

SOLVED: I was able to make it work using the TbSync and Provider for CalDAV & CardDAV plugins as suggested in this thread in nextcloud forum.