richdocumentscode
richdocumentscode copied to clipboard
no_fontconfig error
NC 23.0.0 Collabora Online 5.0.1 Collabora CODE Server 21.11.6 PHP 8.0.14
I am on a shared hosting. When I try to open a document I get a "Could not start server. Please try later" message. According to the NC settings the server is up and running. But when I go to
https://mycloud.com/apps/richdocumentscode/proxy.php?status I get this message:
{"status":"error","error":"no_fontconfig"}
I checked with my provider and he confirmed that fontconfig is installed and running. The NC logs show this:
Exception: Could not find urlsrc in WOPI /var/www/clients/client309/web1234/web/mycloud.tv/apps/richdocuments/lib/TokenManager.php - line 202:
OCA\Richdocuments\WOPI\Parser->getUrlSrc()
/var/www/clients/client309/web1234/web/mycloud.tv/apps/richdocuments/lib/Controller/DocumentController.php - line 222:
OCA\Richdocuments\TokenManager->getToken("*** sensiti ... *")
/var/www/clients/client309/web1234/web/mycloud.tv/lib/private/AppFramework/Http/Dispatcher.php - line 217:
OCA\Richdocuments\Controller\DocumentController->index()
/var/www/clients/client309/web1234/web/mycloud.tv/lib/private/AppFramework/Http/Dispatcher.php - line 126:
OC\AppFramework\Http\Dispatcher->executeController()
/var/www/clients/client309/web1234/web/mycloud.tv/lib/private/AppFramework/App.php - line 156:
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/clients/client309/web1234/web/mycloud.tv/lib/private/Route/Router.php - line 302:
OC\AppFramework\App::main()
/var/www/clients/client309/web1234/web/mycloud.tv/lib/base.php - line 1006:
OC\Route\Router->match()
/var/www/clients/client309/web1234/web/mycloud.tv/index.php - line 36:
OC::handleRequest()
So the next thing I tried was to downgrade Collabora Online and the CODE Server step by step. With versions Collabora Online 4.2.3 and Collabora CODE Server 6.4.608 the error was gone. I could create, open and edit documents again.
After a while I checked back and found out that the "error":"no_fontconfig" was back again. But when I opened a document, there was a short error message that fontconfig was not installed, which disappeared and opened the document anyway. The status was back to ok. Does the CODE server start the module? Anyway it would be nice if the latest versions would be working without this issue.
Nobody commented on this issue. Finally I found a workaround myself. I post it here in case someone else runs into the same issue: Open proxy.php in /richdocumentscode and comment out:
exec('( /sbin/ldconfig -p || scanelf -l ) | grep fontconfig > /dev/null 2>&1', $output, $return);
// if ($return)
// return 'no_fontconfig';
fontconfig will then be started and documents open. This is just a workaround!! I hope this will be fixed soon with an update.
I guess this is not a Collabora issue but a problem with the server configuration. fontconfig needs to be installed and the php process needs sufficient rights to call the exec command
Indeed @weinbrenner.
If fontconfig is installed and this check still fails, please provide the output of running this command from your NC server command-line:
( /sbin/ldconfig -p || scanelf -l ) | grep fontconfig
@joshtrichards I have the same error. I can provide the response, but don't know how to run that command. I am forced to do the same.
root@members:/var/snap/nextcloud/39212/nextcloud/extra-apps/richdocumentscode# exec('( /sbin/ldconfig -p || scanelf -l ) | grep fontconfig
This is the response I receive. ^^^
I guess this is not a Collabora issue but a problem with the server configuration. fontconfig needs to be installed and the php process needs sufficient rights to call the exec command
Can you please explain why fontconfig needs to be installed? If the lines are commented out, it's working, so I am just curious what it's doing.
I guess this is not a Collabora issue but a problem with the server configuration. fontconfig needs to be installed and the php process needs sufficient rights to call the exec command
Can you please explain why fontconfig needs to be installed? If the lines are commented out, it's working, so I am just curious what it's doing.
Enables you to install your own fonts. If you don't need any it can be fine to just comment out the check...
I guess this is not a Collabora issue but a problem with the server configuration. fontconfig needs to be installed and the php process needs sufficient rights to call the exec command
Can you please explain why fontconfig needs to be installed? If the lines are commented out, it's working, so I am just curious what it's doing.
Enables you to install your own fonts. If you don't need any it can be fine to just comment out the check...
Thank you for your response. Makes sense, but I still don’t get, why this needs to lead to an error. There are many users on shared hosters that are affected by this.