-
-
Notifications
You must be signed in to change notification settings - Fork 281
Description
First, I'd like to thank you for this wonderful product, it helps us a great deal.
Using the latest version - 0.29.1, we have an issue rendering diagrams that have !include instruction with a HTTP or HTTPS address.
I tried several older versions, the problem still exists. When using much older versions it seems to work (I think it was 0.27.0) but we need a newer version with more features of PlantUML.
Scenario
Kroki
We use Docker and tried both with host network and without:
docker run -p 8000:8000 --name kroki -e KROKI_SAFE_MODE=unsafe -d yuzutech/kroki:0.29.1docker run -p 8000:8000 --name kroki -e KROKI_SAFE_MODE=unsafe --net=host -d yuzutech/kroki:0.29.1
Note: I tried setting the following too but to no avail:
PLANTUML_SECURITY_PROFILE=UNSECUREandALLOW_PLANTUML_INCLUDE=true
Diagrams
I tried the following diagram, each time enabling back ONE of the !include - I am writing here in comment which ones worked:
@startuml
'!include http://localhost/dev/theme.puml - NOT working (it does work when I access that URL in my browser, no auth required of course)
'!include https://raw.githubusercontent.com/azuker/sw-design/refs/heads/gh-pages/puml/theme/usecases.puml - NOT working
'!include https://raw.githubusercontent.com/azuker/sw-design/refs/heads/gh-pages/puml/theme/usecases-icons.puml - NOT working
'!include <archimate/Archimate> - WORKS
'!include <aws/common> - WORKS
'!include <aws/Storage/AmazonS3/AmazonS3> - WORKS
'!include <aws/Storage/AmazonS3/bucket/bucket> - WORKS
start
:IconTimer();
if (Condition) then (Ok)
:Step1 HL(Highligted);
else (Error)
:Step2;
end if
end
@enduml
Error
Exact diagram
@startuml
!include https://raw.githubusercontent.com/azuker/sw-design/refs/heads/gh-pages/puml/theme/usecases.puml
!include https://raw.githubusercontent.com/azuker/sw-design/refs/heads/gh-pages/puml/theme/usecases-icons.puml
start
:IconTimer();
if (Condition) then (Ok)
:Step1 HL(Highligted);
else (Error)
:Step2;
end if
end
@enduml
Encoded diagram
Value: eNq9j0FqAzEMRdfxKdydZzEj2mWyCYRACoUu2gu4Y8UWmbGNJRPo6asOXfQE2UhI-v99dGTxTfq6mCfK89ID2iRSeQ_Q_H2KJKl_dcY2lyyYZZrLCv6737AB38eATDFDwytDQh8YYhqrj8hQFQqScEVQ_-wZeaoPChpJKX9xZvvQWLt_1eUnrdjccNCZrtadSg4kVPJglZCte78NelLxh2B9tpc3d6GYFoqCYXPhwmjdubXS_ilftlMOCt0Z7cYctf7G_wBmInnR
Kroki URL (works fine - no error): https://kroki.io/plantuml/svg/eNq9j0FqAzEMRdfxKdydZzEj2mWyCYRACoUu2gu4Y8UWmbGNJRPo6asOXfQE2UhI-v99dGTxTfq6mCfK89ID2iRSeQ_Q_H2KJKl_dcY2lyyYZZrLCv6737AB38eATDFDwytDQh8YYhqrj8hQFQqScEVQ_-wZeaoPChpJKX9xZvvQWLt_1eUnrdjccNCZrtadSg4kVPJglZCte78NelLxh2B9tpc3d6GYFoqCYXPhwmjdubXS_ilftlMOCt0Z7cYctf7G_wBmInnR
Docker Error
Accessing my container with the encoded diagram, I see an error of 400 Cannot open URL (line: 1).
When I inspect the docker logs, I see the following:
{
"timestamp":"1767704977490",
"level":"WARN",
"thread":"vert.x-eventloop-thread-1",
"mdc": {
"error_message":"Cannot open URL (line: 1)",
"path":"/plantuml/svg/eNq9j0FqAzEMRdfxKdydZzEj2mWyCYRACoUu2gu4Y8UWmbGNJRPo6asOXfQE2UhI-v99dGTxTfq6mCfK89ID2iRSeQ_Q_H2KJKl_dcY2lyyYZZrLCv6737AB38eATDFDwytDQh8YYhqrj8hQFQqScEVQ_-wZeaoPChpJKX9xZvvQWLt_1eUnrdjccNCZrtadSg4kVPJglZCte78NelLxh2B9tpc3d6GYFoqCYXPhwmjdubXS_ilftlMOCt0Z7cYctf7G_wBmInnR",
"method":"GET",
"action":"warning",
"error_code":"400",
"failure_class_name":"io.kroki.server.error.BadRequestException",
"user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
},
"logger":"io.kroki.server.error.ErrorHandler",
"message":"Bad request",
"context":"default"
}Is there something we can do to make it work?