How to solve a sync error without further information?

Nextcloud version (eg, 18.0.2): 20.0.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.1 LTS
Apache or nginx version (eg, Apache 2.4.25): 1.19.4
PHP version (eg, 7.1): 7.4.12
Nextcloud client version: 3.1.1

This is a docker installation of Nextcloud.

System report:

Password for system report: MYGfCTkzTtMCVJnkee0I

The issue you are facing:

Since some times, there is a sync error in the nextcloud client without further information.
It tells (translated from german) “connection ended (skipped because of the earlier error, retry in …)”.

I don’t know what to do and I don’t find anything in any log about it. The file exists on the server side, but not on the client side.

The file is quite big (3,5 GB), but another file in the same folder is bigger (3,7 GB) and has no error and got synced successfully.

nextcloud-sync-error

Nextcloud client debug archive:

(plz ask me per PN for the password, if this archive is needed)

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

Steps to replicate it:

  1. (for me) Start sync client

The output of your Nextcloud log in Admin > Logging:

[PHP] Error: Error: Undefined offset: 3 at /var/www/html/lib/private/legacy/OC_Helper.php#548 at <<closure>>

 0. /var/www/html/lib/private/legacy/OC_Helper.php line 548
    OC\Log\ErrorHandler::onError(8, "Undefined offset: 3", "/var/www/html/l ... p", 548, {path: "/Server/ ... }})
 1. /var/www/html/apps/dav/lib/Connector/Sabre/Directory.php line 331
    OC_Helper::getStorageInfo("/Server/files", OC\Files\FileInfo {})
 2. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 799
    OCA\DAV\Connector\Sabre\Directory->getQuotaInfo()
 3. /var/www/html/3rdparty/sabre/dav/lib/DAV/PropFind.php line 96
    Sabre\DAV\CorePlugin->Sabre\DAV\{closure}("*** sensitive parameters replaced ***")
 4. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 802
    Sabre\DAV\PropFind->handle("{DAV:}quota-used-bytes", Closure {})
 5. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->propFind(Sabre\DAV\PropFind {}, OCA\DAV\Files\FilesHome {})
 6. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1063
    Sabre\DAV\Server->emit("propFind", [Sabre\DAV\PropF ... }])
 7. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 989
    Sabre\DAV\Server->getPropertiesByNode(Sabre\DAV\PropFind {}, OCA\DAV\Files\FilesHome {})
 8. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1678
    Sabre\DAV\Server->getPropertiesIteratorForPath("files/Server", ["{DAV:}quota-av ... "], 0)
 9. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1661
    Sabre\DAV\Server->writeMultiStatus(Sabre\Xml\Writer ... ]}, Generator {}, false)
10. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 363
    Sabre\DAV\Server->generateMultiStatus(Generator {}, false)
11. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
12. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 474
    Sabre\DAV\Server->emit("method:PROPFIND", [Sabre\HTTP\Requ ... }])
13. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 251
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
14. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 319
    Sabre\DAV\Server->start()
15. /var/www/html/apps/dav/lib/Server.php line 325
    Sabre\DAV\Server->exec()
16. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
17. /var/www/html/remote.php line 167
    require_once("/var/www/html/a ... p")

PROPFIND /remote.php/dav/files/Server/
from 172.23.0.1 by Server at 2020-12-27T18:58:52+00:00

The whole log is spammed with identical messages, but I don’t think they have something to do with the sync problem.

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

cat config.php
<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => 'REMOVED',
  'passwordsalt' => 'REMOVED',
  'secret' => 'REMOVED',
  'trusted_domains' => 
  array (
    0 => '127.0.0.1:8080',
    1 => 'vcloud7even:8080',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '20.0.1.1',
  'overwrite.cli.url' => 'http://127.0.0.1:8080',
  'dbname' => 'nextcloud',
  'dbhost' => 'db:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'REMOVED',
  'dbpassword' => 'REMOVED',
  'installed' => true,
  'mail_from_address' => 'cloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'site7even.de',
  'mail_smtphost' => 'REMOVED',
  'mail_smtpport' => '25',
  'overwritehost' => 'ncloud.site7even.de',
  'overwriteprotocol' => 'https',
  'theme' => '',
  'loglevel' => 0,
  'maintenance' => false,
  'default_language' => 'de',
  'force_language' => 'de',
  'app_install_overwrite' => 
  array (
    0 => 'keeweb',
    1 => 'calendar',
  ),
);

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

(plz ask me per PN for the password, if this log is needed)

There is a client side log. Maybe you can have a look at it. Further information for client side logging can be found here:
Client Troubleshooting
You can open it by pressing F12 in the client settings. This log hopefully gives you some further inside on what this error actually is

Ok, thank you, this helped!

When reading the client troubleshooting, I learned that the nextcloud client communicates via WebDAV with the server. So I tried Ubuntu’s caja to connect via WebDAV and I got the same error, always when accessing this file!

The server logged the following error for this file (stripped the start and end of the message):

[error] 22#22: *382 upstream prematurely closed FastCGI request while reading upstream

I am using the vieux/sshfs driver for the nextcloud storage. So, I simply checked the file on the server side and it had 0 bytes.

Dunno how this happened and if I wanted to delete this file or this is a failed upload. But I will try to investigate this now…

Lessons learned:
Worth to first check the file validity on the storage, before trying to find the needle in the logs :wink:

Thank you for your help!