NC15.0.2 syncing errors Mac client WebDav

Nextcloud version 15.0.2 (SNAP installation)
Operating system and version (eg, Ubuntu 18.04):
Apache or nginx version (eg, Apache 2.4.25): not sure how to get this
PHP version (eg, 7.1): not sure how to get this
My main storage is external (an SMB mounted drive).
The path is mounted as 0770 (if I do 0777 NC wont let me pass the web interface, asking for changing to 0770)
All other NC clients work fine.
Im using the NC Desktop client 2.5.1final (built 20181204)

Thanks a lot !!

The issue you are facing:
Getting sync errors on some files from one of my Mac clients.
That client was syncing the same structure long time ago to NC10 but I dont know if there were the same errors at the time.
Most of the files sync of a total of 100GB, but some files and folder are marked ‘red’ on the desktop client, and show errors.
I tried rebooting the server, rebooting the client, reinstalling the client, all to not avail.
The path of the files with problem on the Mac does not have special characters or empty files.
I checked the logs and see issues with Webdav but IM not sure where to look for more info.

Is this the first time you’ve seen this error? (Y/N): Y

The output of your Nextcloud log in Admin > Logging:

{"reqId":"uHPONspGuljv9Eb83EI8","level":3,"time":"2019-02-14T01:53:43+00:00","remoteAddr":"192.168.0.11","user":"Katiem","app":"PHP","method":"PUT","url":"\/remote.php\/dav\/files\/Katiem\/Katie\/Katie%20School\/UM%20Fall%202018\/Admission%20\/PayPath%20Payment%20Service%20Receipt.pdf","message":"file_put_contents(\/mnt\/nextclouddata\/Katiem\/files\/Katie\/Katie School\/UM Fall 2018\/Admission \/PayPath Payment Service Receipt.pdf.ocTransferId1802330894.part): failed to open stream: No such file or directory at \/snap\/nextcloud\/11336\/htdocs\/lib\/private\/Files\/Storage\/Local.php#467","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.2.0"}
{"reqId":"uHPONspGuljv9Eb83EI8","level":3,"time":"2019-02-14T01:53:43+00:00","remoteAddr":"192.168.0.11","user":"Katiem","app":"no app in context","method":"PUT","url":"\/remote.php\/dav\/files\/Katiem\/Katie\/Katie%20School\/UM%20Fall%202018\/Admission%20\/PayPath%20Payment%20Service%20Receipt.pdf","message":{"Exception":"Sabre\\DAV\\Exception","Message":"Error while copying file to target location (copied bytes: 0, expected filesize: 52237 )","Code":0,"Trace":[{"file":"\/snap\/nextcloud\/11336\/htdocs\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1096,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["PayPath Payment Service Receipt.pdf",null]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["files\/Katiem\/Katie\/Katie School\/UM Fall 2018\/Admission \/PayPath Payment Service Receipt.pdf",null,null]},{"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https:\/\/nc.mydomain.com\/remote.php\/dav\/files\/Katiem\/Katie\/Katie%20School\/UM%20Fall%202018\/Admission%20\/PayPath%20Payment%20Service%20Receipt.pdf","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPut"],[{"absoluteUrl":"https:\/\/nc.mydomain.com\/remote.php\/dav\/files\/Katiem\/Katie\/Katie%20School\/UM%20Fall%202018\/Admission%20\/PayPath%20Payment%20Service%20Receipt.pdf","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PUT",[{"absoluteUrl":"https:\/\/nc.mydomain.com\/remote.php\/dav\/files\/Katiem\/Katie\/Katie%20School\/UM%20Fall%202018\/Admission%20\/PayPath%20Payment%20Service%20Receipt.pdf","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/nc.mydomain.com\/remote.php\/dav\/files\/Katiem\/Katie\/Katie%20School\/UM%20Fall%202018\/Admission%20\/PayPath%20Payment%20Service%20Receipt.pdf","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/apps\/dav\/lib\/Server.php","line":301,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/remote.php","line":163,"args":["\/snap\/nextcloud\/11336\/htdocs\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/snap\/nextcloud\/11336\/htdocs\/apps\/dav\/lib\/Connector\/Sabre\/File.php","Line":191,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.2.0"}
{"reqId":"uHPONspGuljv9Eb83EI8","level":4,"time":"2019-02-14T01:53:43+00:00","remoteAddr":"192.168.0.11","user":"Katiem","app":"webdav","method":"PUT","url":"\/remote.php\/dav\/files\/Katiem\/Katie\/Katie%20School\/UM%20Fall%202018\/Admission%20\/PayPath%20Payment%20Service%20Receipt.pdf","message":{"Exception":"Sabre\\DAV\\Exception","Message":"Error while copying file to target location (copied bytes: 0, expected filesize: 52237 )","Code":0,"Trace":[{"file":"\/snap\/nextcloud\/11336\/htdocs\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1096,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["PayPath Payment Service Receipt.pdf",null]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["files\/Katiem\/Katie\/Katie School\/UM Fall 2018\/Admission \/PayPath Payment Service Receipt.pdf",null,null]},{"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https:\/\/nc.mydomain.com\/remote.php\/dav\/files\/Katiem\/Katie\/Katie%20School\/UM%20Fall%202018\/Admission%20\/PayPath%20Payment%20Service%20Receipt.pdf","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPut"],[{"absoluteUrl":"https:\/\/nc.mydomain.com\/remote.php\/dav\/files\/Katiem\/Katie\/Katie%20School\/UM%20Fall%202018\/Admission%20\/PayPath%20Payment%20Service%20Receipt.pdf","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PUT",[{"absoluteUrl":"https:\/\/nc.mydomain.com\/remote.php\/dav\/files\/Katiem\/Katie\/Katie%20School\/UM%20Fall%202018\/Admission%20\/PayPath%20Payment%20Service%20Receipt.pdf","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/nc.mydomain.com\/remote.php\/dav\/files\/Katiem\/Katie\/Katie%20School\/UM%20Fall%202018\/Admission%20\/PayPath%20Payment%20Service%20Receipt.pdf","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/apps\/dav\/lib\/Server.php","line":301,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/snap\/nextcloud\/11336\/htdocs\/remote.php","line":163,"args":["\/snap\/nextcloud\/11336\/htdocs\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/snap\/nextcloud\/11336\/htdocs\/apps\/dav\/lib\/Connector\/Sabre\/File.php","Line":191,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.2.0"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' =>
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'instanceid' => 'oct45533dsd',
  'passwordsalt' => 'AWRT$TSRGDTHTHT',
  'secret' => 'hvD9HDFGDFR^%#$GSGERHETHADFBiFj',
  'trusted_domains' =>
  array (
    0 => '192.168.0.34',
    1 => 'nc.mydomain.com',
  ),
  'datadirectory' => '/mnt/nextclouddata',
  'dbtype' => 'mysql',
  'version' => '15.0.2.0',
  'overwrite.cli.url' => 'http://192.168.0.34',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'pass__tfOTOvF_2452345@$%@#$@$#%#$^#%&$##$^%235@#_Ab',
  'installed' => true,
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_smtphost' => 'smtp.myserver.com',
  'mail_smtpport' => '999',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_from_address' => 'notifications',
  'mail_domain' => 'mydomain.com',
  'mail_smtpname' => 'support@mydomain.com',
  'mail_smtppassword' => 'PASSWORD#',

The output of your Apache/nginx/system log in /var/log/____:

Not sure where is this.

Is there any other forum where I could get help on this issue?

Do the files sync on the next run? Or do they error every time? I did a bulk sync to an older iMac a few days ago. It has network issues due to impending hardware failure. It would run for some small amount of time, then say it failed. I think the errors were like yours.

In my case, the wireless network card was hanging under load. Putting a rate limit below 1000KBps in the NextCloud client software’s settings let it run indefinitely. That is just under the average rate seen without limits.

Anyway, if the files eventually sync correctly, you may have an intermittent network issue. Wireless networks are prone to such issues. Most activity recovers invisibly. Usually, only bit perfect, long running downloads, or uploads, will get draw your attention to the errors.

However, your issue may be something else entirely.

I actually found the source of the issue last night.
NC Client breaks whenever there are trailing whitespaces in the folders.
The clue was the character sequence ‘%20’ in the path, if you see my error that sequence occurs whenever there are whitespaces and in the particular case you can see there is a whitespace at the end of the folder named ‘Admission’
After I found the problem I went ahead and tried to open an issue on Github and realized it was already opened ( #5843 ) seems that it has been a problem since 2017 and has not been fixed yet (they did put some failsafe when you do trailing whitespace via web GUI but not on the Client software)
Anyways, I put a script on my Mac and renamed about 35 folders that had that issue and voila !
Thanks a lot for replying back anyways

1 Like