RocketChat/Rocket.Chat · warning · Error
Provider currently not active
Error message
Provider currently not active
What it means
`rocketchatSearch.search` throws a plain `Error('Provider currently not active')` when `searchProviderService.activeProvider` is null — no search provider (default or Solr) is registered/active on the server. The provider service activates a provider during startup/settings load; if none activated, every search call fails with this error before any search runs.
Source
Thrown at apps/meteor/server/meteor-methods/platform/search.ts:53
icon: provider.iconName,
resultTemplate: provider.resultTemplate,
supportsSuggestions: provider.supportsSuggestions,
suggestionItemTemplate: provider.suggestionItemTemplate,
settings: Object.fromEntries(Object.values(provider.settingsAsMap).map((setting) => [setting.key, setting.value] as const)),
};
},
/**
* Search using the current search provider and check if results are valid for the user. The search result has
* the format `{messages:{start:0,numFound:1,docs:[{...}]},users:{...},rooms:{...}}`
* @param text the search text
* @param context the context (uid, rid)
* @param payload custom payload (e.g. for paging)
*/
async 'rocketchatSearch.search'(text, context, payload) {
payload = payload !== null ? payload : undefined; // TODO is this cleanup necessary?
if (!searchProviderService.activeProvider) {
throw new Error('Provider currently not active');
}
SearchLogger.debug({ msg: 'search', text, context, payload });
const userId = Meteor.userId();
if (!userId) {
throw new Error('User not logged in');
}
return new Promise<IRawSearchResult>((resolve, reject) => {
void searchProviderService.activeProvider?.search(userId, text, context, payload, (error, data) => {
if (error) {
return reject(error);
}
return resolve(data);
});
}).then((result) => validationService.validateSearchResult(result));View on GitHub (pinned to b2c16d5842)
Solutions
- Set/verify a search provider in Administration -> Search (the default provider needs no external service)
- For Solr: fix connection details and re-save settings so the provider activates, then test connectivity
- Restart the server if the provider failed during startup
- On the client, disable the search UI when no provider is active instead of letting calls fail
Defensive patterns
Strategy: fallback
Validate before calling
// expose search only when a provider is configured
const searchConfigured = () => Boolean(settings.get('Search_Provider'));
if (!searchConfigured()) {
disableSearchUI();
} Try / catch
try {
const results = await Meteor.callAsync('rocketchatSearch.search', text, context, payload);
} catch (e) {
if (e instanceof Error && e.message === 'Provider currently not active') {
// no provider: degrade to no-search UX instead of surfacing the error
}
} Prevention
- Complete search provider setup before exposing search UI
- Monitor Solr availability — a provider that fails activation leaves activeProvider null
- Re-verify search settings after upgrades and restarts
When it happens
Trigger: `Meteor.call('rocketchatSearch.search', text, context, payload)` on a server where search was never configured, the chosen provider failed to initialize (e.g. Solr unreachable), or settings were changed without the service re-initializing.
Common situations: Fresh installation without completing search setup; Solr selected but host/port/credentials wrong so activation failed; feature regressions after upgrades where the provider never started.
Related errors
- error-invalid-user
- User not logged in
- Livechat secret token is not configured
- error-action-not-allowed
- error-invalid-message
AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18).
Data as JSON: /api/errors/4f60cd9441696fb0.
Report an issue: GitHub.