documentserver_community icon indicating copy to clipboard operation
documentserver_community copied to clipboard

"OCA\DocumentServer\Command\Fonts::execute()" must be of the type int, "null" returned.

Open taschenlampe opened this issue 1 year ago • 14 comments

Hi all!

I see this while the maintenance:repair command runs

- Rebuild font library
     - WARNING: Error while trying to rebuild fonts, if you had any custom fonts configured you'll need to run `occ documentserver:fonts --rebuild`
sudo -u www-data php /var/www/nextcloud/occ documentserver:fonts --rebuild
rebuilding
Segmentation fault

An unhandled exception has been thrown:
TypeError: Return value of "OCA\DocumentServer\Command\Fonts::execute()" must be of the type int, "null" returned. in /var/www/nextcloud/apps/recognize/vendor/symfony/console/Command/Command.php:301
Stack trace:
#0 /var/www/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#1 /var/www/nextcloud/apps/recognize/vendor/symfony/console/Application.php(1040): OC\Core\Command\Base->run()
#2 /var/www/nextcloud/apps/recognize/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#3 /var/www/nextcloud/apps/recognize/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#4 /var/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#5 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#6 /var/www/nextcloud/occ(11): require_once('...')
#7 {main}⏎ 

NC: 26.0 OS: "Ubuntu 22.04.2 LTS"

What would you suggest I´d do? Peace!

taschenlampe avatar Apr 06 '23 13:04 taschenlampe

Same issue here, on NC27.0 / TurnkeyLinux Nextcloud, Debian 11.7:

rebuilding
Segmentation fault

An unhandled exception has been thrown:
TypeError: Return value of "OCA\DocumentServer\Command\Fonts::execute()" must be of the type int, "null" returned. in /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php:301
Stack trace:
#0 /var/www/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#1 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run()
#2 /var/www/nextcloud/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#3 /var/www/nextcloud/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#4 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#5 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#6 /var/www/nextcloud/occ(11): require_once('...')
#7 {main}

This also happens on my other NC25.0.8 version:

rebuilding
Segmentation fault

An unhandled exception has been thrown:
TypeError: Return value of "OCA\DocumentServer\Command\Fonts::execute()" must be of the type int, "null" returned. in /var/www/nextcloud/apps/recognize/vendor/symfony/console/Command/Command.php:301
Stack trace:
#0 /var/www/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#1 /var/www/nextcloud/apps/recognize/vendor/symfony/console/Application.php(1040): OC\Core\Command\Base->run()
#2 /var/www/nextcloud/apps/recognize/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#3 /var/www/nextcloud/apps/recognize/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#4 /var/www/nextcloud/lib/private/Console/Application.php(214): Symfony\Component\Console\Application->run()
#5 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#6 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#7 {main}

Can anyone help?

komoricodrutz avatar Jul 07 '23 07:07 komoricodrutz

Same here on Debian GNU/Linux 10 (buster) and NC27.0

Adi-18 avatar Jul 10 '23 08:07 Adi-18

Hello,

Same for me with exactly same log on debian 11 instead and Apache2 on NC27.0.2

S0me6uy avatar Aug 28 '23 19:08 S0me6uy

Hi, Same here, Ubuntu 22.04, NC 27.0.2

elhossary avatar Aug 29 '23 16:08 elhossary

Hi, Same here, Ubunt 20.04 NC 27.0.2

root@dms:/var/www/nextcloud# sudo -u www-data php occ documentserver:fonts --rebuild rebuilding Segmentation fault (core dumped)

An unhandled exception has been thrown: TypeError: Return value of "OCA\DocumentServer\Command\Fonts::execute()" must be of the type int, "null" returned. in /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php:301 Stack trace: #0 /var/www/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run() #1 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run() #2 /var/www/nextcloud/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand() #3 /var/www/nextcloud/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun() #4 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run() #5 /var/www/nextcloud/console.php(100): OC\Console\Application->run() #6 /var/www/nextcloud/occ(11): require_once('...')

