NextCloud 20.0.2 returns the caldav file not being resolved again

Nextcloud version 20.0.2:
Operating system and version Ubuntu 18.04.5:
Apache or nginx version Apache 2.4.29:
PHP version 7.4.9:

The issue you are facing:

Once again the integrity scan of the server is showing an error. Saying that the .well_known/caldav file is not being resolved. The problem had been around in pre-NextCloud 19 versions. This problem was finally resolved in NextCloud 19.0.4. However, after updating directly to 20.0.2 with the UI tool, the error has returned.

Error message in the Settings->Overview after scanning has completed:

There are some errors regarding your setup.

  • Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the documentation. ([List of invalid files…] SKIPPED / [Rescan…]SKIPPED)
  • Your web server is not properly set up to resolve “/.well-known/caldav”. Further information can be found in the documentation.

Is this the first time you’ve seen this error? No

Steps to replicate it:

  1. Update to NextCloud 20.0.2

The output of your Nextcloud log in Admin > Logging:

Nothing related to the error shows up in Logs

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

$CONFIG = array (
  'instanceid' => 'XXX',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'xxx.example.net',
    2 => '555.555.555.555',
    3 => '555.555.555.555',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'overwrite.cli.url' => 'https://xxx.example.net/nextcloud',
  'htaccess.RewriteBase' => '/nextcloud',
  'asset-pipeline.enabled' => 'true',
  'dbtype' => 'mysql',
  'version' => '20.0.2.2',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'administrator?',
  'dbpassword' => 'PASSWORD?',
  'logtimezone' => 'UTC',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_from_address' => 'user',
  'mail_smtpmode' => 'smtp',
  'mail_domain' => 'gmail.com',
  'loglevel' => 3,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'somebody_unlikely.here@gmail.com',
  'mail_smtppassword' => '',
  'mail_smtpsecure' => 'tls',
  'updater.server.url' => 'https://updates.nextcloud.com/updater_server/',
  'updater.release.channel' => 'stable',
  'maintenance' => false,
  'theme' => '',
  'mysql.utf8mb4' => true,
  'updater.secret' => '',
);

Here are the contents of the /etc/apache2/sites-available/nextcloud.conf file that worked perfectly in NextCloud 19.0.4 but now gives an error with 20.0.2.2:

Alias /nextcloud "/var/www/nextcloud"                                                    
Redirect 301 /.well-known/caldav  https://something.net/nextcloud/remote.php/dav      
Redirect 301 /.well-known/caldav  https://something.net/nextcloud/remote.php/dav      
                                                                                         
<Directory /var/www/nextcloud/>                                                          
  Options +FollowSymlinks                                                                
  AllowOverride All                                                                      
                                                                                         
  <IfModule mod_dav.c>                                                                   
    Dav off                                                                              
  </IfModule>                                                                            
                                                                                         
  SetEnv HOME /var/www/nextcloud                                                         
  SetEnv HTTP_HOME /var/www/nextcloud                                                    
                                                                                         
</Directory>

No changes were made other than running the update.

Given that I don’t use DAV I don’t think the error affects functionality or security. However, having this issue re-appear after an upgrade is problematic with regards to NextCloud stability.

Although the messages haven’t been displayed in the past, the problem is related to an incorrect web server configuration which cannot be solved by Nextcloud. You need to make sure that the given .well-known urls are correctly redirected on your server as described here:

https://docs.nextcloud.com/server/20/admin_manual/issues/general_troubleshooting.html?highlight=well%20known#service-discovery

Once you’ve the configuration has been done correctly, the messages will most likely not appear again on an update.

The message you are talking about is not part of the integrity scan AFAIU.

That was done long ago. The message was NOT there in 19.0.4 because the server is configured correctly as per those directions. If a change was made it was in the NextCloud update to 20.0.2 because I made no other changes in the process whatsoever. Period. In fact under 19.0.4, when I went to the Overview tab in NextCloud that message was not there at all. It performed the scan without issues until I did the update to 20.0.2.

It’s really amazing how some people can feign reading an issue and then react as if they understand the problem.

Clearly you are incorrect because the message is right there as I posted it in my report. How can the message appear if it is not something NextCloud scans for?

I’m no expert with web servers, but maybe this will help:
The Admin documentation recommends that “RewriteRules” are changed within the .htaccess file in your root directory, but you’ve used “Redirect 301” in your Apache Conf file. Try removing them from your conf file and make sure your .htaccess file has the correct settings - https://docs.nextcloud.com/server/20/admin_manual/issues/general_troubleshooting.html#service-discovery
I’m wondering if maybe you have conflicting settings in your .htaccess and .conf files.

1 Like

Hello @SMartin,

there is a listing with two items in your screenshot.
First one is the integrity check feature of Nextcloud. Link to details is there.
Second one is about your " .well-known" issue you are talking about. This is a different issue and not related to the integrity check.