Foundry376/Mailspring · error

There are multiple components available for ${JSON.stringify

Error message

There are multiple components available for ${JSON.stringify(props.matching)}. <InjectedComponent> is only rendering the first one.

What it means

Warning in InjectedComponent._getStateFromStores: ComponentRegistry.findComponentsMatching returned more than one component for the given matching descriptor, but the component only renders one. Ambiguous registrations (e.g. two plugins both registering for the same location) mean all but the first are silently dropped.

Source

Thrown at app/src/components/injected-component.tsx:167

      const component = this.state.component;
      this.props.requiredMethods.forEach((method) => {
        if (component.prototype[method] === undefined) {
          throw new Error(
            `${
              component.name
            } must implement method ${method} when registering for ${JSON.stringify(
              this.props.matching
            )}`
          );
        }
      });
    }
  };

  _getStateFromStores = (props = this.props) => {
    const components = ComponentRegistry.findComponentsMatching(props.matching);
    if (components.length > 1) {
      console.warn(
        `There are multiple components available for ${JSON.stringify(
          props.matching
        )}. <InjectedComponent> is only rendering the first one.`
      );
    }
    return {
      component: components.length === 0 ? this.props.fallback : components[0],
      visible: ComponentRegistry.showComponentRegions(),
    };
  };

  render() {
    if (!this.state.component) {
      return <div />;
    }
    const exposedProps = Object.assign({}, this.props.exposedProps, {
      fallback: this.props.fallback,
    });

View on GitHub (pinned to 648c685d60)

Solutions

  1. Make the matching descriptor more specific (narrower location/role) so only one component qualifies
  2. Disable one of the conflicting plugins/extensions that register for the same slot
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at app/src/components/injected-component.tsx:167 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Foundry376/Mailspring@648c685d60 (2026-09-03). Data as JSON: /api/errors/bc3e596593b3dbaf. Report an issue: GitHub.