Directories shown instead of Files, for the WebDav External Storage

Hi there,

When opening a directory on a webdav external storage, all the files in it are displayed as directories.

Nextcloud 13.0.4 (snap 2018-07-28)
Linux Mint 19

Steps to replicate it:

  1. Get a pCloud account (free, and I’m not doing this for free storage bonus in case you wonder)
  2. Set up an external storage to the pCloud with WebDav and account 1.
  3. Open the storage from the Nextcloud client to access My Picture folder.

I have a few errors in log, but not as many as my tries.

error log
Fatal	webdav	InvalidArgumentException: Invalid type for field mtime

    /snap/nextcloud/7655/htdocs/lib/private/Files/Cache/QuerySearchHelper.php - line 122: OC\Files\Cache\QuerySearchHelper->validateComparison(Object(OC\Files\Search\SearchComparison))
    /snap/nextcloud/7655/htdocs/lib/private/Files/Cache/QuerySearchHelper.php - line 115: OC\Files\Cache\QuerySearchHelper->searchComparisonToDBExpr(Object(OC\DB\QueryBuilder\QueryBuilder), Object(OC\Files\Search\SearchComparison), Array)
    /snap/nextcloud/7655/htdocs/lib/private/Files/Cache/QuerySearchHelper.php - line 92: OC\Files\Cache\QuerySearchHelper->searchOperatorToDBExpr(Object(OC\DB\QueryBuilder\QueryBuilder), Object(OC\Files\Search\SearchComparison))
    [internal function] OC\Files\Cache\QuerySearchHelper->OC\Files\Cache\{closure}(*** sensitive parameters replaced ***)
    /snap/nextcloud/7655/htdocs/lib/private/Files/Cache/QuerySearchHelper.php - line 93: array_map(Object(Closure), Array)
    /snap/nextcloud/7655/htdocs/lib/private/Files/Cache/QuerySearchHelper.php - line 108: OC\Files\Cache\QuerySearchHelper->searchOperatorArrayToDBExprArray(Object(OC\DB\QueryBuilder\QueryBuilder), Array)
    /snap/nextcloud/7655/htdocs/lib/private/Files/Cache/Cache.php - line 686: OC\Files\Cache\QuerySearchHelper->searchOperatorToDBExpr(Object(OC\DB\QueryBuilder\QueryBuilder), Object(OC\Files\Search\SearchBinaryOperator))
    [internal function] OC\Files\Cache\Cache->searchQuery(Object(OC\Files\Search\SearchQuery))
    /snap/nextcloud/7655/htdocs/lib/private/Files/Node/Folder.php - line 245: call_user_func_array(Array, Array)
    /snap/nextcloud/7655/htdocs/lib/private/Files/Node/Folder.php - line 201: OC\Files\Node\Folder->searchCommon('searchQuery', Array)
    /snap/nextcloud/7655/htdocs/apps/dav/lib/Files/FileSearchBackend.php - line 158: OC\Files\Node\Folder->search(Object(OC\Files\Search\SearchQuery))
    /snap/nextcloud/7655/htdocs/3rdparty/icewind/searchdav/src/DAV/SearchHandler.php - line 75: OCA\DAV\Files\FileSearchBackend->search(Object(SearchDAV\XML\BasicSearch))
    /snap/nextcloud/7655/htdocs/3rdparty/icewind/searchdav/src/DAV/SearchPlugin.php - line 123: SearchDAV\DAV\SearchHandler->handleSearchRequest(Array, Object(Sabre\HTTP\Response))
    [internal function] SearchDAV\DAV\SearchPlugin->searchHandler(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
    /snap/nextcloud/7655/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
    /snap/nextcloud/7655/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method SEARCH', Array)
    /snap/nextcloud/7655/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
    /snap/nextcloud/7655/htdocs/apps/dav/lib/Server.php - line 287: Sabre\DAV\Server->exec()
    /snap/nextcloud/7655/htdocs/apps/dav/appinfo/v2/remote.php - line 35: OCA\DAV\Server->exec()
    /snap/nextcloud/7655/htdocs/remote.php - line 164: require_once('/snap/nextcloud...')

I don’t know yet how to get the rest of the files asked in the request template. (snap is new for me)

More info:

  • the same WebDav to pCloud works fines from Dolphin browser (KDE file manager, on other system).
  • the same WebDav link opened with other Nexcloud user, and with iPhone application, has the same issue: directories instead of files.

Thanks for any help

It’s the same for me. Just tried connecting pCloud webdav to Nextcloud instance. Installed Nextcloud 13.0.5 (using “.zip” installer and not snaps) on Ubuntu 18.04 Server. Files show up and I can even sync them to local machine, but they are all displayed as folders.

@prasadkumar013 please, could you also check in your logs if there is any message or error while you access this defective webdav external storage ?

I only checked error on Nextcloud interface, with admin account: account parameter (upper right drop down menu) , logs (in bottom left corner).
(I’ll check some log files once I find them in the snap system)

Webdav works fine with Dolphin and Firefox browser. Also the same link works fine with webdav mounted in MiXplorer android app. When I checked error on Nextcloud desktop app, I see

Error transferring https://<nextcloudURL>/remote.php/dav/files/<nextcloudUsername>/pCloud/ - server replied: Service Unavailable

Here “pCloud” is the name given to external storage.

Is there this line only once, or as many time as you try to read pCloud files ? (or by access / login )

So we have the same issue with Nextcloud 13.0.4 and 13.0.5.

With other clients pCloud is working fine.

It seems to be a Nextcloud issue.

I’ll try to map other Webdav ressource.

@prasadkumar013 if you can also test other Webdav external share with Nextcloud, it could be interesting (something else, not pCloud).
Thanks for helping

FWIW, I’ve had huge problems with the pCloud webDAV interface (not through nextcloud but otherwise). It is very unreliable and I had a file that I created months ago and never touched that all of a sudden was not longer accessible via webdav because webdav insisted it did not have permission to access it any longer. Pcloud support did not help at all, claiming that their WebDAV interface was not an official feature and that they won’t fix the issues I was reporting (and that is only a small part of the crappy pcloud support experience). I eventually managed to fix that particular issue by downloading that particular file via the web-interface, deleting it on pcloud and re-uploading it again.

Apart from that specific webDAV failure, my experience is that it intermittently returns status code 403 (and sometimes 503 if I remember correctly). Most of the time this seems to happen very briefly but currently I am unable to access my pCloud via webDAV at all, because it just keeps returning 403.

I mention this here not only to warn people about pcloud but also to suggest that if you experience issues with pcloud, you should not only consider nextcloud as a possible source of the problem but also pcloud itself.