Invalid filenames on server causes sync abort and cryptic error message
See also owncloud issue here.
Steps to reproduce
- Add a load of files containing invalid names to the server's filesystem (i.e. not via NextCloud)
- Run an occ scan on the server
- Attempt to sync the client with the server
Expected behaviour
Files should sync as normal; any files with invalid names should be skipped and flagged as such on the client and not cause the whole sync to abort
Actual behaviour
Client reports a handful of "Operation Cancelled"s on red background, and in the Activity/Not Synced tab, "This item is not synced because of previous errors: Error downloading .... replied: Bad Request".
The server log has debug logs turned on but around that fatal error message (there are half a dozen of them) there are no other debug or related messages, just the fatals. Irritatingly I cannot see which file is actually causing the problem as the mention of getNodeForPath(...) shows only the first part of the filename.
Server configuration
Operating system: Arch Linux x64, up to date as of today Web server: Nginx 1.12 (+ php-fpm) Database: MariaDB 10.1.23 PHP version: 7.1.5 Nextcloud version: 12.0.0 Updated from an older Nextcloud/ownCloud or fresh install: Updated from 11 Where did you install Nextcloud from: Arch packaging system (archlinux.fr repo) Signing status: No errors have been found.
List of activated apps:
App list
Enabled: - activity: 2.5.2 - admin_audit: 1.2.0 - bruteforcesettings: 1.0.2 - comments: 1.2.0 - dav: 1.3.0 - federatedfilesharing: 1.2.0 - federation: 1.2.0 - files: 1.7.2 - files_pdfviewer: 1.1.1 - files_sharing: 1.4.0 - files_texteditor: 2.4.1 - files_videoplayer: 1.1.0 - firstrunwizard: 2.1 - gallery: 17.0.0 - logreader: 2.0.0 - lookup_server_connector: 1.0.0 - nextcloud_announcements: 1.1 - notifications: 2.0.0 - oauth2: 1.0.5 - ocsms: 1.12.0 - password_policy: 1.2.2 - provisioning_api: 1.2.0 - serverinfo: 1.2.0 - sharebymail: 1.2.0 - survey_client: 1.0.0 - systemtags: 1.2.0 - theming: 1.3.0 - twofactor_backupcodes: 1.1.1 - updatenotification: 1.2.0 - workflowengine: 1.2.0 Disabled: - encryption - files_external - files_trashbin - files_versions - user_external - user_ldapNextcloud configuration:
Config report
{ "system": { "instanceid": "ock98si0y3kb", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "Are you using external storage, if yes which one: sshfs mount on the server (up to this point working absolutely fine); nextcloud has no external storage configured
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
Client configuration
Browser: 2.2.4 build 1
Operating system: MacOS X sierra
Logs
Web server error log
Web server error log
``` OCA\DAV\Connector\Sabre\Exception\InvalidPath: HTTP/1.1 400 File name contains at least one invalid character /usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1163: OCA\DAV\Connector\Sabre\ObjectTree->getNodeForPath('backup/Document...') /usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 590: Sabre\DAV\Server->createCollection('backup/Document...', Object(Sabre\DAV\MkCol)) [internal function] Sabre\DAV\CorePlugin->httpMkcol(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response)) /usr/share/webapps/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array) /usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method MKCOL', Array) /usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response)) /usr/share/webapps/nextcloud/apps/dav/appinfo/v1/webdav.php - line 71: Sabre\DAV\Server->exec() /usr/share/webapps/nextcloud/remote.php - line 162: require_once('/usr/share/weba...') {main} ```
For others hitting this issue I used the client logs to find the offending files (a load of internal files created by Microsoft Office in the user's docs folder) and deleted them from their nextcloud folder on the server and rescanning.
Having looked into this a bit further these appear to be the files that caused the error (notice the forward slash toward the end):
icrosoft User Data/PowerPoint Script Menu Items/Sample Automator Workflows/Send a PDF version in an Outlook message\\scw.workflow/
icrosoft User Data/PowerPoint Script Menu Items/Sample Automator Workflows/Send a PDF version in an Outlook message\\scw.workflow/Contents/
icrosoft User Data/PowerPoint Script Menu Items/Sample Automator Workflows/Send a PDF version in an Outlook message\\scw.workflow/Contents/version.plist
icrosoft User Data/PowerPoint Script Menu Items/Sample Automator Workflows/Send a PDF version in an Outlook message\\scw.workflow/Contents/document.wflow
icrosoft User Data/PowerPoint Script Menu Items/Sample Automator Workflows/Send a PDF version in an Outlook message\\scw.workflow/Contents/Info.plist
icrosoft User Data/PowerPoint Script Menu Items/Sample Automator Workflows/Send images from a presentation to iPhoto\\csm.workflow/
icrosoft User Data/PowerPoint Script Menu Items/Sample Automator Workflows/Send images from a presentation to iPhoto\\csm.workflow/Contents/
icrosoft User Data/PowerPoint Script Menu Items/Sample Automator Workflows/Send images from a presentation to iPhoto\\csm.workflow/Contents/version.plist
icrosoft User Data/PowerPoint Script Menu Items/Sample Automator Workflows/Send images from a presentation to iPhoto\\csm.workflow/Contents/document.wflow
icrosoft User Data/PowerPoint Script Menu Items/Sample Automator Workflows/Send images from a presentation to iPhoto\\csm.workflow/Contents/Info.plist
Given that these are created by Office (user is running Office for Mac 2011) this could affect other users moving to Nextcloud.
@rullzer client issue or server?
Seeing this error and behaviour between a client's Mac & MacBook with fresh Nextcloud 12 server (Ubuntu 16.04.2, ZFS Mount) install (and fresh client installs on the machines) - errors being reported on client & server
Hey, this issue has been closed because the label stale is set and there were no updates for 14 days. Feel free to reopen this issue if you deem it appropriate.
(This is an automated comment from GitMate.io.)
I am facing this issue on NX 13.0.0. too...
Still hit the same problem on a NC18.0.6 server. Client is a Mac and get stuck on the very same files from Office
/PowerPoint Script Menu Items/Sample Automator Workflows/Send a PDF version in an Outlook message\scw.workflow/