Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
taschenlampe opened this issue Apr 6, 2023 · 16 comments

Comments

@taschenlampe
Copy link

taschenlampe commented Apr 6, 2023

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!

@komoricodrutz
Copy link

komoricodrutz commented Jul 7, 2023

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?

@Adi-18
Copy link

Adi-18 commented Jul 10, 2023

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

@S0me6uy
Copy link

S0me6uy commented Aug 28, 2023

Hello,

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

@elhossary
Copy link

Hi,
Same here, Ubuntu 22.04, NC 27.0.2

@zazo80
Copy link

zazo80 commented Sep 1, 2023

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('...')

@komoricodrutz
Copy link

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.

@janisstreib
Copy link

janisstreib commented Oct 4, 2023

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 .

@cernst72
Copy link

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...')

@VodyakovDenis
Copy link

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('...')

@TPSONLINE-INFO
Copy link

Hello got the same here
NC7 28.0.2
Any idea?

@robwmi
Copy link

robwmi commented Apr 21, 2024

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

@floot
Copy link

floot commented Apr 28, 2024

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?

@susobaco
Copy link

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

@zsiga19
Copy link

zsiga19 commented Aug 22, 2024

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

@Albirew
Copy link

Albirew commented Nov 21, 2024

I believe it's not linked directly to NxC version, but of the difference between documentserver app and onlyoffice client app:

So I believe this issue depends on #312

If you really want to use OnlyOffice and can run a docker container, you can check here

@nemihome
Copy link

nemihome commented Dec 20, 2024

Same here with Nextcloud 30.04 and latest app versions without docker Ubuntu 24.04

Community Document 0.1.20
OnlyOffice 9.5.0 (inactive)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests