glsp icon indicating copy to clipboard operation
glsp copied to clipboard

Crash of the glsp server process when registering an OperantionHandler

Open MichelSc opened this issue 2 years ago • 1 comments

  • 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 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 avatar Dec 14 '23 16:12 MichelSc

@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!

planger avatar Jan 25 '24 10:01 planger

Should be fixed with https://github.com/eclipse-glsp/glsp-server-node/pull/82

tortmayr avatar May 15 '24 08:05 tortmayr