RocketChat/Rocket.Chat · warning · Meteor.Error

error-push-disabled

error-push-disabled

Error message

Push is disabled

What it means

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.

Solutions

  1. Enable push: Administration > Push > Enable (or set Push_enable=true via settings API) and wait for the server to apply it
  2. Guard test suites to skip push.test when push is disabled instead of failing the build
  3. If you only need the gateway config, use GET /api/v1/push.info (pushGatewayEnabled/defaultPushGateway) which does not require Push_enable

Example fix

// before
await sdk.post('push.test'); // throws error-push-disabled

// after
const { pushGatewayEnabled } = await sdk.get('push.info');
if (!pushEnabled) return console.warn('Push disabled — skipping test');
await sdk.post('push.test');
Defensive patterns

Strategy: validation

Validate before calling

// admins: confirm Push is enabled before testing
const { settings } = await sdk.get('settings', { query: JSON.stringify({ _id: 'Push_enable' }) });
if (settings?.[0]?.value !== true) throw new Error('Push_enable is off — skip push.test');
await sdk.post('push.test');

Try / catch

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.

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18). Data as JSON: /api/errors/d560a9a7e3767d83. Report an issue: GitHub.

Appendix: source

Thrown at apps/meteor/server/api/v1/push.ts:381

					tokensCount: { type: 'integer' },
					// The admin "send a test push" setting renders the outcome straight from this
					// response, so it carries the i18n key and its interpolation values.
					message: { type: 'string' },
					params: { type: 'array', items: { type: 'integer' } },
					success: {
						type: 'boolean',
						enum: [true],
					},
				},
				required: ['tokensCount', 'message', 'params', 'success'],
				additionalProperties: false,
			}),
		},
	},

	async function action() {
		if (settings.get('Push_enable') !== true) {
			throw new Meteor.Error('error-push-disabled', 'Push is disabled', {
				method: 'push_test',
			});
		}

		const tokensCount = await executePushTest(this.userId, this.user.username);
		return API.v1.success({ tokensCount, message: 'Your_push_was_sent_to_s_devices', params: [tokensCount] });
	},
);

type PushTestEndpoints = ExtractRoutesFromAPI<typeof pushTestEndpoints>;

type PushTokenEndpoints = ExtractRoutesFromAPI<typeof pushTokenEndpoints>;

type PushGetInfoEndpoints = ExtractRoutesFromAPI<typeof pushGetInfoEndpoints>;

type PushEndpoints = PushTestEndpoints & PushTokenEndpoints & PushGetInfoEndpoints;

declare module '@rocket.chat/rest-typings' {

View on GitHub (pinned to b2c16d5842)