Hi All,
I'm looking for an option to be able to disable/enable the editor on the fly so I thought about calling editor.stop() in a function node when I want to disable the editor (and later editor.start() to enable it). However, when stopping the editor, node-red crashes immediately. It might have to do something with the fact that I'm also communicating with node-red from the app via the http api but I thought that the editor and the runtime are separated. Besides that it does crash immediately so I don't think that any http api calls are involved.
That's what I get in the terminal:
4 Sep 16:04:36 - [warn] Communication send error: Error: WebSocket is not open: readyState 3 (CLOSED)
4 Sep 16:04:37 - [red] Uncaught Exception:
4 Sep 16:04:37 - TypeError: Cannot read property 'handleUpgrade' of null
at Server.upgrade (/usr/local/lib/node_modules/node-red/node_modules/@node-red/editor-api/lib/editor/comms.js:204:30)
at Server.emit (events.js:323:22)
at onParserExecuteCommon (_http_server.js:642:14)
at onParserExecute (_http_server.js:583:3)
Is this considered a bug? Any hints are welcome!
Best regards,
r0ller