nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.44k stars 4.08k forks source link

`Could not fetch file details` after uploading file via web UI to External Storage (appears fine after refresh) #34707

Open burner- opened 2 years ago

burner- commented 2 years ago

⚠️ This issue respects the following points: ⚠️

Bug description

"Could not fetch file details" error after uploading file via web ui to external webdav folder. File wont appear to list but if I refresh page it appear.

Steps to reproduce

  1. setup webdav share from rclone
  2. mount webdav via nexcloud "extrernal storage"
  3. upload file via nexcloud ui

Expected behavior

file should appear to folder without error message without need to refresh page.

Installation method

Community Manual installation with Archive

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nc.infra.vectorama.fi",
            "nc.vector.fi"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "fi",
        "dbtype": "mysql",
        "version": "25.0.0.18",
        "overwrite.cli.url": "https:\/\/nc.infra.vectorama.fi",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "mail_smtpsecure": "tls",
        "allow_local_remote_servers": true,
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 2.17.0
  - bruteforcesettings: 2.5.0
  - circles: 25.0.0
  - cloud_federation_api: 1.8.0
  - comments: 1.15.0
  - contactsinteraction: 1.6.0
  - dashboard: 7.5.0
  - dav: 1.24.0
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_external: 1.17.0
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - firstrunwizard: 2.14.0
  - groupfolders: 13.0.0
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - nextcloud_announcements: 1.14.0
  - notifications: 2.13.1
  - oauth2: 1.13.0
  - password_policy: 1.15.0
  - photos: 2.0.0
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - recommendations: 1.4.0
  - related_resources: 1.0.0
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - support: 1.8.0
  - survey_client: 1.13.0
  - systemtags: 1.15.0
  - text: 3.6.0
  - theming: 2.0.0
  - twofactor_backupcodes: 1.14.0
  - updatenotification: 1.15.0
  - user_saml: 5.0.3
  - user_status: 1.5.0
  - viewer: 1.9.0
  - weather_status: 1.5.0
  - workflowengine: 2.7.0
Disabled:
  - admin_audit
  - encryption
  - suspicious_login
  - twofactor_totp
  - user_ldap

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"fiY1YNFEbYrGlrpoalfy","level":3,"time":"2022-10-20T15:53:58+00:00","remoteAddr":"2a00:4cc1:2:0:d92c:516a:4112:18ce","user":"tapsa","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/tapsa/work/20220718.244000.Johteenhovipiha.mp4","message":"Storage with mount id 3 is not available","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36","version":"25.0.0.18","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Storage with mount id 3 is not available","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":78,"function":"getChild","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":73,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":971,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"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":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":360,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":167,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","Line":220,"message":"Storage with mount id 3 is not available","exception":{},"CustomMessage":"Storage with mount id 3 is not available"}}

Additional info

Could not fetch file details "20220718.244000.Johteenhovipiha.mp4"

Looks that log say that mount is not available. Anyhow it is. And with page refresh upoaded file appears. And I can remove it wihtout any problem.

burner- commented 2 years ago

@szaimen is there any information what I can collect to help resolve this issue?

PVince81 commented 2 years ago

not sure how rclone works but maybe there's a delay on the rclone Webdav side that makes it so that the file doesn't immediately appear, so the direct PROPFIND that Nextcloud does after an upload fails at first

if that's the case there isn't much that can be done on the Nextcloud side apart from delaying the recheck further or polling for some time which I wouldn't recommend to implement because it would affect performance, especially with lots of files

burner- commented 2 years ago

@PVince81 That was my first tough also. And that why I start with opening ticket to rclone. They did fix one bug what may have effect to this but it did not resolve issue. Anyway by looking rclone log and NC log it looks that it is not reason for this. By NC log it looks that nc will some how drop whole server handle when it try get that metadata. Look that "Storage with mount id 3 is not available" And at server side there is no any error at that point. And at server side with verbose logging it looks that all request what it get was successfull.

burner- commented 1 year ago

Here is error log for this. So it looks that after upload when it try get meta data it thinks that remote is down. At remote log there is no any indication that it even try get that metadata. `{ "reqId": "6wX3tiAu2uLnopSD2oTq", "level": 3, "time": "2023-02-10T19:06:40+00:00", "remoteAddr": "xxxxxxxxxxxxxxxxxxxxx", "user": "tapsa", "app": "webdav", "method": "PROPFIND", "url": "/remote.php/dav/files/tapsa/work/test/Testfile", "message": "Storage with mount id 3 is not available", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36", "version": "25.0.3.2", "exception": { "Exception": "Sabre\DAV\Exception\ServiceUnavailable", "Message": "Storage with mount id 3 is not available", "Code": 0, "Trace": [ { "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php", "line": 78, "function": "getChild", "class": "OCA\DAV\Connector\Sabre\Directory", "type": "->" }, { "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php", "line": 73, "function": "getNodeForPath", "class": "Sabre\DAV\Tree", "type": "->" }, { "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php", "line": 73, "function": "getNodeForPath", "class": "Sabre\DAV\Tree", "type": "->" }, { "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php", "line": 971, "function": "getNodeForPath", "class": "Sabre\DAV\Tree", "type": "->" }, { "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php", "line": 1662, "function": "getPropertiesIteratorForPath", "class": "Sabre\DAV\Server", "type": "->" }, { "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php", "line": 1647, "function": "writeMultiStatus", "class": "Sabre\DAV\Server", "type": "->" }, { "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php", "line": 346, "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": 472, "function": "emit", "class": "Sabre\DAV\Server", "type": "->" }, { "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php", "line": 253, "function": "invokeMethod", "class": "Sabre\DAV\Server", "type": "->" }, { "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php", "line": 321, "function": "start", "class": "Sabre\DAV\Server", "type": "->" }, { "file": "/var/www/nextcloud/apps/dav/lib/Server.php", "line": 360, "function": "exec", "class": "Sabre\DAV\Server", "type": "->" }, { "file": "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php", "line": 35, "function": "exec", "class": "OCA\DAV\Server", "type": "->" }, { "file": "/var/www/nextcloud/remote.php", "line": 171, "args": [ "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php" ], "function": "require_once" } ], "File": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php", "Line": 220, "message": "Storage with mount id 3 is not available", "exception": {

},
"CustomMessage": "Storage with mount id 3 is not available"

} }`