Unable to download or enable Community Document Server

Not a glance, the log i posted above showed nothing about the failed download.

is this not a timeout?

should be solved on nc18.0.1.

18.0.1 didn’t solve the problem, still couldn’t install the Community Document Server. However, i did try to install the app by manually uploading it. Still, when i tried to ‘Enable’ it, and ‘An error occured during the request. Unable to proceed.’ notice popped up again. At least a log appeared. Here it is:

Error index Exception: fclose() expects parameter 1 to be resource, null given

0. /home/xiom3155/public_html/cloud/lib/private/AppFramework/App.php - line 125:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Settings ... {}, "enableApps")
1. /home/xiom3155/public_html/cloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:OC\AppFramework\App::main("OCA\\Settin ... r", "enableApps", OC\AppFramew ... {}, { _route: "s ... "})
2. <<closure>>OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "s ... "})
3. /home/xiom3155/public_html/cloud/lib/private/Route/Router.php - line 299:call_user_func(OC\AppFramew ... {}, { _route: "s ... "})
4. /home/xiom3155/public_html/cloud/lib/base.php - line 1008:OC\Route\Router->match("/settings/apps/enable")
5. /home/xiom3155/public_html/cloud/index.php - line 38:OC::handleRequest()

Caused by TypeError: fclose() expects parameter 1 to be resource, null given

0. /home/xiom3155/public_html/cloud/apps/documentserver_community/lib/Document/FontManager.php - line 66:fclose(null)
1. /home/xiom3155/public_html/cloud/apps/documentserver_community/lib/LocalAppData.php - line 78:OCA\DocumentServer\Document\FontManager->OCA\DocumentServer\Document\{closure}("*** sensiti ... *")
2. /home/xiom3155/public_html/cloud/apps/documentserver_community/lib/Document/FontManager.php - line 72:OCA\DocumentServer\LocalAppData->getReadLocalPath(OC\Files\Sim ... {}, Closure {})
3. /home/xiom3155/public_html/cloud/apps/documentserver_community/lib/Migration/RebuildFonts.php - line 46:OCA\DocumentServer\Document\FontManager->rebuildFonts()
4. /home/xiom3155/public_html/cloud/lib/private/Repair.php - line 104:OCA\DocumentServer\Migration\RebuildFonts->run(OC\Repair {})
5. /home/xiom3155/public_html/cloud/lib/private/legacy/app.php - line 981:OC\Repair->run()
6. /home/xiom3155/public_html/cloud/lib/private/Installer.php - line 154:OC_App::executeRepairSteps("documentserver_community", { step: "OCA ... "})
7. /home/xiom3155/public_html/cloud/apps/settings/lib/Controller/AppSettingsController.php - line 443:OC\Installer->installApp("documentserver_community")
8. /home/xiom3155/public_html/cloud/lib/private/AppFramework/Http/Dispatcher.php - line 170:OCA\Settings\Controller\AppSettingsController->enableApps([ "documentserver_community"], [])
9. /home/xiom3155/public_html/cloud/lib/private/AppFramework/Http/Dispatcher.php - line 99:OC\AppFramework\Http\Dispatcher->executeController(OCA\Settings ... {}, "enableApps")
10. /home/xiom3155/public_html/cloud/lib/private/AppFramework/App.php - line 125:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Settings ... {}, "enableApps")
11. /home/xiom3155/public_html/cloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:OC\AppFramework\App::main("OCA\\Settin ... r", "enableApps", OC\AppFramew ... {}, { _route: "s ... "})
12. <<closure>>OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "s ... "})
13. /home/xiom3155/public_html/cloud/lib/private/Route/Router.php - line 299:call_user_func(OC\AppFramew ... {}, { _route: "s ... "})
14. /home/xiom3155/public_html/cloud/lib/base.php - line 1008:OC\Route\Router->match("/settings/apps/enable")
15. /home/xiom3155/public_html/cloud/index.php - line 38:OC::handleRequest() 2020-02-25T13:27:49+0700
Error PHP Undefined offset: 0 at /home/xiom3155/public_html/cloud/apps/documentserver_community/lib/Document/FontManager.php#66 2020-02-25T13:27:49+0700
Error PHP proc_open() has been disabled for security reasons at /home/xiom3155/public_html/cloud/apps/documentserver_community/lib/Document/FontManager.php#64 2020-02-25T13:27:49+0700

