Unable to "share link" to SMB storage. Internal Server Error

Sorry to hear you’re facing problems :slight_frown:

If you’re urgently looking for support to keep your business running, consider checking out our paid support options.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the following as you can (you can cut and paste this into your topic):

Nextcloud version (eg, 10.0.2): 11.0.3
Operating system and version (eg, Ubuntu 16.04): 16.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.18
PHP version (eg, 5.6): 7.0.15
Is this the first time you’ve seen this error?: Hasn’t worked yet

Can you reliably replicate it? (If so, please outline steps):Yes

Try to “share link” from a file in an External Storage location, copy the link and attempt to access it

You receive Internal Server Error

The issue you are facing:

I can use “share link” from a spreadsheet that is in my user folder and if I send that to someone it will get them to the file. They cannot edit it but at least they can see it.

If I attempt to use the share link option from any external drive/External Storage (either the External Storage app using SMB/CIFS or local pointing to a mount /media/Share) I receive my background with:

Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Technical details
Remote Address: xxx.xxx.xxx.xx
Request ID: 6Pu+/eSb/jT0qJ1s2/k+

If I attempt to use the link in the same browser that is logged into nextcloud already, I can get to and edit the file but I think because I am authenticating it is allowing me. The people we are sending the “share link” to will not have credentials.

The output of your Nextcloud log in Admin > Logging:

expanded error:

Error: Call to a member function getUID() on null

/var/www/nextcloud/apps/richdocuments/lib/Controller/DocumentController.php - line 164: OCA\Richdocuments\TokenManager->getToken(*** sensitive parameters replaced ***)
[internal function] OCA\Richdocuments\Controller\DocumentController->publicPage(‘T7xelXKbgulFO70’, ‘testspreadsheet…’)
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 160: call_user_func_array(Array, Array)
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 90: OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Richdocuments\Controller\DocumentController), ‘publicPage’)
/var/www/nextcloud/lib/private/AppFramework/App.php - line 114: OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Richdocuments\Controller\DocumentController), ‘publicPage’)
/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main(‘OCA\Richdocumen…’, ‘publicPage’, Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
/var/www/nextcloud/lib/private/Route/Router.php - line 299: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
/var/www/nextcloud/lib/base.php - line 1010: OC\Route\Router->match(’/apps/richdocum…’)
/var/www/nextcloud/index.php - line 40: OC handleRequest()

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

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

Remember, this information may be requested if it isn’t supplied; for fastest response please provide as much as you can :heart: Feel free to use a pastebin service, otherwise log files can be indented with 4 spaces on each line to present them in a friendlier way on the forum.