Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
biva opened this issue Nov 12, 2019 · 76 comments
Assignees
Labels
1. to develop Accepted and waiting to be taken care of 28-feedback bug feature: caldav Related to CalDAV internals feature: dav

Comments

@biva
Copy link

biva commented Nov 12, 2019

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

  • PHP 7.3.11-1+020191026.48+debian101.gbpf71ca0 (cli) (built: Oct 26 2019 14:20:37) ( NTS )
  • mariadb Ver 15.1 Distrib 10.3.17-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
  • Nextcloud 16.0.6
@biva biva added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Nov 12, 2019
@biva
Copy link
Author

biva commented Nov 12, 2019

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
Copy link
Author

biva commented Nov 13, 2019

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
Copy link
Author

biva commented Nov 19, 2019

No idea? To give you more detail:

  • Here is what I call the "HTML page": clicking on the Accept button (circled red) doesn't work (error message 80004005):
    HTML version

  • And this is how it looks like after a manual sync (here, clicking on the Accept button (circled red) works).
    Frame Version

@biva
Copy link
Author

biva commented Nov 27, 2019

Does nobody meet the same issue? Any support?

@j-ed
Copy link
Contributor

j-ed commented Nov 27, 2019

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
Copy link
Author

biva commented Nov 27, 2019

@biva
Copy link
Author

biva commented Dec 5, 2019

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 😢

@biva
Copy link
Author

biva commented Dec 13, 2019

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

  • 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
  • Click OK

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
Copy link

TooManyUsers63920 commented Jan 3, 2020

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
Copy link

0xphk commented Jan 29, 2020

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
Copy link

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

This comment was marked as duplicate.

@SHilser
Copy link

SHilser commented Jun 2, 2020

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
Copy link

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
Copy link

frankbe commented Jul 1, 2020

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
Copy link

bjoernmartin commented Aug 14, 2020

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
Copy link

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
Copy link

tuxick commented Sep 18, 2020

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
Copy link

cyrilfr commented Nov 2, 2020

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

@marcelstoer
Copy link

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
Copy link

maluhub commented Nov 25, 2020

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
Copy link

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

@abalter

This comment was marked as duplicate.

@fuzsin

This comment was marked as duplicate.

@abalter

This comment was marked as spam.

@st3iny
Copy link
Member

st3iny commented Jan 16, 2024

I debugged this locally with mitmproxy and it turns out that Thunderbird attempts to PUT the accepted ics to an invalid name, because it doesn't know the name on the remote Nextcloud/CalDAV server (yet). The Nextcloud server responds with an error, as the UID is already existing because the invitation was already added to the invitees personal calendar by Sabre.

After syncing the target calendar manually once in Thunderbird it works. Now, Thunderbird knows about the personal copy of the event and successfully maps the UID in the email attachment to the remote event it just synced and it PUTs the accepted event with the correct name.

I investigated the possibility of just renaming the attached ics file but that wouldn't work because:

  1. The attachment is already named event.ics but Thunderbird PUTs it naively by its UID: remote.php/.../${UID}.ics
  2. The full URI of an event to be scheduled is unfortunately not available when the attachment is created:
    $message->attachInline(
    $itip_msg,
    'event.ics',
    'text/calendar; method=' . $iTipMessage->method,
    );

A possible solution would be to "hack" our backend by querying our database for the "correct" event by UID when Thunderbird PUTs and then update the actual event. Thunderbird could probably be recognized by its user agent. However, I don't recommend such a workaround as it might lead to other problems.

cc @miaulalala @tcitworld Perhaps you have some ideas about a better solution?

An example

Note: I assume that User B is syncing their personal calendar with enabled offline mode and disabled client side scheduling in Thunderbird.

  1. User A invites User B
  2. Email gets sent to User B
  3. Sabre copies event to personal calendar of User B
  4. User B accepts the email attachment in Thunderbird before syncing their personal calendar
  5. Thunderbird puts 9a31d409-6799-4232-aacc-e4936964b9bc.ics (attached event)
  6. Error 80004005 appears (UID collision)
  7. User B syncs their personal calendar in Thunderbird
  8. User B tries to accept the attached event again
  9. Thunderbird puts sabredav-1d4ee534-c7da-47ac-9134-b2b7d60273d3.ics (copy in B's personal calendar)
  10. It works

Intercepted error (steps 5 and 6)

HTTP/1.1 400 Bad Request

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
  <s:message>Calendar object with uid already exists in this calendar collection.</s:message>
</d:error>

@nextcloud-command

This comment was marked as resolved.

@nextcloud-command nextcloud-command added the stale Ticket or PR with no recent activity label Feb 17, 2024
@pohutukawa

This comment was marked as resolved.

@abalter

This comment was marked as resolved.

@nextcloud-command nextcloud-command removed stale Ticket or PR with no recent activity needs info labels Feb 19, 2024
@ChristophWurst ChristophWurst added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Feb 19, 2024
@Scattershot-Focus
Copy link

has anyone got a solution for this yet?
Everything was working fine until the latest update of TB, 115.5.2. Now my work calendar can not accept any invites.

@arabine
Copy link

arabine commented May 30, 2024

Same problem here since Ubuntu 24.04 upgrade (also tested on 115.11.1 tar package).

@st3iny
Copy link
Member

st3iny commented May 30, 2024

has anyone got a solution for this yet?

As mentioned above the workaround is to sync the target calendar first and then accept the invite.

@rmaziere
Copy link

rmaziere commented Jun 7, 2024

Same problem here since Ubuntu 24.04 upgrade (also tested on 115.11.1 tar package).

Same problem, same context.

@Quentin-ctrL
Copy link

has anyone got a solution for this yet?

As mentioned above the workaround is to sync the target calendar first and then accept the invite.

It's not working.

  • Thunderbird 115.10.1 (64 bits) Linux
  • Nextcloud 28.0.6.1 snap package

@pohutukawa
Copy link

I agree, it's not working. I've now given it a try to do these things on the Nextcloud web interface to work around, and I'm getting similarly an error/a failure there. There (obviously) is not even a sync involved.

As soon as a calendar event with a location (even creating a new one in the calendar web interface), I get an error.

This is on Nextcloud 29.0.2 with Calendar 4.7.6 (just tested again).

@st3iny
Copy link
Member

st3iny commented Jun 11, 2024

@Quentin-ctrL @pohutukawa Are you getting the following error in Thunderbird: Processing message failed. Status: 80004005."? If not, please open a new issue. My workaround only works for the mentioned error.

And please provide some more details if you open a new issue. It would be nice to know which error message you see and what exactly happens.

@RacinesDesign

This comment was marked as duplicate.

@joshtrichards joshtrichards changed the title Error when accepting a calendar invite on Thunderbird Error when accepting a calendar invite on Thunderbird: `Processing message failed. Status: 80004005." Sep 22, 2024
@joshtrichards joshtrichards changed the title Error when accepting a calendar invite on Thunderbird: `Processing message failed. Status: 80004005." Error when accepting a calendar invite on Thunderbird: Processing message failed. Status: 80004005. Sep 22, 2024
@brotkastn
Copy link

@st3iny can you confirm that sabre-io/dav#1563 would fix this issue? As far as i understand that issue, i dont think thats the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of 28-feedback bug feature: caldav Related to CalDAV internals feature: dav
Projects
Status: 📄 To do
Development

No branches or pull requests