plugin-template icon indicating copy to clipboard operation
plugin-template copied to clipboard

Build in LXC hit and miss

Open ccoles146 opened this issue 2 months ago • 1 comments

I am trying to rebuild a plugin from source. Gotify works perfectly fine in the LXC. I tried to use the gotify2telegram plugin but it is out of date, so I managed to build it from source but then it failed trying to make the websocket connection. I built it using the Makefile with the docker environment. It maxed out 2GB of RAM for over 10 minutes.

I started from the ground up to rebuild the plugin first testing it as a standalone go program. One step at a time I confirmed everything was working, but it seemed a little temperamental depending on what imports I had. If I tried importing gin-gonic/gin then it would crash similarly to when I try to build it. Turned out I didn't need that so removed it again.

When I ran a simple build then it succeeds, when I run the docker build then it also succeeds but takes much much longer. Finally, I get an error that a different version of github.com/gorilla/websockets was used but I've checked and it is v1.5.3

Secondly, during my testing, I think what causes the instability is when gin-gonic/gin is used. I'm not currently using it but if it does end up in go.mod then suddenly the program seems to stop working. Can you help troubleshoot?

ccoles146 avatar Oct 31 '25 15:10 ccoles146

Hi, thanks for ticket, we are working on a revamped plugin system that does not use the Go plugin system to avoid this issue. This was a problem that I hastily worked around in the early days of Go 5+years agi that quickly became unsustainable in the complex Gin dependency graph.

I should be able to contribute some time in the next week or so.

Please see https://github.com/gotify/server/issues/825

eternal-flame-AD avatar Oct 31 '25 19:10 eternal-flame-AD