zazo80 avatar Sep 01 '23 22:09 zazo80

Adding info so the bug doesn't get closed for inactivity. 3 months later and my 2 NC server instances have been updated to 27.1.1 / 25.0.12 Issue is still the same. Also tried adding some fonts manually with the occ documentserver:fonts --add command and the fonts seem to be added, but then during the rebuild, I get the same error. Once added, the command occ documentserver:fonts lists the installed fonts but then immediately proceeds with spitting out the exact same error and if you try to print the documents, they still show up blank. I also built a third NC Server from scratch, which is also 27.1.1 now and the issue is exactly the same. Related issues #278 and #251 also see no progress. I also found several other related issues, even older than these, but nobody seems to be able to come up with a workable solution.

komoricodrutz avatar Oct 02 '23 10:10 komoricodrutz

Same here. The segfault seems to happen in apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/tools/allfontsgen executed in apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin. The binary seems to originate from the ONLYOFFICE project.

I've tried Manually updating the files from their latest release but the segafult seems to persist. According to dmesg , the segfault happens in libgraphics.so .

janisstreib avatar Oct 04 '23 15:10 janisstreib

Same here using the official docker image nextcloud:28.0.1-apache

$ docker exec -u www-data $(docker ps -q -f name=cl_cloud.1) php occ  documentserver:fonts -v
No fonts added
An unhandled exception has been thrown:
TypeError: Return value of "OCA\DocumentServer\Command\Fonts::execute()" must be of the type int, "null" returned. in /var/www/html/3rdparty/symfony/console/Command/Command.php:301
Stack trace:
#0 /var/www/html/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /var/www/html/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/html/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(OCA\DocumentServer\Command\Fonts), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/html/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/html/lib/private/Console/Application.php(206): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/console.php(100): OC\Console\Application->run()
#6 /var/www/html/occ(11): require_once('/var/www/html/c...')

cernst72 avatar Dec 22 '23 06:12 cernst72

This also happens on 28.0.2 version

TypeError: Return value of "OCA\DocumentServer\Command\Fonts::execute()" must be of the type int, "null" returned. in /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php:301
Stack trace:
#0 /var/www/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#1 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run()
#2 /var/www/nextcloud/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#3 /var/www/nextcloud/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#4 /var/www/nextcloud/lib/private/Console/Application.php(206): Symfony\Component\Console\Application->run()
#5 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#6 /var/www/nextcloud/occ(11): require_once('...')

VodyakovDenis avatar Feb 07 '24 03:02 VodyakovDenis

Hello got the same here NC7 28.0.2 Any idea?

TPSONLINE-INFO avatar Feb 22 '24 07:02 TPSONLINE-INFO

Same here on 28.0.4 FileConverter is also faulting on creating previews for files. I'd be interested in helping to address this issue, but haven't quite figured out where to start yet. If anybody with some background with these processes could get me started in the right direction that would give me a big leg up on this. Thanks for your notes @janisstreib - you've made if further than I have so far!

Actually, I'm getting

allfontsgen[28257]: segfault at 8 ip 00007f7f8c81c4e0 sp 00007ffc9e894da0 error 4 in libUnicodeConverter.so[7f7f8c800000+37000]

That likely being this guy: /var/www/nextcloud/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/libUnicodeConverter.so

robwmi avatar Apr 21 '24 08:04 robwmi

Same on 28.0.5, issue being more than 1 year old now... At least, is there any workaround to this? What are the impacts of this failure with ONLYOFFICE usage?

floot avatar Apr 28 '24 06:04 floot

Same problem, Debian 12 Nextcloud 28.0.5 OnlyOffice 9.2.0 Comunity Document Server 0.1.17

susobaco avatar May 20 '24 06:05 susobaco

Same problem, docker container Nextcloud 29.0.4 Community Document Server 0.1.18 OnlyOffice 9.3.0

zsiga19 avatar Aug 22 '24 08:08 zsiga19