zalmoxisus / remote-redux-devtools

Redux DevTools remotely.
http://zalmoxisus.github.io/monitoring/
MIT License
1.8k stars 138 forks source link

It works few seconds but socket hangs up with code 4001 #158

Closed jardicc closed 5 months ago

jardicc commented 5 months ago

I tried the example project in repo and Redux Chrome Extension. It works few seconds but socket hangs up with code 4001 and all data disapears. So I thought maybe dependencies are outdates... so I updated all.. build it again but result is still the same.

code: 4001 message: "Client pong timed out" name: "SocketProtocolError"

Also while having this error it creates another error: devTools.js:197 Uncaught TypeError: Cannot read properties of undefined (reading 'hasOwnProperty')

image

jardicc commented 5 months ago

That line should be this.socket.on('error', (err) => { instead of this.socket.on('error', function (err) {

Then I have only one error instead of 2 errors... but problem remains.

jardicc commented 5 months ago

So I changed some default values in devTools.js image

SCTransport accepts it

image

And then hangs up anyway like before... like it wouldn't change anything... but when I trace code with pingTimeoutDisabled it takes different route.

jardicc commented 5 months ago

I believe this happened because ping/pong messages are not compatible. protocolVersion: 1 sends #1 and #2 as content of ping/pong messages meanwhile protocolVersion: 2 sends empty strings only. Therefore it gets timeout. I will use the newer version of remote DevTools same as CLI.