Debugging Issues with Websockets

Since the 5.8 update yesterday I’ve been chasing down a few issues on my site. One was due to a required update with the wappler-bull-queues extension that was resolved earlier today. However, I’ve noticed that server connects with “Live Refresh with Sockets” enabled do not return data and I’m not sure how to debug. My Web Server and Redis logs do not show errors. I can see that the APIs are getting called in the WS dev tools

But there are no responses. I can call the APIs manually so it’s not an authentication issue (for example

Anyone have ideas on how to test the socket connections and where things may be going wrong? It was working prior to the update yesterday. Thanks. Here’s the page from the dev site that I referenced

Are you running your socket emits or refreshes inside library actions? If so then this is caused by a Wappler bug introduced with the last version: Socket Error in Library Actions

I don’t think it’s the exact same issue. Where/when are you seeing that error message? I’m having trouble tracking what’s happening with those WS requests on my page. I don’t think the requests are ever getting processed and am unsure how to debug.

I think the issues are related.

Connections on the front end are timing out, and connections on the backend fail if they are inside exec because they can’t connect via connect-redis since the connection seems to be not accessible or something similar.

Let’s see what Patrick says tmr.

I hope for a Wappler stable branch at some point so that big behind the scene releases like this one can be tested before they go out to production environments. All of this was a big pain today.

1 Like

I’m seeing the data being returned by server connects with Live Refresh with Sockets enabled. But the content on the page is not loading at all. In this case, I’m populating the returned data in a table and it’s showing no records on the front-end even though I can see the data being returned correctly in the dev console.

If I disable Live Refresh with Sockets from the server connect, the table is getting populated correctly.

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 ?





MacOS M1:

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

@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