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

PDF Export didn't work (Chromium headless) #7

Closed
wolf-in-sheeps-clothing opened this issue Apr 17, 2019 · 9 comments
Closed

PDF Export didn't work (Chromium headless) #7

wolf-in-sheeps-clothing opened this issue Apr 17, 2019 · 9 comments
Assignees

Comments

@wolf-in-sheeps-clothing

Describe the bug

If I choose Download -> PDF the following error is shown:

Can't export

#0 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Reporting\Controllers\ReportController->downloadAction()
#1 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#2 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#3 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#4 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch()
#5 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#6 {main}

Expected behavior

PDF Export should work :-)

Your Environment

  • Module version: Reporting v0.9.0,
  • Dependent module versions: IDO Report v0.9.0, PDF Export v0.9.0, Reactbundle v0.5.1, IPL v0.2.1, Chrome installed like https://github.com/Icinga/icingaweb2-module-pdfexport/blob/master/doc/02-Installation.md
  • Icinga Web 2 version and modules (System - About): 2.6.2
  • Web browser and version: Chrome 73.0.3683.103 (Offizieller Build) (64-Bit)
  • Icinga 2 version used (icinga2 --version): r2.10.4-1
  • PHP version used (php --version): PHP 7.0.33
  • Server operating system and version: Ubuntu 16.04.6 LTS
@dnsmichi
Copy link

Ensure that pdfexport dependencies are fulfilled, specifically chrome. https://github.com/Icinga/icingaweb2-module-pdfexport/blob/master/doc/02-Installation.md

@wolf-in-sheeps-clothing
Copy link
Author

Hi Michael,

yes, all dependencies are fulfilled! See my comment -> Your Environment -> Dependent module versions

But I think I'm not alone: Icinga/icingaweb2-module-pdfexport#7

@lokidaibel
Copy link

Same here. Using Chromium instead of Chrome but getting the same.
Double check all requirements. Same problem.
ipl -> latest release
reactbundle -> latest release
icingweb2 -> latest release
RHEL 7 latest release
Apache 2.4 latest release

@lokidaibel
Copy link

So chromium dont work. Chrome does.

@dnsmichi
Copy link

Ok, might need further tests then. I couldn't get chromium-headless from EPEL to work, my last debug point where some missing library references after I switched to Icinga 2.11 again.

@dnsmichi dnsmichi changed the title PDF Export didn't work PDF Export didn't work (Chromium headless) Apr 18, 2019
@wolf-in-sheeps-clothing
Copy link
Author

To clarify: I installed Chrome Stable.

google-chrome --version
Google Chrome 73.0.3683.103

@viaLAN-joh
Copy link

Same here, with the diffenrence that Debian Stretch is used.
Installed google-chrome-stable today
But I think I found the reason: In Debian the google-chrome bin is linked to /usr/bin/google-chrome instead of the expexted /bin/google-chrome (which is hardcoded in library/Pdfexport/ProvidedHook/Pdfexport.php)
Create a link in /bin an it works.

@wolf-in-sheeps-clothing
Copy link
Author

Yeah, that's the solution (quick and dirty). After setting the symlink everything looks fine
But in the long run, the PDF module should be adapted.
Thanks a lot.

@wolf-in-sheeps-clothing
Copy link
Author

I think we can close this.

Look at: Icinga/icingaweb2-module-pdfexport@2d34431

Now you can edit the binary path to "Google Chrome" in the PDF Export Modul Frontend (Master)!
Set it to /usr/bin/google-chrome (Debian / Ubuntu) and everything works fine.

Many thanks to @lippserd -> Thumbs up!

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

No branches or pull requests

4 participants