After upgrading from 20 to 21 and 22, WebDAV issues with my account only?

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 22.2.3 - Stable
Operating system and version (eg, Ubuntu 20.04): 20.04.1 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.41 (Ubuntu)
PHP version (eg, 7.4): PHP 7.4.3 (cli) (built: Oct 25 2021 18:20:54) ( NTS )

The issue you are facing:
I recently upgraded from 20.x to 22.x. I first upgraded to 21.x and then 22.2.3 using the web-based tool.
When I was finished with the upgrade from 20-21, I did a quick check of everything and noticed my WebDAV mapped drive was not working. I hoped for the best and completed the second upgrade and it still doesn’t work.
While digging further, it does appear my Wife’s WebDAV access (using her own account) and another account I made seem to work fine. I can connect to that other account on my Win10 system via Explorer without issue. Wife is unable to map my account on her system.

So I don’t think this is specifically a WebDAV issue, but maybe an issue with my account and WebDAV? I can access my account features via my phone or web.

When connecting via Explorer (or WinSCP) I am prompted with login/password and then it’s radio-silence from the server afterward.

I did run nextcloud in debug mode and got two dav issues I think but I don’t know what to make of it.

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

Steps to replicate it:

  1. In explorer, map network drive. Paste shortcut provided https://server.net/remote.php/dav/files/user
  2. When prompted, enter login/password
  3. Moments later, failure

The output of your Nextcloud log in Admin > Logging:


[webdav] Debug: 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

OPTIONS /remote.php/dav/files/<user>
from XX.XX.XX.XX at 2022-01-26T01:51:51+00:00

[no app in context] Debug: Token is not valid: Token does not exist

OPTIONS /remote.php/dav/files/user/
from XX.XX.XX.XX at 2022-01-26T01:51:51+00:00

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

<?php
$CONFIG = array (
  'instanceid' => '-----------------',
  'passwordsalt' => '----------------------------------',
  'secret' => '------------------------------------------------',
  'trusted_domains' =>
  array (
    0 => 'xx.xx.xx.xx',
    1 => 'xx.xx.xx.xx/xx',
    2 => 'xx.xx.net',
  ),
  'datadirectory' => '/media/nextcloud/Nextcloud',
  'dbtype' => 'mysql',
  'version' => '22.2.3.0',
  'overwrite.cli.url' => 'http://xx.xx.xx.xx/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '-------------------------------------',
  'installed' => true,
  'updater.secret' => '---------------------------------------',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'default_phone_region' => 'US',
);

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

[Tue Jan 25 20:50:05.882517 2022] [php7:error] [pid 1207] [client XX.XX.XX.XX] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/nextcloud/lib/private/DB/Connection.php:87\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(236): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(344): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(109): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/ in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 87


Well minor frustrated update. I made a new user account and via command line just copied over all my files and completed a database sync. I can connect to the new account without issue. Not sure what’s up with my account specifically but I guess I shouldn’t have too much to complain about aside from my automatic uploads needing to be redone on my phone.

Oh well.