-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Failed converting Markdown when running inside VSCode (snap) terminal #287
Comments
Marp CLI in a terminal seems to get working in the latest version (except warning about some missing links to local files). Thus, I think that it's VS Code's snap specific.
We've confirmed it is snap specific. This error is not reproduced in VS Code installed by
|
Minimum reproducible example$ echo '' | DEBUG="puppeteer:*" npx @marp-team/marp-cli -o ~/marp.pdf
[ INFO ] Converting 1 markdown...
puppeteer:launcher Calling /usr/bin/chromium-browser --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --user-data-dir=/tmp/marp-cli-conversion --headless --hide-scrollbars --mute-audio about:blank --export-tagged-pdf --remote-debugging-pipe +0ms
puppeteer:protocol:SEND ► {"method":"Target.setDiscoverTargets","params":{"discover":true},"id":1} +0ms
puppeteer:error Error: read ECONNRESET
puppeteer:error at Pipe.onStreamRead (internal/stream_base_commons.js:205:27) +0ms
[ ERROR ] Failed converting Markdown. (Puppeteer was unable to kill the process which ran the browser binary.
This means that, on future Puppeteer launches, Puppeteer might not be able to launch the browser.
Please check your open processes and ensure that the browser processes that Puppeteer launched have been killed.
If you think this is a bug, please report it on the Puppeteer issue tracker.
Error cause: Error: kill EACCES
at ChildProcess.kill (internal/child_process.js:492:26)
at BrowserRunner.kill (/home/yhatt/.npm/_npx/12762/lib/node_modules/@marp-team/marp-cli/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:149:27)
at ChromeLauncher.launch (/home/yhatt/.npm/_npx/12762/lib/node_modules/@marp-team/marp-cli/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Launcher.js:111:20)) The originally reported error message shows that Puppeteer cannot close the process but it's actually not the root cause. |
I found out the root of this issue. AppArmor profile prohibits classic snap (VS Code) from inheriting file descriptors (in Puppeteer). @zhelnio It's probably insecure but |
Update: canonical/snapd#10029 may fix it. |
Converting in default (gnome) terminal:
Converting in VS Code terminal:
P.S. the same error text was shown when I've tried to export pdf using VS Code marp extension
The text was updated successfully, but these errors were encountered: