Can't open documents from shared SMB

Nextcloud Version: 21.0.1.1
Operating System and Version: Ubuntu 18.04
using Apache 2.4.29
Php version: 7.3.28

Hello,

This is my first time posting into the Forum. I hope this will be enough information for helping out.

My Issue is as follows:

I have setup SMB shares from Windows file server via External storages. But cant open documents from SMB folders.
When i try to open, for example excel tables from shared SMB server, it occurs an error message. When i try to download them, they are not corrupted. When uploading documents from local server, it is working as expected and you are able to open them. Just Folders from SMB are not showing up in UI.

I´ve already tried multiple solutions without any success:

  • checking out permissions - they are all www-data:www-data
  • smb.conf file → client min and max protocol = NT1
  • replacing icewind directory from older NC instance
  • files:scan --all
  • encryption is disabled
  • db:add-missing-columns
    -encryption:encrypt-all
    -maintenance:update:htaccess
    -AllowEncodedSlashes NoDecode in apache2.conf
    -.htaccess → Allow-Origin

Error Log:

May 17 06:39:00 ubuntu228 sessionclean[666]: PHP Warning: Module ‘apcu’ already loaded in Unknown on line 0
May 17 06:39:00 ubuntu228 sessionclean[666]: PHP Warning: Module ‘imagick’ already loaded in Unknown on line 0
May 17 06:39:00 ubuntu228 sessionclean[666]: PHP Warning: Module ‘imap’ already loaded in Unknown on line 0
May 17 06:39:00 ubuntu228 sessionclean[666]: PHP Warning: Module ‘ldap’ already loaded in Unknown on line 0
May 17 06:39:00 ubuntu228 sessionclean[666]: PHP Warning: Module ‘smbclient’ already loaded in Unknown on line 0
May 17 06:39:00 ubuntu228 systemd[1]: Started Clean php session files.
May 17 06:39:01 ubuntu228 CRON[824]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)

In occ when typing files:scan --all:

Exception during scan: Undefined offset: 1

#0 /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php(226): OCA\Files\Command\Scan->exceptionErr

orHandler(8, ‘Undefined offse…’, ‘/var/www/nextcl…’, 226, Array)

#1 /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php(258): OCA\Files_External\Lib\Storage\SMB->ge

tACL(Object(Icewind\SMB\Native\NativeFileInfo))

#2 /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php(629): OCA\Files_External\Lib\Storage\SMB->ge

tFolderContents(’’)

#3 [internal function: OCA\Files_External\Lib\Storage\SMB->getDirectoryContent(’’)

Because of this, ive checked out /etc/php/apache2 and etc/php/cli, the smbclient.so only exists inside apache2 folder.

I think its maybe because of php-smbclient.
Ive already tried to reinstall and install it again, but it wasnt successfull.

Just wanted to say that ive searched a lot for solving this issue, but cant find a fix for that. So maybe someone got a solution for this.

Thank you in advance.

nextcloud.log:

reamWrapper.php#127",“Code”:0,“Trace”:[{“function”:“onError”,“class”:“OC\Log\ErrorHandler”,“type”:"::",“args”:[2,“stat(): stat failed for ftp://ftp1_eb_marketing:c6821026d87a1be578fa7dfc9ae9fca9f56f66e7d0c1451ef0fe5312e8b76f4f|3b963d1992a655734dd99ea89939ca20|9f1515633b0ab80d9a4b0cb1a7311bd99ec71ba003a549f95eb0b77d839c0f710007a65de1ac282101f101d07a73dc71349d0ccdfc70b3093f884ebf092c08e1|2@transfer.doctoreckstein.de/","/var/www/nextcloud/apps/files_external/lib/Lib/Storage/StreamWrapper.php",127,{“path”:""}]},{“file”:"/var/www/nextcloud/apps/files_external/lib/Lib/Storage/StreamWrapper.php",“line”:127,“function”:“stat”,“args”:[“ftp://ftp1_eb_marketing:c6821026d87a1be578fa7dfc9ae9fca9f56f66e7d0c1451ef0fe5312e8b76f4f|3b963d1992a655734dd99ea89939ca20|9f1515633b0ab80d9a4b0cb1a7311bd99ec71ba003a549f95eb0b77d839c0f710007a65de1ac282101f101d07a73dc71349d0ccdfc70b3093f884ebf092c08e1|2@transver**{“file”:”/var/www/nextcloud/lib/private/Files/Storage/Common.php",“line”:458,“function”:“stat”,“class”:“OCA\Files_External\Lib\Storage\StreamWrapper”,“type”:"->",“args”:[""]},{“file”:"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php",“line”:475,“function”:“test”,“class”:“OC\Files\Storage\Common”,“type”:"->”,“args”:},{“file”:"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php",“line”:70,“function”:“test”,“class”:“OC\Files\Storage\Wrapper\Wrapper”,“type”:"->",“args”:},{“file”:"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php",“line”:84,“function”:“updateAvailability”,“class”:“OC\Files\Storage\Wrapper\Availability”,“type”:"->",“args”:["*** sensitive parameters replaced "]},{“file”:"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php",“line”:93,“function”:“isAvailable”,“class”:“OC\Files\Storage\Wrapper\Availability”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php",“line”:383,“function”:“checkAvailability”,“class”:“OC\Files\Storage\Wrapper\Availability”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php",“line”:382,“function”:“hasUpdated”,“class”:“OC\Files\Storage\Wrapper\Availability”,“type”:"->",“args”:["",1616602518]},{“file”:"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php",“line”:382,“function”:“hasUpdated”,“class”:“OC\Files\Storage\Wrapper\Wrapper”,“type”:"->",“args”:["",1616602518]},{“file”:"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php",“line”:382,“function”:“hasUpdated”,“class”:“OC\Files\Storage\Wrapper\Wrapper”,“type”:"->",“args”:["",1616602518]},{“file”:"/var/www/nextcloud/lib/private/Files/Cache/Watcher.php",“line”:128,“function”:“hasUpdated”,“class”:“OC\Files\Storage\Wrapper\Wrapper”,“type”:"->",“args”:["",1616602518]},{“file”:"/var/www/nextcloud/lib/private/Files/View.php",“line”:1348,“function”:“needsUpdate”,“class”:“OC\Files\Cache\Watcher”,“type”:"->",“args”:["",{“class”:“OC\Files\Cache\CacheEntry”}]},{“file”:"/var/www/nextcloud/lib/private/Files/View.php",“line”:1390,“function”:“getCacheEntry”,“class”:“OC\Files\View”,“type”:"->",“args”:[{“mountPoint”:"/user/files/FTP Transfer/",“cache”:{“class”:“OC\Files\Cache\Cache”},“scanner”:{“class”:“OC\Files\Cache\Scanner”},“watcher”:null,“propagator”:null,“updater”:null,“class”:“OCA\RansomwareProtection\StorageWrapper”},"","/FTP Transfer"]},{“file”:"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php",“line”:331,“function”:“getFileInfo”,“class”:“OC\Files\View”,“type”:"->",“args”:["/farkas/files/FTP Transfer",false]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",“line”:765,“function”:“getQuotaInfo”,“class”:“OCA\DAV\Connector\Sabre\Directory”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php",“line”:95,“function”:“Sabre\DAV\{closure}”,“class”:“Sabre\DAV\CorePlugin”,“type”:"->",“args”:[" sensitive parameters replaced ***"]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",“line”:769,“function”:“handle”,“class”:“Sabre\DAV\PropFind”,“type”:"->",“args”:["{DAV:}quota-available-bytes",{“class”:“Closure”}]},{“file”:"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",“line”:89,“function”:“propFind”,“class”:“Sabre\DAV\CorePlugin”,“type”:"->",“args”:[{“class”:“Sabre\DAV\PropFind”},{“class”:“OCA\DAV\Connector\Sabre\Directory”}]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:1052,“function”:“emit”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[“propFind”,[{“class”:“Sabre\DAV\PropFind”},{“class”:“OCA\DAV\Connector\Sabre\Directory”}]]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:984,“function”:“getPropertiesByNode”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[{“class”:“Sabre\DAV\PropFind”},{“class”:“OCA\DAV\Connector\Sabre\Directory”}]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:1661,“function”:“getPropertiesIteratorForPath”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[“files/user”,["{DAV:}getlastmodified","{DAV:}getetag","{DAV:}getcontenttype","{DAV:}resourcetype","{http://owncloud.org/ns}fileid",“And 14 more entries, set log level to debug to see all entries”],1]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:1646,“function”:“writeMultiStatus”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[{“elementMap”:,“contextUri”:"/nextcloud/remote.php/dav/",“namespaceMap”:{“DAV:”:“d”,“http://sabredav.org/ns":“s”,“http://owncloud.org/ns”:“oc”,“http://nextcloud.org/ns”:“nc”},“classMap”:[],"class”:“Sabre\Xml\Writer”},{“class”:“Generator”},false]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",“line”:346,“function”:“generateMultiStatus”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[{“class”:“Generator”},false]},{“file”:"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",“line”:89,“function”:“httpPropFind”,“class”:“Sabre\DAV\CorePlugin”,“type”:"->",“args”:[{“class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]},{“file”:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:472,“function”:“emit”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[“method:PROPFIND”,[{“class”:“Sabre\HTTP\Request”

I appreciate your effort to describe your problem in detail and provide as much information as possible, but in this case you should have tried to find an answer on your question by using the search function of the forum first to prevent double postings :wink:

This is a well-known issue and has already been reported/discussed here: