RocketChat / RocketChat/Rocket.Chat
error in log as "Auto-Translate is disabled"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
When rocketchat server starts AND browser accesses the top page, the error is logged (See below). (although application works fortunately).
Steps to reproduce:
- access the top page of rocketchat
Expected behavior:
No error is logged.
Actual behavior:
Error is logged as quoted in 'Relevant logs' section below.
Server Setup Information:
- Version of Rocket.Chat Server: 5.4.10
- Operating System: Debian GNU/Linux 11 (bullseye)
- Deployment Method: docker (in k8s)
- Number of Running Instances: 6
- DB Replicaset Oplog: true
- NodeJS Version: v14.19.3
- MongoDB Version: 4.4.23
Client Setup Information
- Browser Version: chromium Version 116.0.5845.96
- Operating System: MX Linux 21.3 (Debian GNU/Linux 11 (bullseye))
Relevant logs:
Server log:
{"level":50,"time":"2023-08-21T18:40:55.851Z","pid":1,"hostname":"","name":"System","msg":"Exception while invoking method autoTranslate.getSupportedLanguages","err":{"type":"errorClass","message":"Auto-Translate is disabled [error-autotranslate-disabled]","stack":"Error: Auto-Translate is disabled [error-autotranslate-disabled]\n at MethodInvocation.autoTranslate.getSupportedLanguages (app/autotranslate/server/methods/getSupportedLanguages.ts:11:10)\n at MethodInvocation.methodsMap. (app/lib/server/lib/debug.js:74:34)\n at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1885:12)\n at packages/ddp-server/livedata_server.js:1803:15\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)\n at packages/ddp-server/livedata_server.js:1801:36\n at new Promise ()\n at Server.applyAsync (packages/ddp-server/livedata_server.js:1800:12)\n at Server.apply (packages/ddp-server/livedata_server.js:1739:26)\n at Server.call (packages/ddp-server/livedata_server.js:1721:17)\n at Object.post (app/api/server/v1/misc.ts:554:27)\n at app/api/server/api.js:463:96\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)\n at Object._internalRouteActionHandler [as action] (app/api/server/api.js:463:39)\n at Route._callEndpoint (packages/rocketchat_restivus/lib/route.coffee:150:32)\n at packages/rocketchat_restivus/lib/route.coffee:59:33\n at packages/simple_json-routes.js💯9\n => awaited here:\n at Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)\n at Server.apply (packages/ddp-server/livedata_server.js:1752:22)\n at Server.call (packages/ddp-server/livedata_server.js:1721:17)\n at Object.post (app/api/server/v1/misc.ts:554:27)\n at app/api/server/api.js:463:96\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)\n at Object._internalRouteActionHandler [as action] (app/api/server/api.js:463:39)\n at Route._callEndpoint (packages/rocketchat_restivus/lib/route.coffee:150:32)\n at packages/rocketchat_restivus/lib/route.coffee:59:33\n at packages/simple_json-routes.js💯9","isClientSafe":true,"error":"error-autotranslate-disabled","reason":"Auto-Translate is disabled","errorType":"Meteor.Error"},"msg":"Auto-Translate is disabled [error-autotranslate-disabled]"}
Broswer console log:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with app/autotranslate/server/methods/getSupportedLanguages.ts, where the logged error is raised, and trace the autoTranslate.getSupportedLanguages request from the top page through app/api/server/v1/misc.ts. Reproduce with Auto-Translate disabled and confirm that opening the top page no longer logs an exception while the application continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100