You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During actual Visual Editing, post-setup, and without any editing, actually being done, there's a stream of XHR GETs showing in the browser Network console, one per second, requesting and receiving full document data, along with its sourcemap.
To Reproduce
Open Presentation visual editing on a document, in the Studio as normal. Open and observe the browser devtools Network tab.
I backed up development a month, to see if this is a recent problem -- seems not.
No unusual errors were showing on the Console, until I introduced simple console.logging for onConnect in store.useLiveMode options. The delay this caused before reconnect initiation allowed the following error message to show from the Channel controller:
Received no response to message 'loader/query-change' on client 'presentation' (ID: 'c4f659dc-03bf-4c1a-9101-3f129f64981b').
[controller.ts:324:18](http://localhost:4321/node_modules/@sanity/channels/src/controller.ts)
Without bringing up and troubleshooting the controller code here locally, it seems reasonable to suspect this missing response and the reconnect that follows is setting off the full external requery back to Sanity's api.
I had a very nice conversation with Rupert @rdunk over aspects of the problem, who stepped in from the London office on a Discord query on the problem. Afterwards I verified I think via Sanity logs that while indeed there were (27,000 in few days light testing) of these reconnect queried, they were not showing as billable accesses.
This takes the pressure off, and I'm fully aware of the effort level in development these day. In due course, then, I imagine keep-alive on the Presentation channels shouldn't need wire queries, at least of this magnitude, and imagine you'll want to look into that, possibly finding something easy about the lost message response.
Expected behavior
I'd think channel keep-alive actually shouldn't involve wire traffic, or if that's checked, not once per second, and not making a full document data and sourcemap query. Any that it does end up requiring, should be assured and documented that they will not affect billable resource use, so that everyone can remain confident of this.
Screenshots
data above was from screen; better in text form to be used
Describe the bug
During actual Visual Editing, post-setup, and without any editing, actually being done, there's a stream of XHR GETs showing in the browser Network console, one per second, requesting and receiving full document data, along with its sourcemap.
To Reproduce
Open Presentation visual editing on a document, in the Studio as normal. Open and observe the browser devtools Network tab.
I backed up development a month, to see if this is a recent problem -- seems not.
No unusual errors were showing on the Console, until I introduced simple console.logging for
onConnect
in store.useLiveMode options. The delay this caused before reconnect initiation allowed the following error message to show from the Channel controller:Without bringing up and troubleshooting the controller code here locally, it seems reasonable to suspect this missing response and the reconnect that follows is setting off the full external requery back to Sanity's api.
I had a very nice conversation with Rupert @rdunk over aspects of the problem, who stepped in from the London office on a Discord query on the problem. Afterwards I verified I think via Sanity logs that while indeed there were (27,000 in few days light testing) of these reconnect queried, they were not showing as billable accesses.
This takes the pressure off, and I'm fully aware of the effort level in development these day. In due course, then, I imagine keep-alive on the Presentation channels shouldn't need wire queries, at least of this magnitude, and imagine you'll want to look into that, possibly finding something easy about the lost message response.
Expected behavior
I'd think channel keep-alive actually shouldn't involve wire traffic, or if that's checked, not once per second, and not making a full document data and sourcemap query. Any that it does end up requiring, should be assured and documented that they will not affect billable resource use, so that everyone can remain confident of this.
Screenshots
data above was from screen; better in text form to be used
Which versions of Sanity are you using?
$ sanity versions
@sanity/cli (global) 3.36.4 (up to date)
@sanity/core-loader 1.6.3 (latest: 1.6.4)
@sanity/react-loader 1.9.6 (latest: 1.9.7)
@sanity/visual-editing 1.8.5 (latest: 1.8.6)
What operating system are you using?
Window 11 entirely latest up-to-date, well-provisioned
Which versions of Node.js / npm are you running?
$ npm -v && node -v
10.2.4
v20.11.1
The text was updated successfully, but these errors were encountered: