Docker image failure
AlexisBRENON opened this issue · 1 comments
Describe the bug
With the newest versions of the docker image, I'm not able to render my chart anymore.
The process hangs for a while and finally crash with the following error:
ProtocolError: Network.enable timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.
at <instance_members_initializer> (file:///home/mermaidcli/node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js:89:14)
at new Callback (file:///home/mermaidcli/node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js:93:16)
at CallbackRegistry.create (file:///home/mermaidcli/node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js:19:26)
at Connection._rawSend (file:///home/mermaidcli/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Connection.js:86:26)
at CdpCDPSession.send (file:///home/mermaidcli/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/CDPSession.js:63:33)
at NetworkManager.addClient (file:///home/mermaidcli/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/NetworkManager.js:59:20)
at FrameManager.initialize (file:///home/mermaidcli/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/FrameManager.js:1[67](https://github.com/greenbids/greenbids-tailor-external/actions/runs/11270373229/job/31340948174#step:4:68):38)
at #initialize (file:///home/mermaidcli/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Page.js:280:36)
at CdpPage._create (file:///home/mermaidcli/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Page.js:93:31)
at file:///home/mermaidcli/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Target.js:202:32
To Reproduce
- Create a file
test.mmd
:
sequenceDiagram
A ->>+ B: hello
B -->>- A: ""
- Render the chart with old docker image:
docker run --rm -u $(id -u) -v $PWD:/data ghcr.io/mermaid-js/mermaid-cli/mermaid-cli:11.2.1-beta.3 -i /data/test.mmd
- Render the chart with new docker image:
docker run --rm -u $(id -u) -v $PWD:/data ghcr.io/mermaid-js/mermaid-cli/mermaid-cli:11.2.1 -i /data/test.mmd
Expected behavior
I expected the rendering to succeed as previously.
Additional context
You may see more examples in my repository which uses the image as part of the CI.
I can't replicate this issue on my local machine using:
cat test-positive/flowchart1.mmd | docker run --rm -i ghcr.io/mermaid-js/mermaid-cli/mermaid-cli:11.2.1 --input - --output - --outputFormat svg
However, I have replicated this using GitHub Codespaces (which I believe uses similar machines to the default GitHub Actions runners), and I'm having the same issue. ghcr.io/mermaid-js/mermaid-cli/mermaid-cli:11.2.1
doesn't work, but ghcr.io/mermaid-js/mermaid-cli/mermaid-cli:11.2.1-beta.5
works.
Edit: Ah, I think I might know the issue. The -beta.x
Docker images are built using DockerfileBuild
, which uses Apline Linux 3.19:
Line 15 in 082fd7f
However, the production Docker images are built using the Dockerfile
, which uses the latest version of Alpine Linux (currently 3.20):
Line 1 in 082fd7f
However, it looks like version of Chromium in Apline Linux 3.20 doesn't play nicely with Puppeteer: puppeteer/puppeteer#12637
I'm not 100% sure why we have both a Dockerfile
and a DockerfileBuild
, but I suspect just using the same one for everything should fix this issue.