When playing in the editor WebSocket connection successful but failed when playing in packaged, why?

So how did you solve this? I have the same problem but I´m not a programmer. Feeling a bit lost with this documentation