Repository navigation
Closed
Description
I just upgraded from v0.6.1 to v0.6.7, and now when I try to render a diagram the process just freezes.
echo "a -> b" > test.d2
d2 test.d2 test.png -d
This prints
debug: using theme Neutral default (ID: 0)
and then just stops. When I ctrl-C to cancel, nothing happens and I eventually just have to close the console.
I reinstalled the older version with
curl -fsSL https://d2lang.com/install.sh | sh -s -- --version v0.6.1
and it now works properly.
I'm on PopOS 22 (Ubuntu) and here's the output from the install
curl -fsSL https://d2lang.com/install.sh | sh -s --
/* installing d2-latest */
log: fetching info on latest version of terrastruct/d2
exec: curl -fL -#o /tmp/tmp.5WPrDLP9B8/78d207313efc3717/release-info.json.inprogress -C- -H 'Accept: application/json' https://api.github.com/repos/terrastruct/d2/releases/latest
##O=# #
exec: mv /tmp/tmp.5WPrDLP9B8/78d207313efc3717/release-info.json.inprogress /tmp/tmp.5WPrDLP9B8/78d207313efc3717/release-info.json
log: installing standalone release d2-v0.6.7-linux-amd64.tar.gz from github
exec: cat "$RELEASE_INFO" | grep -n "$ARCHIVE" | cut -d: -f1 | head -n1
exec: sed -n $((asset_line-3))p "$RELEASE_INFO" | sed "s/^.*: \"\(.*\)\",$/\1/g"
exec: curl -fL -#o ~/.cache/d2/release/d2-v0.6.7-linux-amd64.tar.gz.inprogress -C- -H 'Accept: application/octet-stream' https://api.github.com/repos/terrastruct/d2/releases/assets/195593650
######################################################################## 100.0%
exec: mv ~/.cache/d2/release/d2-v0.6.7-linux-amd64.tar.gz.inprogress ~/.cache/d2/release/d2-v0.6.7-linux-amd64.tar.gz
exec: mkdir -p '$HOME/.local/lib/d2'
exec: tar -C ~/.local/lib/d2 -xzf ~/.cache/d2/release/d2-v0.6.7-linux-amd64.tar.gz
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
exec: sh -c 'cd "$HOME/.local/lib/d2/d2-v0.6.7" && make install PREFIX="$HOME/.local"'
exec: mkdir -p ~/.local/bin
exec: install ./bin/d2 ~/.local/bin/d2
exec: mkdir -p ~/.local/share/man/man1
exec: install ./man/d2.1 ~/.local/share/man/man1
/****************************************************************
* next steps
****************************************************************/
log: d2-v0.6.7-linux-amd64 has been successfully installed into ~/.local
log: Rerun this install script with --uninstall to uninstall.
log
log: Run d2 --help for usage.
log: Run man d2 for detailed docs.
Metadata
Metadata
Assignees
Labels
No labels
Activity
alixander commentedon Oct 5, 2024
Is this a copy paste of what you ran? If so,
test.d2doesn't exist (you missed the|) and it should exit saying no such file. But you said 0.6.1 works with that? I'm confused, can you try some versions in between?mradamcox commentedon Oct 5, 2024
Oops, that's my bad, I will correct it above, I typed it in and forgot the >. I will try different versions when I'm back at my laptop. Thanks for the quick reply!
mradamcox commentedon Oct 6, 2024
Ok, I'm on better internet now, and apparently that has something to do with what I was experiencing... First, I installed all versions between v0.6.1 and v0.6.7. All up to v0.6.7 do render the d2 graph as expected, but one note is that at v0.6.6 I saw the same
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenancewarnings as shown above, but never in earlier versions.As for v0.6.7, what I was experiencing as a freeze before, now seems to be initialization of a Chromium download:
I was able to cancel this download with ctrl+C without any issue this time around.
I don't see anything about a new dependency like this in the release notes but maybe I just need to have Chromium for d2 to work now? Just looking for clarification on that then.
For my needs I'll be 100% fine with just using v0.6.6, but I am happy to try other tests if that would help you.
alixander commentedon Oct 6, 2024
Ah I see. Yeah Playwright is needed for PNG exports unfortunately (https://d2lang.com/tour/exports/#png). It's the only possible way to convert SVGs to PNGs. I'm not sure why it's different on different versions, as that shouldn't have changed...
I'll leave this open in case anyone else runs into the same. I really appreciate you trying each version and the detailed report
mradamcox commentedon Oct 6, 2024
Sounds good, thanks for the explanation.
alixander commentedon Sep 3, 2026
Closing as resolved by #2868: D2 no longer uses Playwright or Chromium for PNG, GIF, PDF, or PPTX rendering.