hackmdio / hackmdio/codimd

Crash when trying to export to PDF

Aperta
#1,769 8 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
10.1k
Fork
1.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

When trying to export to PDF, for example the "Features" document, it crashes:

```
codimd_1 | 2022-08-09T15:29:54.388Z error: uncaughtException: Command failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/ph
antom/render.js /tmp/tmp-23T217YkHOtWhW.html /tmp/tmp-238Mg00jNGpimx.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /ho
me/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000
codimd_1 | This application failed to start because it could not find or load the Qt platform plugin "offscreen".
codimd_1 |
codimd_1 | Available platform plugins are: phantom.
codimd_1 |
codimd_1 | Reinstalling the application may fix this problem.
codimd_1 | PhantomJS has crashed. Please read the bug reporting guide at
codimd_1 | and file a bug report.
codimd_1 |
codimd_1 | Error: Command failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-23T217YkHOtWhW.html /
tmp/tmp-238Mg00jNGpimx.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles
/github-gist.css A4 portrait 2cm 0 10000
codimd_1 | This application failed to start because it could not find or load the Qt platform plugin "offscreen".
codimd_1 |
codimd_1 | Available platform plugins are: phantom.
codimd_1 |
codimd_1 | Reinstalling the application may fix this problem.
codimd_1 | PhantomJS has crashed. Please read the bug reporting guide at
codimd_1 | and file a bug report.
codimd_1 |
codimd_1 | at ChildProcess.exithandler (child_process.js:294:12)
codimd_1 | at ChildProcess.emit (events.js:198:13)
codimd_1 | at maybeClose (internal/child_process.js:982:16)
codimd_1 | at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
codimd_1 | 2022-08-09T15:29:54.388Z error: An uncaught exception has occured.
codimd_1 | 2022-08-09T15:29:54.388Z error: Command failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tm
p/tmp-23T217YkHOtWhW.html /tmp/tmp-238Mg00jNGpimx.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_
modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000
codimd_1 | This application failed to start because it could not find or load the Qt platform plugin "offscreen".
codimd_1 |
codimd_1 | Available platform plugins are: phantom.
codimd_1 |
codimd_1 | Reinstalling the application may fix this problem.
codimd_1 | PhantomJS has crashed. Please read the bug reporting guide at
codimd_1 | and file a bug report.
codimd_1 |
codimd_1 | { Error: Command failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-23T217YkHOtWhW.html /tmp/tmp-238Mg00jNGpimx.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000
codimd_1 | This application failed to start because it could not find or load the Qt platform plugin "offscreen".
codimd_1 |
codimd_1 | Available platform plugins are: phantom.
codimd_1 |
codimd_1 | Reinstalling the application may fix this problem.
codimd_1 | PhantomJS has crashed. Please read the bug reporting guide at
codimd_1 | and file a bug report.
codimd_1 |
codimd_1 | at ChildProcess.exithandler (child_process.js:294:12)
codimd_1 | at ChildProcess.emit (events.js:198:13)
codimd_1 | at maybeClose (internal/child_process.js:982:16)
codimd_1 | at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
codimd_1 | killed: false,
codimd_1 | code: null,
codimd_1 | signal: 'SIGABRT',
codimd_1 | cmd:
codimd_1 | '/home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-23T217YkHOtWhW.html /tmp/tmp-238Mg00jNGpimx.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000',
codimd_1 | level: 'error',
codimd_1 | timestamp: '2022-08-09T15:29:54.388Z',
codimd_1 | [Symbol(level)]: 'error',
codimd_1 | [Symbol(message)]:
codimd_1 | '2022-08-09T15:29:54.388Z error: \tCommand failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-23T217YkHOtWhW.html /tmp/tmp-238Mg00jNGpimx.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000\nThis application failed to start because it could not find or load the Qt platform plugin "offscreen".\n\nAvailable platform plugins are: phantom.\n\nReinstalling the application may fix this problem.\nPhantomJS has crashed. Please read the bug reporting guide at\n and file a bug report.\n' }
codimd_1 | 2022-08-09T15:29:54.391Z error: Process will exit now.
codimd_codimd_1 exited with code 1
```

I use the latest docker image, hackmdio/hackmd:2.4.2-cjk.

Thanks for your help.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Riprodurre l’esportazione PDF con l’immagine hackmdio/hackmd:2.4.2-cjk, quindi esaminare il comando che invoca phantomjs-prebuilt e markdown-pdf/phantom/render.js, incluso l’errore del plugin Qt segnalato. Il lavoro è terminato quando l’esportazione del documento di esempio produce un PDF senza che PhantomJS vada in crash o termini il container.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
docker, javascript
Ambito
backend, devops
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.