Bug 123861 - Headless conversion fails silently - enhance error message
Summary: Headless conversion fails silently - enhance error message
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
(earliest affected)
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2019-03-05 09:12 UTC by loff
Modified: 2019-04-18 18:49 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

test input (324.68 KB, application/vnd.oasis.opendocument.text)
2019-03-05 09:12 UTC, loff

Note You need to log in before you can comment on or make changes to this bug.
Description loff 2019-03-05 09:12:51 UTC
Created attachment 149733 [details]
test input

The command

export HOME=/home/testuser/X-C-201941787 && libreoffice --headless --convert-to pdf --outdir /home/testuser/X-C-201941787 /home/testuser/X-C-201941787/filledTemplate.odt

does not generate any pdf on some systems (i.e. Linux amc-dev 3.16.0-6-amd64 #1 SMP Debian 3.16.57-2 (2018-07-14) x86_64 GNU/Linux). Same command works for root. X-C-201941787 is a temporary directory, created empty before running the conversion (in production, testuser is Apache, doing the conversion for web clients). LibreOffice is standard Debian package, LibreOffice 430m0(Build:2). filledTemplate.odt is attached but nothing special - the failure should be reproducible with basically any input. The underlying problem (found with strace) is the existence of a directory, /var/spool/libreoffice/uno_packages/cache/uno_packages/ , which is only readable by root.

That problem is _not_ the subject of this bug report - I don't know where the directory came from (although since it appeared on both development and production machines, there probably is a way to provoke it), and it might well be outside LibreOffice. What I'd expect from LibreOffice is to report (say on standard error - it already uses it for successful conversions) that it cannot read a directory it needs.
Comment 1 Xisco Faulí 2019-04-16 08:41:55 UTC
Thank you for reporting the bug.
it seems you're using an old version of LibreOffice.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 2 loff 2019-04-18 18:49:53 UTC
I'd say it's not reproducible in LibreOffice 6.2.2: in the first place, LibreOffice no longer seems to use /var/spool/libreoffice/uno_packages/cache/uno_packages/ , and restricting access rights to /opt/libreoffice6.2/share/uno_packages/cache/uno_packages/ instead results in

export HOME=/home/testuser/X-C-201941787 && libreoffice6.2 --headless --convert-to pdf --outdir /home/testuser/X-C-201941787 /home/testuser/X-C-201941787/filledTemplate.odt


LibreOffice 6.2 - Fatal Error: The application cannot be started. 
Extension Manager: exception in synchronize

- not excessively informative, but undeniably an error message.