redux-devtools icon indicating copy to clipboard operation
redux-devtools copied to clipboard

Bug: Remote Devtools dispatch history lost when paused on breakpoint too long

Open 5hee75 opened this issue 3 years ago • 6 comments

When using the Remote DevTools, the dispatch history is only visible for a short time once a breakpoint is hit in the code. I assume this is because the web-socket stops reporting while the code is paused, but it becomes very frustrating when you're tracing actions and code and then everything disappears and you can't see any of your actions anymore.

Steps to reproduce:

  • Connect to remote devtools using npx remotedev and custom local server
  • Do some things to populate your dispatch history
  • Pause on a breakpoint and wait about 5-10 seconds. Dispatch history will go blank in remote dev tools.

5hee75 avatar Oct 06 '21 03:10 5hee75

I've been experiencing this for a while. This message shows up in the console where I ran yarn remotedev after my Node process hits a breakpoint:

1642620670935 - Origin: Worker (PID 9944)
   [Warning] SocketProtocolError: Client pong timed out
    at SCServerSocket._onSCClose (/MyApp/node_modules/socketcluster-server/scserversocket.js:267:17)
    at Timeout.<anonymous> (/MyApp/node_modules/socketcluster-server/scserversocket.js:212:10)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)

I'm on a Macbook Air, 10.14.1 And I'm using the Google Chrome debugger accessed at chrome://inspect which serves at http://localhost:9229.

Maybe there's an argument that can be passed which will persist state on the screen (and perhaps notify the user on the UI) when Client pong times out?

jonahlibrach avatar Jan 19 '22 20:01 jonahlibrach

Upgrading socketcluster-client to 17.1.0 solved this issue for me.

rijn avatar Feb 05 '23 01:02 rijn

@rijn I'm experiencing the same issue. After a while I'm getting "Client pong timed out" and redux devtool is cleared. Where have you upgraded socketcluster-client? redux-devtools has version 17.1.1 (https://github.com/reduxjs/redux-devtools/blob/main/packages/redux-devtools-cli/package.json#L93) By upgrading to 17.1.0 you mean in your application dependencies? I use remote-redux-devtools (https://github.com/zalmoxisus/remote-redux-devtools/blob/master/package.json#L60) in my app and I wonder if this issue is because of different versions of socketcluster-client between the client (my app) and the server.

PiotrKujawa avatar Apr 03 '23 12:04 PiotrKujawa

I am also seeing an issue like this. However it does not involve setting breakpoints, the remote-redux-devtools just disconnect after about 30 seconds. If I go into the 'Settings' tab and click connect, then toggle back to 'Actions' tab I can see the Redux actions info for a sort time (approx 30 seconds) before it again goes blank.

In March last year I got remote-redux-devtools setup to work connecting to redux-devtools running in a web view in an Android app on a remote device. I have been using it occasionally ever since with no problems, until I got a new laptop. On this new machine I always see that remote-redux-devtools will connect and show the redux action history for about 30 seconds, then it goes blank. At the point the history disappears in remote dev tools, if I have the browser console connected to the app running the redux app I see this error:

{name: 'SocketProtocolError', message: 'Client pong timed out', code: 4001, stack: 'SocketProtocolError: Client pong timed out\n at...

I went back and tested the setup on my old laptop, and it worked fine. Frustratingly I then tried re-installing remote-redux-devtools on that machine (npm install -g @redux-devtools/cli), and now remote-redux-devtools are broken in the same way. This leads me to suspect that perhaps a regression has been introduced in remote-redux-devtools in the last year. Alternatively there be some configuration option I have missed that was wiped by the re-install.

jlister avatar Apr 21 '23 16:04 jlister

Just to confirm, are you using the remote-redux-devtools or the @redux-devtools/remote npm package? The latter is the currently maintained version that is intended to work with @redux-devtools/cli.

Methuselah96 avatar Apr 21 '23 16:04 Methuselah96

Thanks for your reply. I am using "remote-redux-devtools": "0.5.16". IIRC I did try using @redux-devtools/remote back when I set things up last March, but I ended up choosing to stick with remote-redux-devtools instead. I am pretty sure I had a good reason at the time, but I am afraid I cannot now recall why. I think it may have been something to do with some of the socket connection parameters I needed to use not being available in @redux-devtools/remote (I think I was trying to use a secure socket due to Android security settings, but I eventually found a way to use the default un-secured connection). I will see if I can get @redux-devtools/remote work for my use case.

jlister avatar Apr 21 '23 19:04 jlister