Unexpected undefined variable when getting translators
I spotted this on a yunohost install (the package might be the culprit) with a demo account:
[2022-06-27T09:20:34.894] [INFO] accounts-manager - Checking alerts based on accounts balances...
[2022-06-27T09:20:34.897] [ERROR] helpers - Assertion error: Expected variable to be defined
Error
at panic (/var/www/kresus/build/server/helpers.js:31:46)
at unwrap (/var/www/kresus/build/server/helpers.js:44:9)
at getTranslator (/var/www/kresus/build/server/lib/translator.js:20:43)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async AlertManager.checkAlertsForAccounts (/var/www/kresus/build/server/lib/alert-manager.js:104:26)
at async AccountManager.syncTransactions (/var/www/kresus/build/server/lib/accounts-manager.js:448:9)
at async fullPoll (/var/www/kresus/build/server/lib/poller.js:72:45)
at async Poller.run (/var/www/kresus/build/server/lib/poller.js:128:13)
at async Poller.runAtStartup (/var/www/kresus/build/server/lib/poller.js:136:13)
at async init (/var/www/kresus/build/server/init.js:56:9)
[2022-06-27T09:20:34.899] [ERROR] alert-manager - Error when checking alerts for accounts: Error: Assertion error: Expected variable to be defined
Error
at panic (/var/www/kresus/build/server/helpers.js:31:46)
at unwrap (/var/www/kresus/build/server/helpers.js:44:9)
at getTranslator (/var/www/kresus/build/server/lib/translator.js:20:43)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async AlertManager.checkAlertsForAccounts (/var/www/kresus/build/server/lib/alert-manager.js:104:26)
at async AccountManager.syncTransactions (/var/www/kresus/build/server/lib/accounts-manager.js:448:9)
at async fullPoll (/var/www/kresus/build/server/lib/poller.js:72:45)
at async Poller.run (/var/www/kresus/build/server/lib/poller.js:128:13)
at async Poller.runAtStartup (/var/www/kresus/build/server/lib/poller.js:136:13)
at async init (/var/www/kresus/build/server/init.js:56:9)
Edited by Benjamin Bouvier