External Storage: Empty WebDav Folder when it isn't actually empty

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, 12.0.2): 15.0.5
Operating system and version (eg, Ubuntu 17.04): Ubuntu Server 18.04
Apache or nginx version (eg, Apache 2.4.25): nginx/1.14.2
PHP version (eg, 7.1):7.3.3-1+ubuntu18.04.1+deb.sury.org+1

The issue you are facing:

If I mount an external WebDav share, I see an empty directory - and it says “pending” eternally in the “Size” box.

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

Steps to replicate it:

  1. Setup a new webdav share with WsgiDAV (I made mine anonymous read-write, and then put it behind an Nginx reverse proxy that did the http basic authentication. This is on a different machine with nginx/1.10.3).
  2. Try to add the webdav share to nexcloud
  3. See empty folder

The output of your Nextcloud log in Admin > Logging:


GET /index.php/apps/files/
from 5.198.44.45 by admin at 2019-03-10T23:34:21+00:00
[PHP] Error: call_user_func() expects parameter 1 to be a valid callback, no array or string given at /srv/nextcloud/www/3rdparty/symfony/event-dispatcher/EventDispatcher.php#212

GET /index.php/apps/files/
from 5.198.44.45 by admin at 2019-03-10T23:34:21+00:00

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

<?php
$CONFIG = array (
  'instanceid' => 'SEKRET',
  'passwordsalt' => 'SEKRET',
  'secret' => 'SEKRET',
  'maintenance' => false,
  'trusted_domains' => 
  array (
    0 => 'nextcloud.starbeamrainbowlabs.com',
    1 => 'owncloud.starbeamrainbowlabs.com',
    2 => 'admin.starbeamrainbowlabs.com',
  ),
  'datadirectory' => '/srv/nextcloud/data',
  'overwrite.cli.url' => 'https://admin.starbeamrainbowlabs.com/owncloud',
  'dbtype' => 'sqlite3',
  'version' => '15.0.5.3',
  'installed' => true,
  'forcessl' => false,
  'mail_from_address' => 'postasaurus',
  'mail_smtpmode' => 'sendmail',
  'mail_domain' => 'starbeamrainbowlabs.com',
  'forceSSLforSubdomains' => false,
  'theme' => '',
  'ldapIgnoreNamingRules' => false,
  'loglevel' => 0,
  'trashbin_retention_obligation' => 'auto',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'updater.release.channel' => 'stable',
  'updater.secret' => 'SEKRET',
);

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

5.198.44.45 - - [10/Mar/2019:23:37:07 +0000] "PROPFIND /remote.php/dav/files/admin/MY_WEBDAV_FOLDER HTTP/2.0" 207 1120 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0"
5.198.44.45 - - [10/Mar/2019:23:37:07 +0000] "GET /index.php/apps/files/ajax/getstoragestats.php?dir=%2FMY_WEBDAV_FOLDER HTTP/2.0" 200 214 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0"

Nginx / WsgiDAV logs on storage machine:

5.196.73.75 - - [10/Mar/2019:23:28:23 +0000] "PROPFIND /MY_WEBDAV_PATH/ HTTP/1.1" 401 195 "-" "sabre-dav/3.2.2 (http://sabre.io/)"
5.196.73.75 - sbrl-nextcloud [10/Mar/2019:23:28:23 +0000] "PROPFIND /MY_WEBDAV_PATH/ HTTP/1.1" 207 676 "-" "sabre-dav/3.2.2 (http://sabre.io/)"

==> wsgidav/wsgidav-syncthing.log <==
Mar 10 23:28:23 elessar wsgidav-syncthing[25196]: 2019-03-10 23:28:23.786 - <1927279728> wsgidav.wsgidav_app         INFO    :  ::1 - (anonymous) - [2019-03-10 23:28:23] "PROPFIND /" length=438, depth=0, elap=0.007sec -> 207 Multi-Status

==> nginx/access.log <==
5.196.73.75 - - [10/Mar/2019:23:28:26 +0000] "PROPFIND /MY_WEBDAV_PATH/ HTTP/1.1" 401 195 "-" "sabre-dav/3.2.2 (http://sabre.io/)"

==> wsgidav/wsgidav-syncthing.log <==
Mar 10 23:28:26 elessar wsgidav-syncthing[25196]: 2019-03-10 23:28:26.091 - <1916793968> wsgidav.wsgidav_app         INFO    :  ::1 - (anonymous) - [2019-03-10 23:28:26] "PROPFIND /" length=135, depth=0, elap=0.005sec -> 207 Multi-Status

==> nginx/access.log <==
5.196.73.75 - sbrl-nextcloud [10/Mar/2019:23:28:26 +0000] "PROPFIND /MY_WEBDAV_PATH/ HTTP/1.1" 207 294 "-" "sabre-dav/3.2.2 (http://sabre.io/)"

