asciidoctor / asciidoctor-kroki

Asciidoctor.js extension to convert diagrams to images using Kroki!
https://kroki.io/
MIT License
146 stars 47 forks source link

VS Code Preview does not work when local Kroki server is configured. #436

Closed spikeguru closed 10 months ago

spikeguru commented 10 months ago

Hi folks, I configured the asciidoc extension using a local kroki server. I added the settings that (1) the local server is used when the VS Task is executed and (2) that the preview is using the local server as well. The VS workspace configuration does look like that:

    "settings": {
        "asciidoc.asciidoctor_command": "C:/develop/gist/tools/ruby/bin/asciidoctor.bat -r asciidoctor-kroki -o-",
        "asciidoc.pdf.asciidoctorPdfCommandPath": "C:/develop/gist/tools/ruby/bin/asciidoctor.bat",
        "asciidoc.pdf.asciidoctorPdfCommandArgs": ["-r asciidoctor-kroki", "-r asciidoctor-pdf", "-a kroki-server-url=http://wded5115:8000/", "-a allow-uri-read", "-b pdf"],
        "asciidoc.use_asciidoctor_js": false,       
        "asciidoc.enableErrorDiagnostics": true,
        "asciidoc.extensions.enableKroki": true,
        "asciidoc.preview.asciidoctorAttribute": {          
            "kroki-server-url": "http://wded5115:8000"
        },

When executing the VS task, the diagram are fetched successfully from the local server but in the VS Code preview function the diagrams are not rendered and I only get a empty image file sign displayed. When requesting a test diagram by URL in the browser, it gets rendered as expected. I tested it with using a proxy and checked traffic with wireshark but I can not find the root cause of the problem. Do you have any idea what I am missing to get the preview successfully running with a local kroki server instance? As we generate confidential diagrams it is important for us to not use the public server. Thanks in advance!

ggrossetie commented 10 months ago

As far as I understand, this is a VS Code Extension related issue? Please open a new issue at: https://github.com/asciidoctor/asciidoctor-vscode/issues

spikeguru commented 10 months ago

As far as I understand, this is a VS Code Extension related issue? Please open a new issue at: https://github.com/asciidoctor/asciidoctor-vscode/issues

Done https://github.com/asciidoctor/asciidoctor-vscode/issues/791