keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
391 stars 108 forks source link

bug(web): undefined reading 'deleteLeft' causing crash in Android app #12494

Open darcywong00 opened 2 days ago

darcywong00 commented 2 days ago

@dinakaranr recorded and reported this issue using the current Keyman for Android 18.0 alpha (I can repro on 18.0.117-alpha)

Steps to repro:

  1. In the Keyman app with the default sil_euro_latin keyboard
  2. Longpress g -->
  3. Longpress h -->
  4. Longpress j --> ĵ
  5. Flick down on c --> '
  6. Flick down on v --> Javascript error

The chrome dev tools gives the following error

@keymanapp/keyman/we…es/src/common.ts:40 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'deleteLeft')
    at buildMergedTransform (@@keymanapp/keyman/web/src/engine/predictive-text/templates/src/common.ts:40:43)
    at ContextTracker.attemptMatchContext (@keymanapp/keyman/web/src/engine/predictive-text/templates/src/common.ts:444:57)
    at _ContextTracker.analyzeState (@keymanapp/keyman/web/src/engine/predictive-text/worker-thread/src/main/correction/context-tracker.…:673:37)
    at @keymanapp/keyman/we…t-helpers.ts:175:48
    at Generator.next (<anonymous>)
    at blob:null/1b8791be-3…-49f3ec17d480:49:63
    at new Promise (<anonymous>)
    at __async (blob:null/1b8791be-3…-49f3ec17d480:33:12)
    at correctAndEnumerate (@keymanapp/keyman/we…ct-helpers.ts:103:4)
    at _ModelCompositor.<anonymous> (@keymanapp/keyman/we…ompositor.ts:122:56)
darcywong00 commented 2 days ago

His video was too large to attach to GH so I will split it...

Uploading output_video.mp4…

ermshiperete commented 2 days ago

To get the error it is sufficient to do steps 5 and 6. Same thing happens with KeymanWeb test page.

Note that you'll have to switch keyboards to get the error again after it happened.