Folders not shown - Error 500 - unavailable federated share
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 13
Description
Expected behaviour
Application shows all my folders
Actual behaviour
Application only shows my favorites and, an error is shown "500: Internal server error".
I believe this issue is also the cause of various slowdowns in my application
Steps to reproduce
1- create a share on serverA and share it with serverB
2- once confirmed the share is accessible on serverB and synchronised on your iOS client, shutdown serverA
Additional information
The following log line appears on the server's log when I open my iOS app:
{
"reqId": "CAQq2Zh6BXg4h7K4M4uy",
"level": 0,
"time": "2020-07-14T12:15:17+00:00",
"remoteAddr": "94.104.124.217",
"user": "cyrille",
"app": "webdav",
"method": "PROPFIND",
"url": "/remote.php/webdav/",
"message": "{\"Exception\":\"OCP\\\\Files\\\\StorageNotAvailableException\",\"Message\":\"\",\"Code\":1,\"Trace\":[{\"file\":\"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php\",\"line\":243,\"function\":\"checkAvailability\",\"class\":\"OC\\\\Files\\\\Storage\\\\Wrapper\\\\Availability\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php\",\"line\":226,\"function\":\"file_exists\",\"class\":\"OC\\\\Files\\\\Storage\\\\Wrapper\\\\Availability\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Files/View.php\",\"line\":1334,\"function\":\"file_exists\",\"class\":\"OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Files/View.php\",\"line\":1383,\"function\":\"getCacheEntry\",\"class\":\"OC\\\\Files\\\\View\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Files/Node/Root.php\",\"line\":201,\"function\":\"getFileInfo\",\"class\":\"OC\\\\Files\\\\View\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Files/Node/Folder.php\",\"line\":138,\"function\":\"get\",\"class\":\"OC\\\\Files\\\\Node\\\\Root\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Files/Node/Folder.php\",\"line\":147,\"function\":\"get\",\"class\":\"OC\\\\Files\\\\Node\\\\Folder\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/text/lib/Service/WorkspaceService.php\",\"line\":28,\"function\":\"nodeExists\",\"class\":\"OC\\\\Files\\\\Node\\\\Folder\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/text/lib/DAV/WorkspacePlugin.php\",\"line\":101,\"function\":\"getFile\",\"class\":\"OCA\\\\Text\\\\Service\\\\WorkspaceService\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php\",\"line\":96,\"function\":\"OCA\\\\Text\\\\DAV\\\\{closure}\",\"class\":\"OCA\\\\Text\\\\DAV\\\\WorkspacePlugin\",\"type\":\"->\",\"args\":[\"*** sensitive parameters replaced ***\"]},{\"file\":\"/var/www/nextcloud/apps/text/lib/DAV/WorkspacePlugin.php\",\"line\":107,\"function\":\"handle\",\"class\":\"Sabre\\\\DAV\\\\PropFind\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php\",\"line\":89,\"function\":\"propFind\",\"class\":\"OCA\\\\Text\\\\DAV\\\\WorkspacePlugin\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":1063,\"function\":\"emit\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":989,\"function\":\"getPropertiesByNode\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":1678,\"function\":\"getPropertiesIteratorForPath\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":1661,\"function\":\"writeMultiStatus\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php\",\"line\":363,\"function\":\"generateMultiStatus\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php\",\"line\":89,\"function\":\"httpPropFind\",\"class\":\"Sabre\\\\DAV\\\\CorePlugin\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":474,\"function\":\"emit\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":251,\"function\":\"invokeMethod\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":319,\"function\":\"start\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php\",\"line\":82,\"function\":\"exec\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/remote.php\",\"line\":167,\"args\":[\"/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php\"],\"function\":\"require_once\"}],\"File\":\"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php\",\"Line\":94,\"Hint\":\"Storage is temporarily not available\",\"CustomMessage\":\"--\"}",
"userAgent": "Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.0",
"version": "19.0.0.12"
}
I suspect this issue is due to https://github.com/nextcloud/server/issues/14797
Eventualy, after deleting the external share's corresponding row in table oc_share_external, the issue goes away
MariaDB [nextcloud]> select * from oc_share_external;
+----+--------+------------+---------------------------+-----------+-----------------+----------+-----------+-------+---------+------------+----------------------------------+----------+
| id | parent | share_type | remote | remote_id | share_token | password | name | owner | user | mountpoint | mountpoint_hash | accepted |
+----+--------+------------+---------------------------+-----------+-----------------+----------+-----------+-------+---------+------------+----------------------------------+----------+
| 3 | -1 | 0 | https://private.bollu.be/ | 3 | GL8M76GbVHk0nkv | | /external | admin | cyrille | /external | 48d7eb60b23e97e7d76b33e669c372da | 1 |
+----+--------+------------+---------------------------+-----------+-----------------+----------+-----------+-------+---------+------------+----------------------------------+----------+
1 row in set (0.000 sec)
MariaDB [nextcloud]> delete from oc_share_external where id=3;
Query OK, 1 row affected (0.019 sec)
Reasoning or why should it be changed/implemented?
This is a bug
iOS version
13.5.1
App version
3.0.0.76
Server configuration
Operating system:
Debian bullseye
Web server:
apache
Database:
MariaDB
PHP version:
7.4
Nextcloud version: (see Nextcloud admin page)
19.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the iOS folder listing with serverA shut down, using the reported federated share and the WebDAV StorageNotAvailableException log. Inspect how the iOS app handles the failed WebDAV response and the external share state; done means folders remain usable without a 500 error or the reported slowdown. No test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, mariadb, php, swift
- Domain
- backend, databases, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100