RocketChat/Rocket.Chat · warning · Error
Search provider not found
Error message
Search provider not found
What it means
Thrown inside a React Query queryFn when the 'rocketchatSearch.getProvider' method returns undefined. This method queries the server for the configured message search provider (e.g., the default provider, ElasticSearch, or a third-party search app). If no search provider is configured server-side, the method returns undefined, and the queryFn throws to surface the absence.
Source
Thrown at apps/meteor/client/views/room/contextualBar/MessageSearchTab/hooks/useMessageSearchProviderQuery.ts:12
import { useMethod } from '@rocket.chat/ui-contexts';
import { useQuery } from '@tanstack/react-query';
export const useMessageSearchProviderQuery = () => {
const getSearchProvider = useMethod('rocketchatSearch.getProvider');
return useQuery({
queryKey: ['search', 'provider'] as const,
queryFn: async () => {
const provider = await getSearchProvider();
if (provider === undefined) {
throw new Error('Search provider not found');
}
return provider;
},
});
};
View on GitHub (pinned to f9d3ec372b)
Solutions
- Configure a search provider in Rocket.Chat server settings (Admin > Settings > Search).
- Install and enable a search provider app if using the marketplace-based search.
- Guard the UI: only show the message search tab when the query succeeds (not when it errors).
- Catch the error in the component and show a 'Search not configured' message instead of the search UI.
Example fix
// before
const { data } = useMessageSearchProviderQuery();
// after: handle missing provider
const { data, isError } = useMessageSearchProviderQuery();
if (isError || !data) {
return <Message>Search is not configured. Contact your administrator.</Message>;
} Defensive patterns
Strategy: validation
Validate before calling
const provider = await getSearchProvider();
if (provider === undefined) {
// no search provider configured, do not show search UI
return;
} Type guard
const hasSearchProvider = async (): Promise<boolean> => {
const provider = await getSearchProvider();
return provider !== undefined;
}; Try / catch
const { data, isError } = useMessageSearchProviderQuery();
if (isError) {
// show 'search not configured' instead of search UI
return <SearchNotConfigured />;
} Prevention
- Configure a search provider in Rocket.Chat admin settings before enabling the search UI.
- Only render the message search tab when the provider query succeeds.
- Show a configuration guidance message when the provider is undefined.
- Verify the search provider app/plugin is installed and enabled.
When it happens
Trigger: No search provider is configured in Rocket.Chat server settings. The search provider setting exists but the provider app/plugin is not installed or enabled. The server method returns undefined due to a configuration gap. The search provider was recently uninstalled.
Common situations: Fresh Rocket.Chat installation without search configured. Search app (e.g., ElasticSearch integration) was uninstalled or disabled. Server setting 'Search_Provider' is empty or misconfigured. The message search tab is shown but no backend search is available.
Related errors
- LDAP_search_failed
- Invalid server info
- E2E encryption can only be enabled in secure contexts (HTTPS
- ${result.error}
- Invalid main message
AI-assisted analysis of RocketChat/Rocket.Chat@f9d3ec372b (2026-08-12).
Data as JSON: /api/errors/2c57cc5761c51ca6.
Report an issue: GitHub.