Connecting... event

In office hours @Darren explained the relationship between multiplayer mode and the occasional blurring of the workspace and display of a "Connecting...." message banner across the top of the screen.

I have noticed the following "side-effect" behavior when this occurs. As far as I can see, when the connection is restored everything is "just fine". However, any query with "Run this query on page load" turned on seems to be executed after the connection restoration.

As I understand it, the connection in question is used for state reconciliation by the multiplayer feature. If the state reconciliation process "works well" (and it seems to, AFAIK) there is no need to "restart" anything. Running the page load queries directly undermines the goal of "keeping state stable and in-sync" as state is probably, for most applications, blown away by running these page load queries.

I would encourage Retool to see if it is really necessary to run the page load queries after this reconnection process. While ensuring the integrity of the multiplayer IDE and source code state is definitely the highest priority, this behaviour, more or less, conflicts with that goal as any WIP debugging is blown away.

FYI. Apparently this running of the page load queries does not happen every time. I just returned to my session after about 70 minutes away and a minute or so into my work I got the Connecting... banner/message with the blurred screen. However, the page load queries did NOT run. A document.visibilityState === visible action ran, which was to be expected, but otherwise everything was normal and my deep state was not reinitialized.

Sometimes it happens...sometimes it doesn't.

2 Likes

Just wanted to chime in to say I’m experiencing this exactly as Roland describes. The overall Connecting… issue is gaining traction in another thread here, but this side effect - page load queries automatically running - happens to me ~75% of the time after Connecting… and deserves to be investigated thoroughly.

Thanks for bringing this up! We've temporarily disabled the multiplayer connection event and will look into ensuring page load queries don't run on reconnection. :+1:

1 Like