nextcloud / server

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

Error when accepting a calendar invite on Thunderbird: `Processing message failed. Status: 80004005.` #17915

Open biva opened 4 years ago

biva commented 4 years ago

Steps to reproduce

  1. Receive a calendar invitation
  2. Click on accept
  3. Error happens: "Processing message failed. Status: 80004005."

Expected behaviour

The event should be added to the calendar and the answer sent to the organizer

Actual behaviour

I’m experiencing this on Mozilla Thunderbird 68.2.2. This problem happens when I receive an invitation. Sometimes, I see the HTML message (with the Nextcloud logo…). In this case, the error message 80004005 appears.

At some point, I don’t know why, the email looks different, with only one single table, with a blue row on top with the title of the event: when the email turns into this format, I can accept an invitation without any problem.

It happens if the person sending the invite is using Thunderbird, and is using a calendar on the same Nextcloud server. And it can also happen if the sender is not in my organisation. (using Outlook or Thunderbird, I don't know)

It might be related to the server managed scheduling mode: (on thunderbird, I have calendar.caldav.sched.enabled = false

In my config.php, I see: 'app_install_overwrite' => array ( 0 => 'calendar', ), Should I remove that?

I see related issues here:

Server configuration

biva commented 4 years ago

I think this log could be related: Sabre\DAV\Exception\BadRequest: Calendar object with uid already exists in this calendar collection.

/var/www/html/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Calendar.php - line 201:

OCA\DAV\CalDAV\CalDavBackend->createCalendarObject("27", "d8hifi2s08t ... s", "BEGIN:VCALE ... n")

/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096:

Sabre\CalDAV\Calendar->createFile("d8hifi2s08t ... s", "BEGIN:VCALE ... n")

/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525:

Sabre\DAV\Server->createFile("calendars/e ... s", "BEGIN:VCALE ... n", null)

<<closure>>

Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})

/var/www/html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:

call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])

/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:

Sabre\Event\EventEmitter->emit("method:PUT", [ Sabre\HTTP ... }])

/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:

Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})

/var/www/html/nextcloud/apps/dav/lib/Server.php - line 316:

Sabre\DAV\Server->exec()

/var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:

OCA\DAV\Server->exec()

/var/www/html/nextcloud/remote.php - line 163:

require_once("/var/www/ht ... p")
biva commented 4 years ago

After more investigation, it looks like the event can be accepted only if I manually sync the calendar. Step to reproduce:

  1. Receive the email: it is shown as an HTML page, with the Nextcloud button "Accept" in the middle
  2. Click on "Accept" (not the Nextcloud button in the middle, but the Thunderbird button, top right)
  3. Error message 80004005 appears
  4. Sync Calendars in Thunderbird
  5. Go back to the message: it is shown as the table mentioned above
  6. Click on the "Accept" Thunderbird button → it works

It should work in step 2 above, I shouldn't be required to go up to step 6

biva commented 4 years ago

No idea? To give you more detail:

biva commented 4 years ago

Does nobody meet the same issue? Any support?

j-ed commented 4 years ago

Does nobody meet the same issue? Any support?

That's exactly the point, this is the bug tracker for the development and NOT the Nextcloud help forum. Yo should search the forum first for any related issues, and if you cannot find an answer, you should raise your question there 😉

biva commented 4 years ago

@j-ed I already did, no answer there either https://help.nextcloud.com/t/accepting-invitation-with-thunderbird-lightning-and-nextcloud-12-0-5/26791/2?u=sisim I created a new topic if it can bring it up: https://help.nextcloud.com/t/error-when-accepting-a-calendar-invite-on-thunderbird/65117

biva commented 4 years ago

Does nobody meet the same issue? I don't see any answer neither here nor on https://help.nextcloud.com/t/error-when-accepting-a-calendar-invite-on-thunderbird/65117 :cry:

biva commented 4 years ago

For the record, the workaround is to let Thunderbird manage the invitations:

I don't close the issue because I still think it's a bug: there should not be such issues between Nextcloud and Thunderbird, which is one of the most important open-source email/calendar software

TooManyUsers63920 commented 4 years ago

Same issue here, but your workaround doesn't seem to work for me.

Double clicking the event in the calendar and selecting Accept does seem to work however.

Thunderbird 68.3.1 Lightning 68.3.1.1

