Crash of the glsp server process when registering an OperantionHandler
- OperationHandlerRegistry.registerHandler is called with some handler
myHandler - Another handler is already registered for the operationType of
myHandler. - Registry<K,V> logs a warning that the key is already registered: OK.
- For this, it passes a message (OK) and the pair key, value.
- The latter is NOK.
- The logger will serialize the value (
myHandler) with JSON.stringify - that throws a 'Exception has occurred: TypeError: Converting circular structure to JSON'
- and the process exits (!)
- The logger will serialize the value (
The value registered (myHandler) should not be passed as params to WinstonLogger by Registry<K,V> this point in the code
Or at very least should be protected against a thrown exception.
Observed in "@eclipse-glsp/server", version "2.0.0".
@MichelSc Thank you very much for raising this bug! And sorry for the delayed response. For some reason the issue wasn't correctly added to our project board.
We've prioritized this issue and it's now at the top of our backlog. We'll perform an initial analysis in the coming weeks.
If you have any further updates or information, please add them to this issue. And, if you're interested in working on the fix yourself, we're happy to support whereever needed. Your help would be much appreciated!
Should be fixed with https://github.com/eclipse-glsp/glsp-server-node/pull/82