server icon indicating copy to clipboard operation
server copied to clipboard

Invalid filenames on server causes sync abort and cryptic error message

Open ghost opened this issue 9 years ago • 7 comments

See also owncloud issue here.

Steps to reproduce

  1. Add a load of files containing invalid names to the server's filesystem (i.e. not via NextCloud)
  2. Run an occ scan on the server
  3. 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_ldap

Nextcloud configuration:

Config report { "system": { "instanceid": "ock98si0y3kb", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "" ], "datadirectory": "\/usr\/share\/webapps\/nextcloud\/data", "overwrite.cli.url": "", "dbtype": "mysql", "version": "12.0.0.29", "dbname": "ncu", "dbhost": "localhost", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "logtimezone": "UTC", "installed": true, "loglevel": 0, "memcache.local": "\\OC\\Memcache\\APCu", "theme": "", "maintenance": false, "proxy": "" } }

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} ```

ghost avatar May 25 '17 08:05 ghost

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.

ghost avatar May 26 '17 07:05 ghost

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.

ghost avatar May 26 '17 08:05 ghost

@rullzer client issue or server?

nickvergessen avatar Jun 01 '17 10:06 nickvergessen

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

astro7467 avatar Jun 20 '17 12:06 astro7467

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.)

nextcloud-bot avatar Jul 05 '18 13:07 nextcloud-bot

I am facing this issue on NX 13.0.0. too...

tomtomas99911 avatar Sep 26 '18 12:09 tomtomas99911

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/

mneiger avatar Jun 16 '20 20:06 mneiger