I found other applications struggling with the same thing, i.e. DavMail to Exchange: https://sourceforge.net/p/davmail/bugs/651/

"The cause of the error is Microsoft Exchange's Calendar attendant. It automatically processes the invitation and adds it to the calendar on the server-side. On the client side (Thunderbird), this change is not known because the calendar is not yet synchronized. As a result, the client tries to add an event that has already been added, hence the error."

It looks like exchange does the same thing as Nextcloud: it processs the event. If you then try to accept in Thunderbird before syncing it will fail. Sync first and the message will show the event has already been processed.

0xphk commented 4 years ago

Thanks @Biva, the workaround in Thunderbird works for us.

Does anybody know if there is a similar option to set in Evolution Mail to get Invites accepted through mailclient?

bobbolous commented 4 years ago

Today I had the same issue. Invitation from a Outlook Client via Microsoft Exchange Server. Tried to accept/decline it with Thunderbird and various Nextcloud Calendars enabled. Above fixes did not work. But I noticed all my calendars are connected to the same mail adress inside Thunderbird. Removed mail adress from all but one calendar, now it works. In Thunderbird: Right click on calendar -> properties -> Email: none (german: "keine").

Seems to me like a Thunderbird issue.

Fuzl commented 4 years ago

Same issue for me too.

SHilser commented 4 years ago

