GoogleChrome/lighthouse · error · Error

${pluginName} has an invalid group title.

Error message

${pluginName} has an invalid group title.

What it means

Thrown by ConfigPlugin._parseGroups after confirming a group is an object. Each group requires a 'title' that is a string or ICU message (i18n.isStringOrIcuMessage). Unlike description, title is mandatory; a missing or non-string title fails the check (no undefined escape, because isStringOrIcuMessage(undefined) is false).

Source

Thrown at core/config/config-plugin.js:205

    }

    if (!isObjectOfUnknownProperties(groupsJson)) {
      throw new Error(`${pluginName} groups json is not defined as an object.`);
    }

    const groups = Object.entries(groupsJson);

    /** @type {Record<string, LH.Config.GroupJson>} */
    const parsedGroupsJson = {};
    groups.forEach(([groupId, groupJson]) => {
      if (!isObjectOfUnknownProperties(groupJson)) {
        throw new Error(`${pluginName} has a group not defined as an object.`);
      }
      const {title, description, ...invalidRest} = groupJson;
      assertNoExcessProperties(invalidRest, pluginName, 'group');

      if (!i18n.isStringOrIcuMessage(title)) {
        throw new Error(`${pluginName} has an invalid group title.`);
      }
      if (!i18n.isStringOrIcuMessage(description) && description !== undefined) {
        throw new Error(`${pluginName} has an invalid group description.`);
      }
      parsedGroupsJson[`${pluginName}-${groupId}`] = {
        title,
        description,
      };
    });
    return parsedGroupsJson;
  }

  /**
   * Extracts and validates a config from the provided plugin input, throwing
   * if it deviates from the expected object shape.
   * @param {unknown} pluginJson
   * @param {string} pluginName
   * @return {LH.Config}

View on GitHub (pinned to 9515cd4e58)

Solutions

  1. Add a string title to every group: {title: 'Group A'}.
  2. Use an i18n ICU message for localizable titles.
  3. Ensure no group object omits title.

Example fix

// before
groups: {a: {description: 'only desc'}}
// after
groups: {a: {title: 'Group A', description: 'only desc'}}
Defensive patterns

Strategy: validation

Validate before calling

const i18n = require('lighthouse/core/lib/i18n/i18n.js');
for (const [id, g] of Object.entries(plugin.groups || {})) {
  if (!i18n.isStringOrIcuMessage(g.title)) throw new TypeError(`group '${id}' requires a string title`);
}

Type guard

function groupHasTitle(g) { return typeof g === 'object' && g !== null && typeof g.title === 'string'; }

Try / catch

try { await ConfigPlugin.parsePlugin(plugin, name); }
catch (e) { if (/invalid group title/.test(e.message)) console.error('Add a string title to each group'); throw e; }

Prevention

When it happens

Trigger: groups: {groupA: {description: 'desc'}} (no title) or groups: {groupA: {title: 5}}. isStringOrIcuMessage(title) is false, so config-plugin.js:205 throws.

Common situations: Forgetting the title field (it is required, unlike description). Setting title to a number or object. Assuming description alone is enough.

Related errors


AI-assisted analysis of GoogleChrome/lighthouse@9515cd4e58 (2026-08-13). Data as JSON: /api/errors/8e1dd707ce09492c. Report an issue: GitHub.