Accepting invitation with Thunderbird/Lightning and Nextcloud 12.0.5

Nextcloud version (eg, 12.0.2): 12.0.5
Operating system and version (eg, Ubuntu 17.04): Debian 9 (Stretch)
Apache or nginx version (eg, Apache 2.4.25): Apache2 2.4.10
PHP version (eg, 7.1): 5.6.30

Actually I’m not sure whether my problem is related to Thunderbird or Nextcloud.

Short: Accepting a freshly arrived invitation with Thunderbird (52.6.0, 64-Bit) fails unless the calender has been synchronized in advance.

Long version:

  • User A and User B have their calenders on the same Nextcloud server (12.0.5)
  • User A send an invitation to User B which appears correctly in User B’s Inbox
  • User B accepts the invitation choosing a calender located on the Nextcloud server
  • Thunderbird opens two error message windows, both titled “An error has occured”
  • the message in one windows reads
Processing message failed. Status: 80004005
  • Other window
 Error Code: MODIFICATION_FAILED 
Description: Status Code: 2147500037

The request cannot be processed. Server Replied with 400

The output of your Nextcloud log in Admin > Logging:

    /var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Calendar.php - line 201: OCA\DAV\CalDAV\CalDavBackend->createCalendarObject('7', '04292f75-0c54-4...', 'BEGIN VCALENDAR...')
    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096: Sabre\CalDAV\Calendar->createFile('04292f75-0c54-4...', 'BEGIN VCALENDAR...')
    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525: Sabre\DAV\Server->createFile('calendars/7C53D...', Resource id #22, NULL)
    [internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
    /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method PUT', Array)
    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
    /var/www/nextcloud/apps/dav/lib/Server.php - line 258: Sabre\DAV\Server->exec()
    /var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 33: OCA\DAV\Server->exec()
    /var/www/nextcloud/remote.php - line 162: require_once('/var/www/nextcl...')
    {main}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'REMOVED',
  'passwordsalt' => 'REMOVED',
  'secret' => 'REMOVED',
  'trusted_domains' => 
  array (
    0 => 'REMOVED',
    1 => 'REMOVED',
    2 => 'REMOVED',
    3 => 'REMOVED',
  ),
  'theme' => 'REMOVED',
  'datadirectory' => '/clouddata',
  'overwrite.cli.url' => 'REMOVED',
  'dbtype' => 'mysql',
  'version' => '12.0.5.3',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'REMOVED',
  'dbpassword' => 'REMOVED',
  'logtimezone' => 'UTC',
  'installed' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_from_address' => 'no-reply',
  'mail_domain' => 'REMOVED',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'REMOVED',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'REMOVED',
  'mail_smtppassword' => 'REMOVED',
  'loglevel' => 2,
  'auth.bruteforce.protection.enabled' => false,
);

The output of your Apache/nginx/system log in /var/log/____:

10.x.x.1 - usera [02/Feb/2018:07:29:13 +0000] "PUT /remote.php/dav/calendars/XXXX-UUID-XXXX-A/personal/5298e278-d3e5-4f7f-86c9-fa84ac266c67.ics HTTP/1.1" 201 603 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 Lightning/5.4.6"
...
10.x.x.2 - userb [02/Feb/2018:07:29:53 +0000] "PUT /remote.php/dav/calendars/XXXX-UUID-XXXX-B/personal/5298e278-d3e5-4f7f-86c9-fa84ac266c67.ics HTTP/1.1" 400 6844 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 Lightning/5.4.5.2"
  • The problem does not occur when the calender was sync’ed manually in Thunderbird or when Thunderbird issued the REPORT request to the Nextcloud server before accepting the invitation
  • On a MAC under OSX High Sierra an error is thrown as well when one tries to accept the invitation with Apple Mail before the Apple Calendar sync’ed as well
  • The problem does not occur With a Nextcloud 11.0.2 Installation
1 Like

Something new about this? I’m experiencing this on TB 68.2.2 and NC16.0.5
Somehow, this problems happens when I see the HTML message with the Nextcloud logo… At some point, I don’t know why, the email looks different, with only one kind of 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 problem.

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

Receive the email: it is shown as an HTML page, with the Nextcloud button "Accept" in the middle
Click on "Accept" (not the Nextcloud button in the middle, but the Thunderbird button, top right)
Error message 80004005 appears
Sync Calendars in Thunderbird
Go back to the message: it is shown as the table mentioned above
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

Here is what I call the “HTML page”: clicking on the Accept button (circled red) doesn’t work (error message 80004005):


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

For the record, the solution is to let Thunderbird manage the invitations: Error when accepting a calendar invite on Thunderbird

  • 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

We stumbled into similar problems…

I think you also have to disable the “Send invitations to attendees” in the Groupware settings of NC.
(Otherwise some people get two email invitations. One from the client and one from the server, but not in a reproducible manner as far as I found out. See also Proper way of sync with Thunderbird/Lightning AND working invitations)

I think a disadvantage of this solution is, that now no invitations are sent via email when you make an invitation using the web interface… If the invited person is on NC the event appears there but when he is not he might never get any knowledge of the event…