maybe it happens b/c nc 18.x would need php 7.3? at least i read something like this somewhere.

EDIT
i now know better… --> https://docs.nextcloud.com/server/18/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

Do i need to upgrade my PHP to 7.3?

No, running it myself with 7.2 without trouble.

See official docs:

https://docs.nextcloud.com/server/18/admin_manual/installation/system_requirements.html?highlight=requirement

You neee NC 18.0.1 to be able to run the Document Server app for OnlyOffice.

Yep, i’ve upgraded mine to 18.0.1, forgot to update the original post. In this reply i have posted a new log regarding the failed ‘Enable’. I’ve also edited the original post.

@mardijker

thanks for letting us know… and that’s exactly the reason why you shouldn’t crosspost your issues around the forum (and even avoid bringing out links to the original posting)

Anyone happened to know what’s wrong with the log?

I have the same issue as the OP with the same three Admin Logging outputs:

Error	index	Exception: fclose() expects parameter 1 to be resource, null given

Error	PHP	Undefined offset: 0 at /var/www/vhosts/example.com/cloud.example.com/apps/documentserver_community/lib/Document/FontManager.php#66

Error	PHP	proc_open() has been disabled for security reasons at /var/www/vhosts/example.com/cloud.example.com/apps/documentserver_community/lib/Document/FontManager.php#64

My Setup:
Nextcloud 18.03
PHP 7.2.29
Just like the OP his is on shared hosting thus no sudo rights.

Attempts at solution so far:

  1. I have tried extending timeout times at “path/to/nextcloud/lib/private/Http/Client/Client.php” with no difference in the matter.

  2. A manual installation of the app files to nextcloud/apps displays the app in the settings it won’t be enabled and produces an error

@mardijker I believe I have found the source of our problem which is twofold:

Firstly, I solved the curl timeout by modifying the installer.php file ( lib/private/Installer.php) and increasing the timeout value from 120 to something sufficiently high (found this solution in a similar Githib discussion).

The second problem is that the “proc_open” php function is disabled by my shared webhoster by default since “most popular applications do not use these functions and can be operated without limitations”.

Have you checked in your php configuration or with your webhoster if this php setting is enabled?

I can imagine other users that run Nextcloud on shared servers might encounter the same issue. This is a pity since we haven’t been able to use Onlyoffice before either since we do not have root access.
Is there no way to use the Community Document Server without this PHP function?

1 Like

This step of changing the timeout in the Installer.php file worked for me.

I changed mine from 120 to 360 and I was able to download and install it.

Oh, you are correct. Seems like my shared hosting won’t allow this php function enabled for ‘security reason’.

If the Community Document Server could run without this function, it would be great. Until then, guess i’m stuck with no option here.

Thank you for the finding the answer.

I have a fresh and standard NC 18.03 and I still cannot download/enable Community Doc Server. Not working even with timeout (in Installer.php) of 360 or 720. Is there any fix?

Could you verify that you have the same issue by checking the admin log and sharing the (anonymized) log with here?

Please see below. I don’t see other error when I try to install CDS.

[PHP] Error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 315857416 bytes) at /var/www/html/nextcloud/lib/private/Installer.php#285

POST /nextcloud/index.php/settings/apps/enable
from 126.74.131.58 by admin at 2020-04-14T21:19:30+00:00

Just in case anybody is interested, I made it work. This after tuning some memory size in php.

Error: 134217728 bytes exhausted (tried to allocate 345165344 bytes)
The above solutions did not help me. The way i fixed this issue was to add the following line to my .htaccess file.

“php_value memory_limit 350M”