You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 30, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 30, 2026. It is now read-only.
moduleLoadTimeout config is not applied to modules that start loading before the config module is ready #769
However, some modules (e.g. adapt-authoring-adaptframework, adapt-authoring-defaultplugins, adapt-authoring-spoortracking, adapt-authoring-content, adapt-authoring-contentplugin) begin loading before the config module has finished initialising. At that point, this.app.getConfig('moduleLoadTimeout') returns undefined, so these modules silently fall back to the hardcoded 10000ms default — regardless of what moduleLoadTimeout is actually set to (via config file or ADAPT_AUTHORING_CORE__moduleLoadTimeout).
This is only reproducible for modules that happen to start loading early in the dependency chain; modules that load after config is ready correctly pick up the configured value.
We're currently patching the fallback value directly in node_modules after install as a stopgap:
sed -i "s/?? 10000/?? 90000/" node_modules/adapt-authoring-core/lib/DependencyLoader.js
This works but obviously isn't something we want to keep doing long-term.
Expected behaviour
moduleLoadTimeout should apply consistently to all modules, regardless of load order. This likely requires either:
resolving moduleLoadTimeout once, before the DependencyLoader begins loading any module (rather than looking it up lazily per-module via this.app.getConfig(...)), or
ensuring config is guaranteed to be ready before any other module load is attempted.
Steps to reproduce
Set moduleLoadTimeout to a value higher than 10000ms (e.g. "90s" in config, or ADAPT_AUTHORING_CORE__moduleLoadTimeout=90000).
Run the app in an environment where adapt-authoring-adaptframework's initial framework download + npm install takes longer than 10 seconds (e.g. a CI runner without a warm npm cache — this routinely takes 40-50s for us).
Observe the module fail with DEP_TIMEOUT after ~10 seconds, with data.timeout logged as 10000 — not the configured value.
Activity