Debugging Issues with Websockets

I have the same experience. Disabling Live Refresh returns data as expected.

I’d love an update on the sockets issue. My website is pretty much broken as a result of websocket issues.

I was hoping 5.8.1 would magically fix the issues I was experiencing but unfortunately it did not. I am looking for guidance on how to debug issues with serverconnects that have “Live Refresh with Sockets” enabled. I have several features on my site that should receive live updates based on emits from various server connects and while I’m hesitant to call this a bug, I’m at a loss for how to investigate. I’m not seeing any errors in my redis or web server logs. Any advice would be appreciated. The attached video shows that the query and page work fine with the “live refresh with sockets” setting disabled and stop working once its enabled. Thanks in advance for advice on how to debug.

I’m experimenting same problem.

  • Server connect with “Live Refresh with Sockets” enabled not loading the page.
  • Server connect with “Live Refresh with Sockets” disable works normally.

None logs that help to debug this.

1 Like

Wappler 5.8.1

Not working, preloader keep loading and no logs that allow to debug.

Wappler 5.8.0

server-connect:setup:config redis connection failed, ConnectionTimeoutError: Connection timeout at Socket.<anonymous> (/opt/node_app/node_modules/@redis/client/dist/lib/client/socket.js:178:124) at Object.onceWrapper (node:events:627:28) at Socket.emit (node:events:513:28) at Socket._onTimeout (node:net:550:8) at listOnTimeout (node:internal/timers:559:17) at processTimers (node:internal/timers:502:7) +7s

Testing removing redis container/image/volume on docker, redeploy everything, experimental off and on, npm install.
Restarting only node in docker, makes no difference.


Nothing same error.

Wappler 5.6.2 and 5.7.0 (5.7 have error in upload file: Upload error in lib/modules/upload.js)

Sockets works normally.

For now I will kept in 5.6.2 that for me is the more stable of the last versions.

1 Like

I’m experiencing the same issue in v5.8.1. There are no logs to identify the issue.

1 Like

Socket for me is not working in version 5.8.1

does this happen to anyone else?

I can’t get out of version 5.6.2 @patrick

Same here.

Server actions with live refresh don’s load on the page (no errors it just doesn’t appear). Any server action that triggers a refresh also won’t run.

Is it possible to get a link to revert to 5.6.2 as it’s not really possible to remove all socket based actions temporarily and then add them back when this is fixed ?

Thanks

@sbecks https://account5.wappler.io/download/Wappler-win64-5.6.2.exe

v5.6.2
Windows:
https://account5.wappler.io/download/Wappler-win64-5.6.2.exe

MacOS:
https://account5.wappler.io/download/Wappler-Mac-5.6.2.dmg

MacOS M1:
https://account5.wappler.io/download/Wappler-Mac-arm64-5.6.2.dmg

Like I said, look like this is the more stable version for now. I’m sure that Wappler Team is working on it.

1 Like

The ioredis errors are related to the wappler-bull-queues extension and in my case is addressed by updating to the most recent release of the extension. New Error in 5.8.0: [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379

@Alexander_Paladines, @AdrianoLuiz are you both using the wappler-bull-queues v2 extension (I am)? I wonder if there is a common config…

No, I don’t use external extensions :slight_smile:

1 Like

In my case I’m not using “wappler-bull-queues” extension, even redis by default.

1 Like

Good to know. I guess we’ll wait for an update from the Wappler team.

Hi @patrick I know this didn’t start as a bug thread but it seems like a confirmed issue and I changed the tag. The post doesn’t follow the normal bug format though, lmk if you’d like me to create a formal bug post. Thanks!

There is something wrong with the latest versions.
I’m running into constant socket issues with the current version. Redis is configured correctly, but this happens after a while, and then the app crashes:

SocketClosedUnexpectedlyError: Socket closed unexpectedly
    at TLSSocket.<anonymous> (/opt/node_app/node_modules/@redis/client/dist/lib/client/socket.js:195:118)
    at Object.onceWrapper (node:events:628:26)
    at TLSSocket.emit (node:events:525:35)
    at node:net:322:12
    at TCP.done (node:_tls_wrap:588:7)

This only happens if the app runs inside a container, which did not occur with older Wappler versions.

I tried many things to debug this, but I’m unsure what’s going on. Both self-hosted Redis and managed clusters lead to these issues.

Replace the file lib/setup/config.js with the following file: config.zip (1.2 KB)

It seems that with the new Redis Client (v4) when no error event handler is attached it will crash the server. Let me know if the above update fixes it.

SocketClosedUnexpectedlyError: Socket closed unexpectedly · Issue #2032 · redis/node-redis (github.com)

Hi, Sorry @patrick, the update file makes no difference. When “Live Refresh with Sockets” is enable no data is returning. When “Live Refresh with Sockets” is not enabled everything works as expected.