External Storage - Internal Server Error

Hi.

I recently installed Nextcloud on FreeNAS using a script located here https://github.com/danb35/freenas-iocage-nextcloud. Everything is working perfectly, except I’m unable to access my external storage share (Windows SMB/CIFS share).

Even though I can access the share without issue on other devices and I get the green tick when adding the external storage location, as soon as I try to access it under any Nextcloud user I get an “Internal Server Error” page.

I am able to access any local storage shares but not SMB/CIFS.

The log shows me 3 different errors, the first two:

Error PHP Undefined index: debugMode at /usr/local/www/nextcloud/core/templates/exception.php#26 2020-05-01T14:30:32+1200

|Error|PHP|Undefined index: debugMode at /usr/local/www/nextcloud/core/templates/exception.php#17|

then followed by the third which is quite long:

Sabre\DAV\Exception: Invalid request for / (InvalidTypeException)
[webdav] Fatal: Sabre\DAV\Exception: Invalid request for / (InvalidTypeException) at <<closure>>

0. /usr/local/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 418
   OCA\DAV\Connector\Sabre\File->convertToSabreException(Icewind\SMB\Exce ... {})
1. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 85
   OCA\DAV\Connector\Sabre\File->get()
2. <<closure>>
   Sabre\DAV\CorePlugin->httpGet(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
3. /usr/local/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
   call_user_func_array([Sabre\DAV\CorePlugin {},"httpGet"], [Sabre\HTTP\Requ ... }])
4. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
   Sabre\Event\EventEmitter->emit("method:GET", [Sabre\HTTP\Requ ... }])
5. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
   Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
6. /usr/local/www/nextcloud/apps/dav/appinfo/v1/webdav.php line 82
   Sabre\DAV\Server->exec()
7. /usr/local/www/nextcloud/remote.php line 165
   require_once("/usr/local/www/ ... p")

GET /remote.php/webdav/files
from 103.13.39.16 by jonathan at 2020-04-30T11:05:47+12:00

Nextcloud version : 18.0.4
Operating system and version: FreeNAS-11.3-U2
Apache or nginx version (eg, Apache 2.4.25): Not sure
PHP version (eg, 7.1): Not sure

Same problem.

The bug has been reported and there is a discussion logged here: https://github.com/nextcloud/server/issues/20622

Thank you @blacksteel1288.