online
online copied to clipboard
PDF save as or conversion doesn't work
Describe the Bug
Exporting to PDF from the web interface, or converting to PDF using the conversion API fail.
Steps to Reproduce
- Build CODE
make run- Open the URL of a default document
- Save as PDF
- (nothing happens)
Expected Behavior
Save as PDF work: it opens in browser OR save.
Actual Behavior
Nothing happens.
Screenshots
Desktop
(Please complete the following information)
- OS: Linux
- Browser: Firefox
- Version: [e.g. 114.0]
Smartphone
n/a
Additional Context
Converting to a Microsoft format do work. (DOCX or PPTX) This happen with Writer or Impress (ODT or ODP as source respectively).
curl -k -F "[email protected]" https://127.0.0.1:9980/cool/convert-to/pdf returns 0 bytes.
the error in the console:
warn:lok:676643:676641:desktop/source/lib/init.cxx:246: lok exception 'exception: SfxBaseModel::impl_store <file:///tmp/user/docs/CollaboraOnline_UpdatedLayout_Transitions_WIP.pdf> failed: 0xc10(Error Area:Io Class:Write Code:16) at /home/hub/Documents/Collabora/cool-dev/libreoffice-core/sfx2/source/doc/sfxbasemodel.cxx:3237 at /home/hub/Documents/Collabora/cool-dev/libreoffice-core/sfx2/source/doc/sfxbasemodel.cxx:1793'
When using the web UI, the error is:
warn:lok:676643:676641:desktop/source/lib/init.cxx:246: lok exception 'exception: SfxBaseModel::impl_store <file:///tmp/user/docs/CollaboraOnline_UpdatedLayout_Transitions_WIP.pdf> failed: 0xc10(Error Area:Io Class:Write Code:16) at /home/hub/Documents/Collabora/cool-dev/libreoffice-core/sfx2/source/doc/sfxbasemodel.cxx:3237 at /home/hub/Documents/Collabora/cool-dev/libreoffice-core/sfx2/source/doc/sfxbasemodel.cxx:1793'
online is at 7cebe0f0419d2e7502ceafb7f5a1ce0029c38464
libreoffice-core is at 2d9e0a7ffa29a0882b92c55e90189e509124e2de
But code from a few days ago had the same problem.
PDFExport::Export throw:
N3com3sun4star3uno9ExceptionE msg: NSS_NoDB_Init failed with SEC_ERROR_PKCS11_DEVICE_ERROR (-8023) at /home/hub/Documents/Collabora/cool-dev/libreoffice-core/comphelper/source/misc/hash.cxx:87
I see two problems:
- it fails, and that looks like a config problem (possibly on my side), but the failure is obscure. I had to dig deep and trace to get the exception above.
- the download hang. I think the API response should have been terminated possibly with an HTTP error code. Similarly in the web UI there is no error either. Just nothing.
The lack of /dev/random and /dev/urandom in the jails seems to be the reason.
A workaround is to build core with --with-tls=openssl. At least in a dev setup this works.
I wonder if this is not #5088 also.
If this still reproduces, and seeing as step 1 is "Build CODE", is there output from:
make check-for-system-nss
in online?
(core needs to be built using --without-system-nss for nss to work in chroot jail the above attempts to check for that)