Skip to content
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

Command fails without error logs due to suppressed output #250

Closed
hokaccha opened this issue Jan 15, 2025 · 1 comment
Closed

Command fails without error logs due to suppressed output #250

hokaccha opened this issue Jan 15, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@hokaccha
Copy link

The following command fails without providing error logs, making debugging difficult:

Command failed: "/home/runner/work/dockan/dockan/node_modules/.bin/mmdc" -i "/tmp/prisma-erd-l9eLKO/prisma.mmd" -o "/home/runner/work/dockan/dockan/docs/erd.svg" -c "/tmp/prisma-erd-l9eLKO/config.json" -p "/tmp/prisma-erd-l9eLKO/puppeteerConfig.json"

The issue arises because the child_process.execSync function is configured with stdio: 'ignore'.

You can find the relevant code here:

child_process.execSync(mermaidCommand, {
stdio: 'ignore',
});

This configuration suppresses both stdout and stderr output. By modifying the code to allow stdio output, the following error was revealed:

Error: Failed to launch the browser process!
[0115/033116.841034:FATAL:zygote_host_impl_linux.cc(127)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/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.

This error was resolved by addressing issues related to Puppeteer and the Linux sandbox environment, as documented in the following resources:

To improve the developer experience, it is recommended that prisma-erd-generator outputs error logs instead of suppressing them, facilitating easier debugging of similar issues in the future.

@keonik keonik added the bug Something isn't working label Jan 21, 2025
@keonik
Copy link
Owner

keonik commented Jan 21, 2025

On it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants