Skip to content

fix(android): concatenate worker and model file to load together - #16586

Closed
mcdurdin wants to merge 1 commit into
refactor/experimental-unbundle-of-workerfrom
fix/android/13862-concatenated-worker-and-model
Closed

mcdurdin wants to merge 1 commit into
refactor/experimental-unbundle-of-workerfrom
fix/android/13862-concatenated-worker-and-model

Conversation

@mcdurdin

@mcdurdin mcdurdin commented Sep 17, 2026

Copy link
Copy Markdown
Member

Change the way lexical models are loaded on Android to attempt to work around an apparent bug in Chrome on Android, where calls to global.importScripts() fail with a rather strange 'NetworkError' -- given the files are local.

This patch is designed to be relatively easy to cleanup in the future if the underlying issue is addressed.

Note that this depends on unbundling the worker so is not easily ported to 18.0-stable as it stands; we'd need to rework this for 18.0.

Relates-to: #13862

User Testing

  • TEST_ANDROID_MODEL: In Keyman for Android, install a keyboard for a language that includes a lexical model. Verify that the suggestions appear as normal and no error toasts are presented. Switch between the English keyboard and the new keyboard and verify that predictions keep working after switches. Install a keyboard that does not have a lexical model. Verify that it works and suggestions are not offered. Uninstall the first keyboard and reinstall it.

  • TEST_IOS_MODEL: In Keyman for iOS, install a keyboard for a language that includes a lexical model. Verify that the suggestions appear as normal and no error toasts are presented. Switch between the English keyboard and the new keyboard and verify that predictions keep working after switches. Install a keyboard that does not have a lexical model. Verify that it works and suggestions are not offered. Uninstall the first keyboard and reinstall it.

  • TEST_DEVELOPER_SERVER: Verify that lexical models can be tested in Keyman Developer Server; open Developer Console and verify that no errors are presented.

Change the way lexical models are loaded on Android to attempt to work
around an apparent bug in Chrome on Android, where calls to
`global.importScripts()` fail with a rather strange 'NetworkError' --
given the files are local.

This patch is designed to be relatively easy to cleanup in the future if
the underlying issue is addressed.

Note that this depends on unbundling the worker so is not easily ported
to 18.0-stable as it stands; we'd need to rework this for 18.0.

Relates-to: #13862
@github-project-automation github-project-automation Bot moved this to Todo in Keyman Sep 17, 2026
@keymanapp-test-bot keymanapp-test-bot Bot added the user-test-missing User tests have not yet been defined for the PR label Sep 17, 2026
@keymanapp-test-bot

keymanapp-test-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown

User Test Results

Test specification and instructions

  • TEST_ANDROID_MODEL (OPEN)
  • TEST_IOS_MODEL (OPEN)
  • TEST_DEVELOPER_SERVER (OPEN)
Results Template
# Test Results

* **TEST_ANDROID_MODEL (OPEN):** notes
* **TEST_IOS_MODEL (OPEN):** notes
* **TEST_DEVELOPER_SERVER (OPEN):** notes

Test Artifacts

  • Android (no artifacts on BuildLevel "build")
    • Keyman for Android apk - build : ✅ all tests passed
    • FirstVoices Keyboards for Android apk - build : ✅ all tests passed
    • KeyboardHarness apk - build : ✅ all tests passed
    • KMSample1 apk - build : ✅ all tests passed
    • KMSample2 apk - build : ✅ all tests passed
  • Developer (no artifacts on BuildLevel "build")
    • Keyman Developer - build : ✅ all tests passed
    • Compiler Regression Tests - build : ✅ all tests passed
    • kmcomp.zip - build : ✅ all tests passed
  • iOS (no artifacts on BuildLevel "build")
    • Keyman for iOS (simulator image) - build : ✅ all tests passed
    • FirstVoices Keyboards for iOS (simulator image) - build : ✅ all tests passed
  • Keyboards (no artifacts on BuildLevel "build")
    • Test Keyboards - build : ✅ all tests passed
  • Web (no artifacts on BuildLevel "build")
    • KeymanWeb Test Home - build : ✅ all tests passed

@mcdurdin

Copy link
Copy Markdown
Member Author

Per #13862 (comment), this should not be needed. The move to the WebView asset loader approach addressed the issue from another direction, which is cleaner.

Recommend continuing with the unbundling of the lexical model worker, for other reasons, but that does not necessarily need to be merged in 19.0.

@mcdurdin mcdurdin closed this Sep 22, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in Keyman Sep 22, 2026
@mcdurdin
mcdurdin deleted the fix/android/13862-concatenated-worker-and-model branch September 22, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant