{"record":{"id":"d560a9a7e3767d83","repo":"RocketChat/Rocket.Chat","slug":"error-push-disabled","errorCode":"error-push-disabled","errorMessage":"Push is disabled","messagePattern":"Push is disabled","errorType":"exception","errorClass":"Meteor.Error","httpStatus":400,"severity":"warning","filePath":"apps/meteor/server/api/v1/push.ts","lineNumber":381,"sourceCode":"\t\t\t\t\ttokensCount: { type: 'integer' },\n\t\t\t\t\t// The admin \"send a test push\" setting renders the outcome straight from this\n\t\t\t\t\t// response, so it carries the i18n key and its interpolation values.\n\t\t\t\t\tmessage: { type: 'string' },\n\t\t\t\t\tparams: { type: 'array', items: { type: 'integer' } },\n\t\t\t\t\tsuccess: {\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tenum: [true],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\trequired: ['tokensCount', 'message', 'params', 'success'],\n\t\t\t\tadditionalProperties: false,\n\t\t\t}),\n\t\t},\n\t},\n\n\tasync function action() {\n\t\tif (settings.get('Push_enable') !== true) {\n\t\t\tthrow new Meteor.Error('error-push-disabled', 'Push is disabled', {\n\t\t\t\tmethod: 'push_test',\n\t\t\t});\n\t\t}\n\n\t\tconst tokensCount = await executePushTest(this.userId, this.user.username);\n\t\treturn API.v1.success({ tokensCount, message: 'Your_push_was_sent_to_s_devices', params: [tokensCount] });\n\t},\n);\n\ntype PushTestEndpoints = ExtractRoutesFromAPI<typeof pushTestEndpoints>;\n\ntype PushTokenEndpoints = ExtractRoutesFromAPI<typeof pushTokenEndpoints>;\n\ntype PushGetInfoEndpoints = ExtractRoutesFromAPI<typeof pushGetInfoEndpoints>;\n\ntype PushEndpoints = PushTestEndpoints & PushTokenEndpoints & PushGetInfoEndpoints;\n\ndeclare module '@rocket.chat/rest-typings' {","sourceCodeStart":363,"sourceCodeEnd":399,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/api/v1/push.ts#L363-L399","documentation":"Thrown by POST /api/v1/push.test when the server setting Push_enable is not exactly true — the push subsystem is switched off, so no test notification can be sent. The error carries details { method: 'push_test' } and is the API's explicit signal that this is a configuration state, not a transient failure; enable Push in Administration > Push before retrying.","triggerScenarios":"POST /api/v1/push.test on a fresh install where Push has never been enabled; after an admin disabled Push (e.g. to stop noisy gateways) while CI still runs push tests; settings import/migration that reset Push_enable to false.","commonSituations":"CI suites running push.test against workspaces without push configured; staging servers with push intentionally off; docker deployments that don't persist settings between recreations and revert to defaults.","solutions":["Enable push: Administration > Push > Enable (or set Push_enable=true via settings API) and wait for the server to apply it","Guard test suites to skip push.test when push is disabled instead of failing the build","If you only need the gateway config, use GET /api/v1/push.info (pushGatewayEnabled/defaultPushGateway) which does not require Push_enable"],"exampleFix":"// before\nawait sdk.post('push.test'); // throws error-push-disabled\n\n// after\nconst { pushGatewayEnabled } = await sdk.get('push.info');\nif (!pushEnabled) return console.warn('Push disabled — skipping test');\nawait sdk.post('push.test');","handlingStrategy":"validation","validationCode":"// admins: confirm Push is enabled before testing\nconst { settings } = await sdk.get('settings', { query: JSON.stringify({ _id: 'Push_enable' }) });\nif (settings?.[0]?.value !== true) throw new Error('Push_enable is off — skip push.test');\nawait sdk.post('push.test');","typeGuard":null,"tryCatchPattern":"catch 'error-push-disabled' and degrade gracefully (skip the test, log a config warning) — it is deterministic until an admin flips Push_enable, so do not retry in a loop.","preventionTips":["Gate push.test in CI behind a push-enabled workspace flag","Use GET push.info for gateway capability checks — it works regardless of Push_enable","Persist settings volumes in containerized deployments so Push_enable survives recreations"],"tags":["push","notifications","settings","configuration","rest-api"],"backgroundTag":"feature-disabled-by-config","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}