bep / godartsass

Go API backed by the native Dart Sass Embedded executable.
MIT License
39 stars 6 forks source link

Error "failed to write payload" in distroless image #24

Open Tobias-08 opened 1 month ago

Tobias-08 commented 1 month ago

Hi,

we are using godartsass in Corteza. It works as expected in a Debian based image. But while trying to setup a distroless based image with a nonroot user godartsass fails in the transpiler on line 536 with error failed to write payload (the internal error is broken pipe).

This seems to be a godartsass and not a Corteza issue. Does anyone have a hint what in distroless is missing (dependencies? permissions? ...?) and stops godartsass from working?

Thanks!

bep commented 1 month ago

I have pushed a v2.1.0 with this commit 658e28ae57645d4b767125c4e079d38359815186

Note that I'm pretty sure you still will get an error, but the error should provide more context.

I have not seen that error "in the wild" before, and this library has been pretty good battle tested in Hugo.

Tobias-08 commented 1 month ago

@bep Thanks for your quick response and your effort for investigating this issue further.

I hope that I can give v2.1.0 a try tomorrow.

Tobias-08 commented 1 month ago

@bep Now tried v2.1.0. Error output is:

{"error": "failed to write payload: write |1: broken pipe"}
{"error": "connection is shut down"}

Perhaps not as detailed/helpful as you were looking for...?

bep commented 1 month ago

Perhaps not as detailed/helpful as you were looking for...?

This can be related to how you handle the transpiler instances, so I suggest you fix that first (I created an issue).

Tobias-08 commented 1 month ago

https://github.com/cortezaproject/corteza/pull/1860 does not seem to have helped. Same behaviour as before ("connection is shut down").