Closed iacore closed 7 months ago
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
I think I found the problem. there is no mutex
search for the following code snippet in github.com/gofiber/template
if !e.Loaded || e.ShouldReload {
if e.ShouldReload {
e.Loaded = false
}
if err := e.Load(); err != nil {
return err
}
}
if e.ShouldReload
is true, then after e.Load()
e.Loaded
still could be false (if the surrounding function is called twice in quick succession.
@iacore We are aware of this issue. I have a PR to fix the issue on all the engines. Should be ready in the next few days. I found the issue 2-3 weeks ago while writing new Benchmarks.
Thanks!
I also noticed that the Jet template engine doesn't output any error when the template is broken. It just... renders until the broken part, result in partially rendered page. Are you aware of this issue too?
@iacore Can you open a separate ticket for that issue. I can take a look.
Bug Description
Observable behavior (recalled from my memory):
/layout template not found
How to Reproduce
I don't know! I only saw it once.
the actual application in question is https://codeberg.org/vnpower/pixivfe where i
go run .
http//localhost:8282/
in browserI couldn't get it to reproduce again.
I suspect this is a race condition
Expected Behavior
The server should not respond to requests if the templates are not compiled yet.
Fiber Version
v2.52.0
Code Snippet (optional)
No response
Checklist: