NextCloud fails to share SMB connected folder

Hi everyone,

Nextcloud version (eg, 20.0.5): 24.0.1.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.4
Apache or nginx version (eg, Apache 2.4.25): 2.4.41
PHP version (eg, 7.4): 7.4.3

The issue you are facing:

NextCloud is connected to a local fileshare via SMB. Authentication is done via LDAP.
Whenever I try to share a folder to someone external from the the fileserver via “Share link”, the page fails to load. All you can see is a circle spinning. Even though the page somehow fails to fully load, it is possible to download the files.

Sharing single files work without any issues.

Any ideas what causes this issue?

nextcloud.log:

{"reqId":"UDPWjO8Hc8PuDRlFv1o0","level":0,"time":"June 02, 2022 10:49:55","remoteAddr":"*IPAdress*","user":"--","app":"scss_cacher","method":"GET","url":"/index.php/s/Pb2z7aq4eCM6kYd","message":"SCSSCacher::process ordinary check follows","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","version":"24.0.1.1"}
{"reqId":"UDPWjO8Hc8PuDRlFv1o0","level":0,"time":"June 02, 2022 10:49:55","remoteAddr":"*IPAdress*","user":"--","app":"scss_cacher","method":"GET","url":"/index.php/s/Pb2z7aq4eCM6kYd","message":"SCSSCacher::isCached f244-4011-merged.css isCachedCache is expired or unset","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","version":"24.0.1.1"}
{"reqId":"UDPWjO8Hc8PuDRlFv1o0","level":0,"time":"June 02, 2022 10:49:55","remoteAddr":"*IPAdress*","user":"--","app":"scss_cacher","method":"GET","url":"/index.php/s/Pb2z7aq4eCM6kYd","message":"SCSSCacher::isCached f244-4011-merged.css dependencies successfully cached for 5 minutes","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","version":"24.0.1.1"}
{"reqId":"UDPWjO8Hc8PuDRlFv1o0","level":0,"time":"June 02, 2022 10:49:55","remoteAddr":"*IPAdress*","user":"--","app":"scss_cacher","method":"GET","url":"/index.php/s/Pb2z7aq4eCM6kYd","message":"SCSSCacher::process ordinary check follows","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","version":"24.0.1.1"}
{"reqId":"UDPWjO8Hc8PuDRlFv1o0","level":0,"time":"June 02, 2022 10:49:55","remoteAddr":"*IPAdress*","user":"--","app":"scss_cacher","method":"GET","url":"/index.php/s/Pb2z7aq4eCM6kYd","message":"SCSSCacher::isCached 8931-4011-icons.css isCachedCache is expired or unset","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","version":"24.0.1.1"}
{"reqId":"UDPWjO8Hc8PuDRlFv1o0","level":0,"time":"June 02, 2022 10:49:55","remoteAddr":"*IPAdress*","user":"--","app":"scss_cacher","method":"GET","url":"/index.php/s/Pb2z7aq4eCM6kYd","message":"SCSSCacher::isCached 8931-4011-icons.css dependencies successfully cached for 5 minutes","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","version":"24.0.1.1"}
{"reqId":"bddzKHJWts3M6nDsvdVa","level":0,"time":"June 02, 2022 10:49:56","remoteAddr":"*IPAdress*","user":"--","app":"webdav","method":"PROPFIND","url":"/public.php/webdav/","message":"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","version":"24.0.1.1","exception":{"Exception":"Sabre\\DAV\\Exception\\NotFound","Message":"","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"OCA\\DAV\\Files\\Sharing\\PublicLinkCheckPlugin","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/appinfo/v1/publicwebdav.php","line":113,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/public.php","line":80,"args":["/var/www/html/nextcloud/apps/dav/appinfo/v1/publicwebdav.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php","Line":62,"CustomMessage":"--"}}