-
Notifications
You must be signed in to change notification settings - Fork 36
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
Error: No viewBox attribute found in SVG!
#279
Comments
Also, I cannot share my model file as it contains proprietary data. |
Hi @nc-at-sp, thanks for reporting this issue. I'm not sure what causes this. Could you try reproducing this issue and then see if there's SVG's in the |
Good morning.
I went and checked every SVG file in the build directory. Each contains a viewBox attribute. Each looks like a variant of:
viewBox="0 0 488 538"
Each has 4 numbers (I'm assuming the regex below is just missing a 4th \d+ since it's not a viewTriangle)
I also went through each page in the `build/master` and inspected each <svg> element, and all are as expected.
If you could add a detail to the log saying which file is the problem, I can dive in and focus on that file.
What's interesting is that if I hit "F5" to refresh, the entire page renders correctly **just for a second** and then the error appears.
Also, this is not reliably repeatable. Exiting and running serve again will eventually give me a good session. But even if I don't change anything, and just exit and run serve again, the issue will eventually appear again. Hence my hypothesis about some kind of race condition.
Thanks for your attention!
…________________________________
From: Dirk Groot ***@***.***>
Sent: Friday, August 11, 2023 4:44 AM
To: avisi-cloud/structurizr-site-generatr ***@***.***>
Cc: Nate Carpenter ***@***.***>; Mention ***@***.***>
Subject: Re: [avisi-cloud/structurizr-site-generatr] Error: `No viewBox attribute found in SVG!` (Issue #279)
Hi @nc-at-sp<https://github.com/nc-at-sp>, thanks for reporting this issue.
I'm not sure what causes this. Could you try reproducing this issue and then see if there's SVG's in the build directory, that don't contain a viewBox attribute, or that have a viewBox attribute that does not match this regular expression: \d+ \d+ \d+ (that's what this tool is looking for).
—
Reply to this email directly, view it on GitHub<#279 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFZJIPP26BQXOJKKAOOXM23XUXWF7ANCNFSM6AAAAAA22AKYU4>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thanks! My regex had an error. It should have been 4 |
At least in my instance they're always |
@nc-at-sp Okay, thanks. This looks like some kind of race condition indeed. I think I know where this occurs. Just for confirmation: Does your model contain diagrams that you have embedded in one or more documentation files using the |
This should fix the error reported in #279.
@dirkgroot that seems to have done the trick; attempted 10 or so reloads and didn't see the issue once. Seems to be generally faster as well. Thanks! |
This should fix the error reported in #279.
Thanks for testing, @nc-at-sp! I've merged the PR, and will create a release somewhere this week. I'm closing this issue. |
Hello @dirkgroot, |
I get this issue when attempting to serve my site locally. My model is relatively large and complex. This error does not always happen; if I exit and re-execute multiple times it will eventually work. It feels like a race condition or some other kind of threading issue to me.
OS:
WSL (Ubuntu)
Java:
20.0.1 2023-04-18
structurizr-site-generatr version
v1.1.4
structurizr-site-generatr serve -w my-file.dsl
The text was updated successfully, but these errors were encountered: