Can't sync calendar with external apps (only web interface works)

Nextcloud version (eg, 12.0.2): 13.0.5
Operating system and version (eg, Ubuntu 17.04): Linux (kernel 3.10.0-714.10.2.lve1.4.74.el7.x86_64)
Apache or nginx version (eg, Apache 2.4.25): 2.4.34
PHP version (eg, 7.1): 7.2.8
PHP info:

The issue you are facing:

I have installed Nextcloud (new install) on my shared hosting. I can log in fine via the web interface. I cannot get it to work with Thunderbird or the Android app. Thunderbird just asks for the username/password over and over. The Android app comes up with “Access failed. Operation finished with HTTP status code 401(fail)”. If I intentionally put in the wrong password in the Android app, it comes up with “Wrong password” so clearly it is authenticating.

As I am using Thunderbird 60, I have used the network.cookie.same-site.enabled workaround. All my searches for how to fix this have proved fruitless. The only things I have been unable to try is altering the vhost file which I cannot do as I am on shared hosting. My IP is not blacklisted (bruteforce_attemps) and there is no whitelist section under Settings > Security so I cannot add my IP there.
Help much appreciated! :slight_smile:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Install Nextcloud (new, fresh installation)
  2. Add calendar URL to Thunderbird/Install Android app and try to log in
  3. Repeatedly beat my head in frustration when neither work no matter what I try.

The output of your Nextcloud log in Admin > Logging:

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

$CONFIG = array (
  'instanceid' => 'XXXXXX',
  'passwordsalt' => 'XXXXXXXX',
  'secret' => 'XXXXXX',
  'trusted_domains' => 
  array (
    0 => '',
  'datadirectory' => '/home/intothegarbage/nextclouddata',
  'overwrite.cli.url' => '',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'XXXXXXX',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'XXXXXXX',
  'dbpassword' => 'XXXXXXXX',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',

The output of your Apache/nginx/system log in /var/log/____: (don’t have access to var/log so below is log from home/user/logs

Contents of the htaccess file in public_html folder in case it helps:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav

EDIT/UPDATE: And Davdroid will not connect either. I see in the log there is a “405 Method Not Allowed” which I am currently investigating (no idea what this could mean currently). Here’s the log:

Might be a specific issue with your shared host setup. For example I had a lot of issues with DAVDroid and OVH shared hosting in the past.
Maybe try this in thunderbird:

I tried installing TbSync addon in Thunderbird but that doesn’t work either. It seems to connect to the server but then keeps asking for the password over and over (the same as Thunderbird’s default Lightning calendar does).
In the logs, I note this:

No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured

I’ve found a number of issues posted that include “No ‘Authorization: Basic’ header found” but no answers thus far :frowning:

Did you install the very latest beta from the repository? The one from the mozilla store has issues.

Yea. The lightning calendar extension has been in rolling beta for nearly two years now. There hasn’t been ‘stable’ release in a long while and no documentation/messaging to letting people know that they should just use the beta. :frowning:

I was actually referring to the TBsync extension beta :wink:

Make sure your DavDroid URL reads like this:


nextcloud username
nextcloud password

It will then sync to contacts and calendars if you have them installed on your nextcloud instance.

Let us know how you get on.