RocketChat/Rocket.Chat · warning · ProviderNotFoundError
error-provider-not-found
Error message
error-provider-not-found
What it means
Provider counterpart of the contact guard in RecipientForm submit: after the awaited provider refetch, a falsy provider throws ProviderNotFoundError ('error-provider-not-found', a FormFetchError subclass). The catch maps it to validateProviderField(true), flagging the provider selection field. Providers are outbound-message integrations (SMS/WhatsApp gateways etc.) registered with the Apps-Engine; none resolved for the selection.
Source
Thrown at apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/forms/RecipientForm/RecipientForm.tsx:167
useEffect(() => {
isDirty && onDirty && onDirty();
}, [isDirty, onDirty]);
const submit = useStableCallback(async (values: RecipientFormData) => {
try {
// Wait if contact or provider is still being fetched in background
const [updatedContact, updatedProvider] = await Promise.all([
isFetchingContact ? refetchContact().then((r) => r.data) : Promise.resolve(contact),
isFetchingProvider ? refetchProvider().then((r) => r.data) : Promise.resolve(provider),
]);
if (!updatedContact) {
throw new ContactNotFoundError();
}
if (!updatedProvider) {
throw new ProviderNotFoundError();
}
onSubmit({ ...values, provider: updatedProvider, contact: updatedContact });
} catch (error) {
if (error instanceof ContactNotFoundError) {
validateContactField(true);
return;
}
if (error instanceof ProviderNotFoundError) {
validateProviderField(true);
return;
}
dispatchToastMessage({ type: 'error', message: t('Something_went_wrong') });
}
});
View on GitHub (pinned to b2c16d5842)
Solutions
- Install and enable at least one outbound messaging provider app (Admin > Apps) and restart the wizard.
- Re-select the provider after changes to installed apps.
- Disable submit until the provider query is settled and non-empty.
Example fix
// before
if (!updatedProvider) {
throw new ProviderNotFoundError();
}
// after: gate the step on provider availability
const canSubmit = !isFetchingProvider && !isErrorProvider && Boolean(provider);
{!provider && <Banner>{t('No_providers_available')}</Banner>}
<ActionButton disabled={!canSubmit} onClick={submit} /> Defensive patterns
Strategy: validation
Validate before calling
const canSubmit = !isFetchingProvider && !isErrorProvider && Boolean(provider);
if (!provider) { /* install/enable an outbound provider app, then restart wizard */ } Type guard
const hasProvider = (p: unknown): p is { id: string } =>
Boolean(p && typeof (p as any).id === 'string'); Prevention
- Install and enable at least one outbound provider app.
- Re-select providers after app installs/uninstalls.
- Block submit until the provider query settles.
When it happens
Trigger: Submitting the recipient step while the provider query (omnichannelQueryKeys by providerId) is fetching and resolves empty, or when the selected provider app was removed/disabled between selection and submit.
Common situations: No outbound provider apps installed/enabled, so provider lookup returns nothing; provider app uninstalled mid-wizard; stale providerId from a previous session.
Related errors
- error-contact-not-found
- error-department-not-found
- error-agent-not-found
- error-invalid-provider
- apps-engine-not-loaded
AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18).
Data as JSON: /api/errors/c8a9238643c16db9.
Report an issue: GitHub.