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

mermaid installation on debian #649

Closed
robie2011 opened this issue Apr 13, 2018 · 1 comment
Closed

mermaid installation on debian #649

robie2011 opened this issue Apr 13, 2018 · 1 comment

Comments

@robie2011
Copy link

robie2011 commented Apr 13, 2018

hello community,
i have installation issue's with mermaid package.

I'ved worked through several stages of problems but doesn't have any ideas for the last error Invalid file descriptor to ICU data received..

any ideas?

Systeminfo

I'm using this docker image docker run --rm -it robie2011/gitlab-asciidoctor bash

root@f3216f0534e8:/# uname -a
Linux f3216f0534e8 4.9.87-linuxkit-aufs #1 SMP Wed Mar 14 15:12:16 UTC 2018 x86_64 GNU/Linux

Installation

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg |  apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt-get update
apt-get install -y nano yarn
yarn global add mermaid mermaid.cli
nano test.mmd
# todo: add sample diagram code

sample diagram code:

graph LR;
    Generate-->Sign;
    Sign-->Transfer;
    Transfer-->Validate;
    Validate --> Clean;

First Error - missing dependencies on system level

root@f3216f0534e8:/# mmdc -i test.mmd -o test.png
(node:933) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
/usr/local/share/.config/yarn/global/node_modules/puppeteer/.local-chromium/linux-549031/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory


TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

    at onClose (/usr/local/share/.config/yarn/global/node_modules/puppeteer/lib/Launcher.js:255:14)
    at Interface.helper.addEventListener (/usr/local/share/.config/yarn/global/node_modules/puppeteer/lib/Launcher.js:244:50)
    at emitNone (events.js:111:20)
    at Interface.emit (events.js:208:7)
    at Interface.close (readline.js:370:8)
    at Socket.onend (readline.js:149:10)
    at emitNone (events.js:111:20)
    at Socket.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
(node:933) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:933) [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.

Fixing + reinstall mermaid:

apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

Root-User Issue

root@f3216f0534e8:/# mmdc -i test.mmd -o test.png
(node:2843) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
[0413/071446.332564:ERROR:zygote_host_impl_linux.cc(88)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.


TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

    at onClose (/usr/local/share/.config/yarn/global/node_modules/puppeteer/lib/Launcher.js:255:14)
    at Interface.helper.addEventListener (/usr/local/share/.config/yarn/global/node_modules/puppeteer/lib/Launcher.js:244:50)
    at emitNone (events.js:111:20)
    at Interface.emit (events.js:208:7)
    at Interface.close (readline.js:370:8)
    at Socket.onend (readline.js:149:10)
    at emitNone (events.js:111:20)
    at Socket.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
(node:2843) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2843) [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

Execute as non-root user

root@f3216f0534e8:/# useradd doc
root@f3216f0534e8:/# su doc
$ mmdc -i test.mmd -o test.png
(node:2862) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
[0413/071618.696488:ERROR:icu_util.cc(133)] Invalid file descriptor to ICU data received.
[0413/071618.696630:FATAL:content_main_delegate.cc(53)] Check failed: false.
#0 0x564e86baab0c base::debug::StackTrace::StackTrace()
#1 0x564e86bc3780 logging::LogMessage::~LogMessage()
#2 0x564e84f4cd23 content::ContentMainDelegate::TerminateForFatalInitializationError()
#3 0x564e868e5deb content::ContentMainRunnerImpl::Initialize()
#4 0x564e868efb72 service_manager::Main()
#5 0x564e868e4f14 content::ContentMain()
#6 0x564e8a9f49b9 headless::(anonymous namespace)::RunContentMain()
#7 0x564e8a9f4a42 headless::HeadlessBrowserMain()
#8 0x564e868ecf9d headless::HeadlessShellMain()
#9 0x564e84f4b1ac ChromeMain
#10 0x7f9fb78f72e1 __libc_start_main
#11 0x564e84f4b02a _start



TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

    at onClose (/usr/local/share/.config/yarn/global/node_modules/puppeteer/lib/Launcher.js:255:14)
    at Interface.helper.addEventListener (/usr/local/share/.config/yarn/global/node_modules/puppeteer/lib/Launcher.js:244:50)
    at emitNone (events.js:111:20)
    at Interface.emit (events.js:208:7)
    at Interface.close (readline.js:370:8)
    at Socket.onend (readline.js:149:10)
    at emitNone (events.js:111:20)
    at Socket.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
(node:2862) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2862) [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.
@tylerlong
Copy link
Collaborator

This is a mermaid.cli issue, Since you have created an issue there, I want to close this one.

mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
Bumps [analytics](https://github.com/DavidWells/analytics) from 0.7.21 to 0.8.0.
- [Release notes](https://github.com/DavidWells/analytics/releases)
- [Commits](https://github.com/DavidWells/analytics/compare/analytics@0.7.21...analytics@0.8.0)

---
updated-dependencies:
- dependency-name: analytics
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants