Skip to content

Crash when trying to export to PDFΒ #1769

@kalon33

Description

@kalon33

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    | <http://phantomjs.org/bug-reporting.html> 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    | <http://phantomjs.org/bug-reporting.html> 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    | <http://phantomjs.org/bug-reporting.html> 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    | <http://phantomjs.org/bug-reporting.html> 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<http://phantomjs.org/bug-reporting.html> 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions