Icinga / icingaweb2-module-pdfexport

PDF export functionality for Icinga Web 2
GNU General Public License v2.0
31 stars 16 forks source link

Uncaught Error: Class 'WebSocket\Client' not found #24

Closed Optimaximal closed 3 years ago

Optimaximal commented 4 years ago

Describe the bug

Cannot export/download PDF report. Icingaweb2 returns the following error:

`Uncaught Error: Class 'WebSocket\Client' not found in /usr/share/icingaweb2/modules/pdfexport/library/Pdfexport/HeadlessChrome.php:333 Stack trace:

0 /usr/share/icingaweb2/modules/pdfexport/library/Pdfexport/HeadlessChrome.php(288): Icinga\Module\Pdfexport\HeadlessChrome->printToPDF('127.0.0.1:35987', '7e73b0f6-6e9e-4...', Array)

1 /usr/share/icingaweb2/modules/reactbundle/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(70): Icinga\Module\Pdfexport\HeadlessChrome->Icinga\Module\Pdfexport{closure}('\nDevTools liste...')

2 /usr/share/icingaweb2/modules/reactbundle/vendor/react/stream/src/ReadableResourceStream.php(146): Evenement\EventEmitter->emit('data', Array)

3 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/StreamSelectLoop.php(244): React\Stream\ReadableResourceStream->handleData(Resource id #67)

4 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/StreamSelectLoop.php(211): React\EventLoop\StreamSelectLoop->waitForStreamActivity(9995365)

5 /u`

`#0 [internal function]: Icinga\Application\Web->Icinga\Application{closure}()

1 {main}`

CSV and JSON work fine.

To Reproduce

Steps to reproduce the behavior:

  1. Run Report
  2. Click Download > PDF

Expected behavior

PDF opened/saved.

Screenshots

image

Your Environment

lippserd commented 4 years ago

Hi,

This could be a dependency problem. Could you please run composer install in the pdfexport module directory and report back whether this fixed your issue.

All the best, Eric

nilmerg commented 3 years ago

We had no similar issues in the last months (besides various installations), so I'll close here.