==> wsgidav/wsgidav-syncthing.log <==
Mar 10 23:28:26 elessar wsgidav-syncthing[25196]: 2019-03-10 23:28:26.130 - <1906308208> wsgidav.wsgidav_app         INFO    :  ::1 - (anonymous) - [2019-03-10 23:28:26] "PROPFIND /" length=135, depth=0, elap=0.005sec -> 207 Multi-Status

==> nginx/access.log <==
5.196.73.75 - sbrl-nextcloud [10/Mar/2019:23:28:26 +0000] "PROPFIND /MY_WEBDAV_FOLDER/ HTTP/1.1" 207 294 "-" "sabre-dav/3.2.2 (http://sabre.io/)"

Packet capture of that conversation (Request is from Nextcloud → Nginx → WsgiDAV):

PROPFIND /MY_WEBDAV_FOLDER/ HTTP/1.0
Host: wsgidav-syncthing
Connection: close
Content-Length: 135
Authorization: Basic c2JybC1uZXh0Y2xvdWQ6M2ZGaWxQY2lPVWVaajZBQTM5UTVQa0FwNjlVbVNvUDluTGstVGppcUhjNGttYU5N
User-Agent: sabre-dav/3.2.2 (http://sabre.io/)
Accept: */*
Depth: 0
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<d:propfind xmlns:d="DAV:">
  <d:prop>
    <d:quota-available-bytes/>
  </d:prop>
</d:propfind>
HTTP/1.1 207 Multi-Status
Content-Type: application/xml
Date: Sun, 10 Mar 2019 23:28:58 GMT
Content-Length: 294
Server: WsgiDAV/3.0.0 Cheroot/6.5.4 Python/3.5.3

<?xml version="1.0" encoding="utf-8" ?>
<ns0:multistatus xmlns:ns0="DAV:"><ns0:response><ns0:href>/MY_WEBDAV_FOLDER/</ns0:href><ns0:propstat><ns0:prop><ns0:quota-available-bytes /></ns0:prop><ns0:status>HTTP/1.1 404 Not Found</ns0:status></ns0:propstat></ns0:response></ns0:multistatus>

Equivalent conversation between the Nautilus file manager → Nginx → WsgiDAV (this works):

PROPFIND /MY_WEBDAV_FOLDER HTTP/1.0
Host: wsgidav-syncthing
Connection: close
Content-Length: 235
Depth: 0
Content-Type: application/xml
Apply-To-Redirect-Ref: T
Accept-Encoding: gzip, deflate
User-Agent: gvfs/1.38.1
Accept-Language: en-gb, en;q=0.9, en;q=0.8
Authorization: Basic c2JybDp5SUtOTmZRaHVqb2I5UUZyU2N1Z1JEQ2FmRE5XdjJmb01BMjZGMmJ2WDI1c09BY0U=

<?xml version="1.0" encoding="utf-8" ?>
 <D:propfind xmlns:D="DAV:">
  <D:prop>
<D:creationdate/>
<D:displayname/>
<D:getcontentlength/>
<D:getcontenttype/>
<D:getetag/>
<D:getlastmodified/>
<D:resourcetype/>
  </D:prop>
 </D:propfind>HTTP/1.1 207 Multi-Status
Content-Type: application/xml
Date: Sun, 10 Mar 2019 22:56:42 GMT
Content-Length: 642
Server: WsgiDAV/3.0.0 Cheroot/6.5.4 Python/3.5.3

<?xml version="1.0" encoding="utf-8" ?>
<ns0:multistatus xmlns:ns0="DAV:"><ns0:response><ns0:href>/MY_WEBDAV_FOLDER/</ns0:href><ns0:propstat><ns0:prop><ns0:getcontentlength /><ns0:getcontenttype /><ns0:getetag /></ns0:prop><ns0:status>HTTP/1.1 404 Not Found</ns0:status></ns0:propstat><ns0:propstat><ns0:prop><ns0:creationdate>2019-03-01T19:22:23Z</ns0:creationdate><ns0:displayname>WEBDAV_FOLDER_NAME</ns0:displayname><ns0:getlastmodified>Fri, 01 Mar 2019 19:22:23 GMT</ns0:getlastmodified><ns0:resourcetype><ns0:collection /></ns0:resourcetype></ns0:prop><ns0:status>HTTP/1.1 200 OK</ns0:status></ns0:propstat></ns0:response></ns0:multistatus>

Screenshots:

Nextcloud not working:

Nautilus working:

Hello @sbrl, did you resolve this issue? Facing same problem with WebDAV drive on W11 @ NC 27.

@roosei The same error message in your Nextcloud log or merely similar behavior?

Please share a log entry from attempting to access your WebDAV mount.

Unfortunately problem is in native Windows Explorer (Win11Pro) - so no relevant logs from EventLogger.
Behavior is same - empty folder accessed by WebDAV through Windows Explorer.

I was referring to your server-side logs. The ones from Nextcloud.