GoogleChrome/lighthouse · error · Error
${pluginName} has a group not defined as an object.
Error message
${pluginName} has a group not defined as an object. What it means
Thrown by ConfigPlugin._parseGroups while iterating Object.entries(groups). Each value in the groups map must itself be a plain object (isObjectOfUnknownProperties). If any group entry is null, an array, a string, or a number, this error fires.
Source
Thrown at core/config/config-plugin.js:199
* @param {string} pluginName
* @return {Record<string, LH.Config.GroupJson>|undefined}
*/
static _parseGroups(groupsJson, pluginName) {
if (groupsJson === undefined) {
return undefined;
}
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;
}
View on GitHub (pinned to 9515cd4e58)
Solutions
- Make every group value an object with at least a title: groups: {groupA: {title:'Group A'}}.
- Delete the malformed group key if it is not needed.
Example fix
// before
groups: {performance: 'Performance metrics'}
// after
groups: {performance: {title: 'Performance metrics', description: 'Speed metrics'}} Defensive patterns
Strategy: validation
Validate before calling
function isPlainObject(v) { return typeof v === 'object' && v !== null && !Array.isArray(v); }
for (const [id, g] of Object.entries(plugin.groups || {})) {
if (!isPlainObject(g)) throw new TypeError(`group '${id}' must be an object`);
} Type guard
function everyGroupIsObject(groups) {
return Object.values(groups).every(g => typeof g === 'object' && g !== null && !Array.isArray(g));
} Try / catch
try { await ConfigPlugin.parsePlugin(plugin, name); }
catch (e) { if (/group not defined as an object/.test(e.message)) console.error('Each group must be {title,...}'); throw e; } Prevention
- Each group value must be an object literal with at least title.
- Avoid bare strings as group values.
When it happens
Trigger: groups: {groupA: 'My Group'} or groups: {groupA: null} or groups: {groupA: [{...}]}. The per-group value is not a plain object, so config-plugin.js:199 throws.
Common situations: Writing a group as a bare title string instead of {title:'...'}. Copy-paste leaving an empty placeholder. YAML producing null for an unset group.
Related errors
- ${pluginName} groups json is not defined as an object.
- ${pluginName} has an invalid group title.
- ${pluginName} has an invalid group description.
- ${pluginName} has an invalid category description.
- ${pluginName} has an invalid category manualDescription.
AI-assisted analysis of GoogleChrome/lighthouse@9515cd4e58 (2026-08-13).
Data as JSON: /api/errors/64341faf84ae8636.
Report an issue: GitHub.