Thanks for providing this module!
Describe the bug
When creating a PDF report, the PDF download kept loading.
To Reproduce
Steps to reproduce the behavior:
- I tried to download a PDF of my Icinga Report under Reporting > Reports > [The Report] > Download > PDF
- A new browser tab opened, but the PDF kept loading and never finished.
Expected behavior
I expected that the PDF is shown.
Your Environment
- Module version: v.0.12.0
- Dependent module versions:
- Icinga Web 2 version and modules (System - About):
Icinga Web 2 Version 2.12.6
Git commit a9e04752c5be0c015d6b2a3c5b2f752fece16487
PHP Version 8.4.16
Git commit date 2025-11-18
Loaded Libraries
icinga/icinga-php-library 0.18.1
icinga/icinga-php-thirdparty 0.14.0
Loaded Modules
director 1.11.5
icingadb 1.3.0
incubator 0.23.0
pdfexport 0.12.0
reporting 1.0.5
-
Chrome/Chromium version (google-chrome --version):
I used the debian chromium, which is probably unspported, but it would be nice if it worked: chromium-headless-shell 144.0.7559.109-2~deb13u1. I used the local command line version, not the remote config.
-
Web browser and version: 140.7.0esr (64-bit)
-
PHP version used (php --version):
PHP 8.4.16 (cli) (built: Dec 18 2025 21:19:25) (NTS)
Copyright (c) The PHP Group
Built by Debian
Zend Engine v4.4.16, Copyright (c) Zend Technologies
with Zend OPcache v8.4.16, Copyright (c), by Zend Technologies
- Server operating system and version: Debian 13
Additional context
I performed a bit printf-Debugging and the cause was that the Loop::run in HeadlessChrome.php did never terminate. I am not really proficient in async PHP programming and the code base, but I was able to fix it by adding the following before $chrome->terminate() (Line 349 in HeadlessChrome.php):
foreach($chrome->pipes as $pipe) {
$pipe->close();
}
This is also what ReactPHP recommends (https://reactphp.org/child-process/#termination) when dealing with processes which spawn sub-processes (like Chrome/Chromium does):
Keep the above section in mind if you want to forcefully terminate a process.
If your process spawn sub-processes or implicitly uses the
[wrapping shell mentioned above](https://reactphp.org/child-process/#command),
its file descriptors may be inherited to child processes and terminating the
main process may not necessarily terminate the whole process tree.
It is highly suggested that you explicitly close() all process pipes accordingly
when terminating a process:
Thanks for providing this module!
Describe the bug
When creating a PDF report, the PDF download kept loading.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected that the PDF is shown.
Your Environment
Chrome/Chromium version (
google-chrome --version):I used the debian chromium, which is probably unspported, but it would be nice if it worked:
chromium-headless-shell 144.0.7559.109-2~deb13u1. I used the local command line version, not the remote config.Web browser and version: 140.7.0esr (64-bit)
PHP version used (
php --version):Additional context
I performed a bit
printf-Debugging and the cause was that theLoop::runinHeadlessChrome.phpdid never terminate. I am not really proficient in async PHP programming and the code base, but I was able to fix it by adding the following before$chrome->terminate()(Line 349 inHeadlessChrome.php):This is also what ReactPHP recommends (https://reactphp.org/child-process/#termination) when dealing with processes which spawn sub-processes (like Chrome/Chromium does):