Hi all, I also had the same error meesage. After some further searching I came across a thread in this google group mozilla.support.calendar (https://groups.google.com/forum/#!topic/mozilla.support.calendar/dGxYnEwdOBo). I only then realized that the invite causing the issue was an edited invite I had previously already accepted. Deleting the old event and then clicking again on the new "accept invite" as suggested in the linked discussion solved the issue for me. I hope this helps at least some of you.

jlorquin commented 4 years ago

Having the same issue. I'm receiving the invitations from Outlook 365 and Outlook client via Exchange. I'm going to try the workarounds.

frankbe commented 4 years ago

I just had the same issue with an invitation from Exchange. Version: 68.9.0 (64-Bit) on linux. Setting the calendar option "Prefer client-side email scheduling" (as @biva suggested) didnt't help either.

bjoernmartin commented 4 years ago

As @TooManyUsers63920 stated this is a clash of an out-of-sync TB client with the server.

"The cause of the error is Microsoft Exchange's Calendar attendant. It automatically processes the invitation and adds it to the calendar on the server-side. On the client side (Thunderbird), this change is not known because the calendar is not yet synchronized. As a result, the client tries to add an event that has already been added, hence the error."

It looks like exchange does the same thing as Nextcloud: it processs the event. If you then try to accept in Thunderbird before syncing it will fail. Sync first and the message will show the event has already been processed.

The same happened for us (in my company) reproducibly and by simply asking TB to sync the invite showed up. Accepting it after that worked.

So unless this can be fixed on the server side, e.g. by treating the additional event as a user's accept/reject feedback, I'd say this is a client issue: TB should re-sync when it encounters this error and restart its accept process.

EDIT: As @marcelstoer pointed out 3 comments down, the server actually refuses an update that should be idempotent. Hence it's a server issue or at least should be fixable on the server side.

metafarion commented 4 years ago

The same happened for us (in my company) reproducibly and by simply asking TB to sync the invite showed up. Accepting it after that worked.

This was my experience as well: It looked like a huge arcane problem, and then it fixed itself by auto-syncing while I was off making coffee.

tuxick commented 4 years ago

I have same problem with caldav on kopano. Using tbsync connector instead works ok. So i'd say it's indeed a client issue.

cyrilfr commented 4 years ago

I have the exactly same issue with Thunderbird 68.10.0 on Ubuntu 20.04.

marcelstoer commented 4 years ago

Also experiencing this and from what I understand this not a Thunderbird bug.

Thunderbird request PUT https://example.com/nextcloud/remote.php/dav/calendars/marcel/personal/1cpcu4agj0b5mjdu56gaaq2h2g%2540google.com.ics

Nextcloud/SabreDAV log

[webdav] Fatal: Sabre\DAV\Exception\BadRequest: Calendar object with uid already exists in this calendar collection. at <<closure>>

0. /..../nextcloud/3rdparty/sabre/dav/lib/CalDAV/Calendar.php line 201
   OCA\DAV\CalDAV\CalDavBackend->createCalendarObject("2", "1cpcu4agj0b5mjd ... s", "BEGIN:VCALENDAR ... n")
1. /..../nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
   Sabre\CalDAV\Calendar->createFile("1cpcu4agj0b5mjd ... s", "BEGIN:VCALENDAR ... n")
...

=> a PUT operation on an existing resource should be idempotent i.e. "ok to update an existing item with the same uid"

maluhub commented 3 years ago

We are struggling with it in our company too. This is a Thunderbird issue, change my mind. Thunderbird needs to sync calendar before sending invitation acceptance. This is because the file has changed on a server side. Imagine this scenario:

  1. Organizer sends an invitation for two attendants.
  2. Attendant 1 accepts - thunderbird sends an ics file with a change reflecting his acceptance.
  3. Attendant 2 accepts - thunderbird sends an ics file with a change reflecting his acceptance.

Now:

  1. If attendant 2 refreshes calendar and clicks 'accept', thunderbird sends an ics having both attendants accepted an invitation.
  2. If attendant 2 clicks 'accept' without refreshing calendar, his ics file doesn't reflect server changes. If NextCloud would allow it, this file would overwrite the file sent by attentand 1 and you would finish with an event where only second attendant accepted invitation.

This is why I think, thunderbird needs to sync calendars when you click 'accept', before it sends ics, or simply when you open the message containing ics file.

Summary: Thunderbird needs to synchronize in order to have the same ics as the one on the server so it does not overwrite any changes.

MatejKovacic commented 3 years ago

Same issue here, Thunderbird 68.10.0 (64-bit) on Linux with Google calendar.

MatejKovacic commented 3 years ago

Issue still here, however, workaround is not working:

Go to your calendar on Thunderbird
Right-click on your calendar name (on the left of the window)
Choose Properties
Check the box Prefer client-side email scheduling - I DO NOT SEE THIS OPTION
Click OK
kalaschnik commented 3 years ago

Same Issue. All suggested workarounds do not work. I’m using Thunderbird with TbSync (Lightning) for CalDAV, and I try to accept a Mail/Calendar invite.

timo12357 commented 3 years ago

We use Nextcloud and Thunderbird and had this very same problem with one of our employees who uses Thunderbird, TBsync and Lightning with Windows 10 against our Nextcloud calendar. The solution was to set all shared calendars to read-only. After that accepting invitations started working.

raphaelh commented 3 years ago

I've got the same problem with Nextcloud 20.0.4.0 on the server side, and Thunderbird 68.10.0 (64 bits) on the client side (Ubuntu 20.04.1 LTS)

image

Le traitement du message a échoué. État : 80004005.

In English :

Processing message failed. Status: 80004005

Some suggest checking the following option in the calendar configuration in Thunderbird : image

Choisir la planification des courriels côté client

In English :

Prefer client-side email scheduling

But the problem remains...

I'm available to help debug this issue, please let me know how :smile:

creopard commented 3 years ago

Same here with NC 20.0.7 and Thunderbird 78.7.1 (32-Bit)

biva commented 3 years ago

Do you confirm the same behaviour as described in this comment https://github.com/nextcloud/server/issues/17915#issuecomment-553333011 ?

raphaelh commented 3 years ago

I've found something which works for my setup. I have several calendars, and some of them were shared by other people on Nextcloud, and so were read-only (on Nextcloud)

I made all the other calendars read-only on Thundebird too: image

So only my calendar is read-write. And now it works :smile:

I debugged this issue thanks to our sysadmin, who after looking at the server logs, told me Thunderbird was trying to write in shared read-only calendars

achekhirov commented 3 years ago

I've found something which works for my setup. I have several calendars, and some of them were shared by other people on Nextcloud, and so were read-only (on Nextcloud)

I made all the other calendars read-only on Thundebird too: image

So only my calendar is read-write. And now it works smile

I debugged this issue thanks to our sysadmin, who after looking at the server logs, told me Thunderbird was trying to write in shared read-only calendars

thanks Raph seems to be working this way

pitjow commented 3 years ago

Thanks @raphaelh this is the solution for me :+1:

OndrejSirocka commented 3 years ago

I have two CalDAV calendars - one for tasks and one for a regular calendar. The task calendar is assigend to no email address and the regular calendar is assigned to the email address, where I'm receiving calendar invites (I did that in calendar settings).

The issue is, that I'm getting error 80004005 when I try to accept or decline a calendar invitation.

When I look at details in the error window, it seems that for some reason Thunderbird tries to accept the invite with my task calendar, which is not possible (the server refuses that). This is happening despite the fact the task calendar is not assigned to be used with my email. Based on my calendar settings, Thunderbird should be accepting the invite with the regular calendar.

I tried removing all calendars and then adding them in various orders, but always with the same result. I tried this on two devices with the same result. After deleting the task calendar (or setting it to read-only), invite accepting works fine again (but I don't find that to be a solution).

I'm running version 78.10.0

Thanks for any help!

franglais73 commented 3 years ago

Well as for many others I have the same issues with this by now famous error message 80004005 when clicking on the accept button. I am a user of 78.11.0

maluhub commented 3 years ago

Just like I wrote before - I am convinced this is Thunderbird issue. I posted bug report on bugzilla, please support it so it gains interest: https://bugzilla.mozilla.org/show_bug.cgi?id=1717401 (e.g. you can vote for it in details/vote).

fraenki commented 3 years ago

I tend to agree that this is a Thunderbird issue, Thunderbird should sync calendar updates before trying to add/update an event. Please vote on the Thunderbird bug report, as already suggested: https://bugzilla.mozilla.org/show_bug.cgi?id=1717401

franglais73 commented 3 years ago

Hi I would vote, but I don’t see how/where to do so

Thanks

tobiasKaminsky commented 3 years ago

You have to login/register on their bugzilla, which can be done via GitHub. Then you see a vote button.

Binarus commented 2 years ago

A quick note regarding the vote button on bugzilla. Right now, I've had a hard time to find it. It is hidden in the section "Details" at the top of the respective bug's homepage.

Blackclaws commented 2 years ago

I get this issue in a different situation.

Attendee is using Nextcloud as well.

yevon commented 2 years ago

Same here with webex calendar invites and when accepting other events, lots of problems with this.

fuzsin commented 2 years ago

Still same issue with new 91.10.0 (64Bit Windows 10 Pro) version.

eraguzin-bnl commented 2 years ago

I have this same issue on Thunderbird 91.9.1, using Manjaro Linux. The email address syncs with an Exchange server over the OWL add-on. Accepting an invite gives "Processing message failed. Status: 80004005."

monochromec commented 2 years ago

Issue persists with TB 102.1.2 and NC Calendar 3.4.2.

woolfg commented 2 years ago

I get this issue in a different situation.

* Attendee is invited

* Attendee accepts invitation

* Attendee is uninvited

* Attendee is invited again

* Attendee can not accept the invitation again into the same calendar, accepting into a different calendar works fine though. Synchronizing does _not_ help here.

Attendee is using Nextcloud as well.

same here:

marcel-touma commented 2 years ago

I got the issue resolved watching the ModSecurity log and whitelisting the rules ID numbers that where blocking the requests...

Blackclaws commented 2 years ago

I got the issue resolved watching the ModSecurity log and whitelisting the rules ID numbers that where blocking the requests...

Could you elaborate on that a bit? What specific changes did you make that resolved this? And should those changes be standard? If not why not?

linuxcube commented 2 years ago

image

I am facing this challenge as well, I am running office 365 and thinderbird 102.3.3(64-bit).

Does anyone found the solution to this issue, I unable to accept invites. I keep getting that error above. Thank you.

marcel-touma commented 2 years ago

I got the issue resolved watching the ModSecurity log and whitelisting the rules ID numbers that where blocking the requests...

Could you elaborate on that a bit? What specific changes did you make that resolved this? And should those changes be standard? If not why not?

Sorry the delay, I just got the alert on the last comment.

I've watched the modsecurity logs and found some rules where blocking some requests.

I'm using OWASP ModSecurity Core Rule Set V3.0 and the rules IDs I had to whitelist to my domain was 920280, 920420, 949110, 980130. With that, I was able to solve the problem.

I'm using cpanel.

Thanks!

msoutopico commented 2 years ago

I also get error Processing message failed. Status: 80004005 when I'm trying to accept an invitation received by email and add the event to the Google calendar through Thunderbird

szaimen commented 1 year ago

Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!