experimenter
experimenter copied to clipboard
Race condition in JSON editor: Calls to EditorView.update are not allowed while an update is in progress
A race condition can cause the branches page to crash.
STR:
- Load an experiment branches page that is already configured with a feature value
- Click into the rich feature editor
- click outside the rich feature editor
This sometimes causes the page to crash, but only seems to happen near the end of page load. I’m not able to reproduce this 100% of the time. This error will likely go away when we migrate away from React.
┆Issue is synchronized with this Jira Bug
➤ Barret Rennie commented:
stack trace hits this call site: https://github.com/codemirror/view/blob/b75e07590c759d0cf9cf1427cfcbd0c35da7cecc/src/editorview.ts#L240 ( https://github.com/codemirror/view/blob/b75e07590c759d0cf9cf1427cfcbd0c35da7cecc/src/editorview.ts#L240 )
We might be able to work around this in our event handlers by checking view.updateState and debouncing the call if we are updating