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
Breaks on Linux with Pandoc 2 #17
Comments
Can you test with just |
Yup, same error... |
I'm unable to reproduce this on a fresh installation with the |
Sure.. pandoc -F mermaid-filter test.md
(node:25800) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to launch chrome!
[1204/114408.094911:FATAL:zygote_host_impl_linux.cc(123)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
#0 0x561094287857 base::debug::StackTrace::StackTrace()
#1 0x56109429e041 logging::LogMessage::~LogMessage()
#2 0x56109344b711 content::ZygoteHostImpl::Init()
#3 0x5610930dfda0 content::BrowserMainLoop::EarlyInitialization()
#4 0x5610930e62de content::BrowserMainRunnerImpl::Initialize()
#5 0x561097ecddd6 headless::HeadlessContentMainDelegate::RunProcess()
#6 0x561093fd39e7 content::RunNamedProcessTypeMain()
#7 0x561093fd4421 content::ContentMainRunnerImpl::Run()
#8 0x561093fdd19d service_manager::Main()
#9 0x561093fd2f52 content::ContentMain()
#10 0x561097ecd075 headless::(anonymous namespace)::RunContentMain()
#11 0x561097ecd0ea headless::HeadlessBrowserMain()
#12 0x561093fda1b1 headless::HeadlessShellMain()
#13 0x561092a3c1bd ChromeMain
#14 0x7f30477dbf6a __libc_start_main
#15 0x561092a3c029 <unknown>
Received signal 6
#0 0x561094287857 base::debug::StackTrace::StackTrace()
#1 0x5610942873bf base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7f304dbf6da0 <unknown>
#3 0x7f30477ef8a0 __GI_raise
#4 0x7f30477f0f09 __GI_abort
#5 0x561094286402 base::debug::BreakDebugger()
#6 0x56109429e42a logging::LogMessage::~LogMessage()
#7 0x56109344b711 content::ZygoteHostImpl::Init()
#8 0x5610930dfda0 content::BrowserMainLoop::EarlyInitialization()
#9 0x5610930e62de content::BrowserMainRunnerImpl::Initialize()
#10 0x561097ecddd6 headless::HeadlessContentMainDelegate::RunProcess()
#11 0x561093fd39e7 content::RunNamedProcessTypeMain()
#12 0x561093fd4421 content::ContentMainRunnerImpl::Run()
#13 0x561093fdd19d service_manager::Main()
#14 0x561093fd2f52 content::ContentMain()
#15 0x561097ecd075 headless::(anonymous namespace)::RunContentMain()
#16 0x561097ecd0ea headless::HeadlessBrowserMain()
#17 0x561093fda1b1 headless::HeadlessShellMain()
#18 0x561092a3c1bd ChromeMain
#19 0x7f30477dbf6a __libc_start_main
#20 0x561092a3c029 <unknown>
r8: 0000000000000000 r9: 00007ffdae1816e0 r10: 0000000000000008 r11: 0000000000000246
r12: 00007ffdae181e00 r13: 0000000000000161 r14: 00007ffdae181df8 r15: 00007ffdae181df0
di: 0000000000000002 si: 00007ffdae1816e0 bp: 00007ffdae1819a0 bx: 0000000000000006
dx: 0000000000000000 ax: 0000000000000000 cx: 00007f30477ef8a0 sp: 00007ffdae1816e0
ip: 00007f30477ef8a0 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
(node:25800) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
fs.js:1081
return binding.unlink(pathModule.toNamespacedPath(path));
^
Error: ENOENT: no such file or directory, unlink '/tmp/tmp-25794sbFMJGl9po1k.tmp.png'
at Object.fs.unlinkSync (fs.js:1081:18)
at mv (/home/haozeke/.config/yarn/global/node_modules/mermaid-filter/index.js:102:8)
at mermaid (/home/haozeke/.config/yarn/global/node_modules/mermaid-filter/index.js:73:9)
at /home/haozeke/.config/yarn/global/node_modules/pandoc-filter/index.js:52:19
at Array.forEach (<anonymous>)
at walk (/home/haozeke/.config/yarn/global/node_modules/pandoc-filter/index.js:50:7)
at /home/haozeke/.config/yarn/global/node_modules/pandoc-filter/index.js:74:16
at Array.forEach (<anonymous>)
at walk (/home/haozeke/.config/yarn/global/node_modules/pandoc-filter/index.js:73:20)
at filter (/home/haozeke/.config/yarn/global/node_modules/pandoc-filter/index.js:36:10)
Error running filter mermaid-filter:
Filter returned error status 1 Also if it helps, pandoc -v
pandoc 2.0.1.1
Compiled with pandoc-types 1.17.2, texmath 0.10, skylighting 0.4.3.2
Default user data directory: /home/haozeke/.pandoc
Copyright (C) 2006-2017 John MacFarlane
Web: http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose. |
I'm able to reproduce the issue only on Linux. Windows works fine. ATM, I'm not quite sure what's going on - but it looks like files being created by mermaid cli are somehow deleted/removed by the time the filter tries to pick them up. |
From monitoring my I notice a pupeteer* folder being created and deleted along with a file (renamed to have .txt at the end) being produced in |
Looks like this issue 16 in mermaid.cli might be where the trouble is. |
I've commented on the issue above - but to save navigating off...
I've just tested |
Similar, but slightly different problem here. Also using
When I look at the
I'm trying to run inside a docker container with |
Any news on this error? I'm facing the same issue when running pandoc on docker with my .gitlab-ci.yml using as a base image pandoc/latex .gitlab-ci.yml here: image:
name: pandoc/latex
entrypoint: ["/bin/sh", "-c"]
stages: # List of stages for jobs, and their order of execution
- Wiki
cloning-wiki:
stage: Wiki
artifacts:
untracked: false
expire_in: 30 days
paths:
- output/
script:
- apk add --update npm
- npm i --unsafe-perm -g mermaid-filter
- pandoc -F mermaid-filter README.md -o output/README.pdf --data-dir=./pandoc --from markdown --template eisvogel --listings Error here: $ pandoc -F mermaid-filter README.md -o output/README.pdf --data-dir=./pandoc --from markdown --template eisvogel --listings
internal/fs/utils.js:269
throw err;
^
Error: ENOENT: no such file or directory, open '/tmp/tmp-329AxvFrFjUH8Z8.tmp.png'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at mermaid (/builds/i-supplier/devlab/wiki-to-pdf/.npm-global/lib/node_modules/mermaid-filter/index.js:88:27)
at /builds/i-supplier/devlab/wiki-to-pdf/.npm-global/lib/node_modules/mermaid-filter/index.js:145:12
at /builds/i-supplier/devlab/wiki-to-pdf/.npm-global/lib/node_modules/mermaid-filter/node_modules/pandoc-filter/index.js:52:19
at Array.forEach (<anonymous>)
at walk (/builds/i-supplier/devlab/wiki-to-pdf/.npm-global/lib/node_modules/mermaid-filter/node_modules/pandoc-filter/index.js:50:7)
at /builds/i-supplier/devlab/wiki-to-pdf/.npm-global/lib/node_modules/mermaid-filter/node_modules/pandoc-filter/index.js:74:16
at Array.forEach (<anonymous>)
at walk (/builds/i-supplier/devlab/wiki-to-pdf/.npm-global/lib/node_modules/mermaid-filter/node_modules/pandoc-filter/index.js:73:20) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/tmp/tmp-329AxvFrFjUH8Z8.tmp.png'
}
Error running filter mermaid-filter:
Filter returned error status 1 |
Yeah, I've solved it by building a new docker image. The problem was with puppetter configuration.
I build it with: My
I'm copying the file .puppeteer.json to the WORKDIR because mermaid-filter requires it to be in working directory, as we can see here.
|
I'm trying to run the following command in a docker container:
It's erring out due to no sandbox. I've tried creating the .puppeteer.json file with the contents of
Noticing the "subprocess" command at the bottom I went into the an instance of the Docker container I manually ran it
Running it manually again as Is there a way we can force pandoc or pandoc-mermaid-filter to pass in the -p flag to mmdc instead of relying on "auto[fail]" to find it? P.S.
|
Running a file with your test snippet in the readme, I get the following:
The text was updated successfully, but these errors were encountered: