Repository navigation
Conversation
…ice (EasyIME#937) WHAT - Return a NULL_SERVICE from the createServer callback when a GUID resolves to no service, instead of null. It answers every method with {success: false, seqNum: n} and passes state through unchanged. - Extract the GUID lookup into resolveService() so the callback stays a single call, normalise the requested id once, and log when nothing resolves. - Skip the dynamic lookup for an empty id instead of throwing. WHY nime stores {service: null} when init names an unknown GUID, and its `service = textService` default only applies to undefined, not null. The next request therefore dereferences null and kills the backend, dropping every client served by it: TypeError: Cannot read properties of null (reading 'textReducer') at handleRequest (nime/src/requestHandler.js:51) A request whose client id never sent init is handled inside nime before the callback runs, so it stays unprotected; the TSF client always sends init first, which is why this change does not vendor or patch nime. Generated with assistance from OMP (deepseek-v4.1-flash).
|
Hi @jessy1092 could you help review if this is correct, please? Thanks! |
|
用系統 node v24 直接跑
第二個情境是 nime #946 與 #955 修的是同一條路徑,行為在這組測試裡完全一樣。 (測試腳本與本留言由 Claude Code (Claude Fable 5.1) 協助產生) |
|
Thanks @ilwu — I reproduced this matrix on node v24 against 1458cea and against your #971 branch:
Your diagnosis of the second path is right: nime creates One more crash while testing: nime splits the line with Since #946 and this PR fix the same callback path, and #971 covers the remaining nime-internal paths plus the |
…ice (#937)
WHAT
WHY
nime stores {service: null} when init names an unknown GUID, and its
service = textServicedefault only applies to undefined, not null. The next request therefore dereferences null and kills the backend, dropping every client served by it:TypeError: Cannot read properties of null (reading 'textReducer')
at handleRequest (nime/src/requestHandler.js:51)
A request whose client id never sent init is handled inside nime before the callback runs, so it stays unprotected; the TSF client always sends init first, which is why this change does not vendor or patch nime.
Generated with assistance from OMP (deepseek-v4.1-flash).