Error while using web socket

Wappler Version : 4.0.5
Operating System : MacOS Big Sur
Server Model: NodeJS
Database Type: MySQL
Hosting Type: localhost

Expected behavior

Using websocket to refresh data after insert or update action

Actual behavior

It’s not working at all, and makes the server connection action fail. See the console errors below.

Any ideas @patrick?

Could you check which errors it shows in the network tab of devtools.

On XHR tab, I’ve got no errors

If i filter all, I get this error repeatedly:

I’ve tested if Socket.io server is reachable, and it is

.

I think is something related to the routes, because I have the layout page inside a subfolder and the the included scripts are:

<script src="../socket.io/socket.io.js"></script>
<script src="../dmxAppConnect/dmxSockets/dmxSockets.js" defer=""></script>

Socket.io is trying to reach the server on: ws://…/socket.io/?EIO=4&transport=websocket

I think the error is on “…/” before socket.io

How can I solve it? I believe this is a bug.

Any ideas @patrick?

It seems to be related to the relative paths, there is an option in the project settings where you can set the links relative to Site Root instead of document.

image