davila7/claude-code-templates · error
Failed to load plugins
Error message
Failed to load plugins
What it means
HTTP 500 from GET /api/plugins in the plugin dashboard when the plugin data loader throws. this.plugins is populated by loadPluginData(); any failure while scanning/parsing installed plugin definitions surfaces here.
Source
Thrown at cli-tool/src/plugin-dashboard.js:582
timestamp: new Date().toISOString()
});
} catch (error) {
console.error('Error loading marketplaces:', error);
res.status(500).json({ error: 'Failed to load marketplaces' });
}
});
this.app.get('/api/plugins', async (req, res) => {
try {
await this.loadPluginData();
res.json({
plugins: this.plugins || [],
count: (this.plugins || []).length,
timestamp: new Date().toISOString()
});
} catch (error) {
console.error('Error loading plugins:', error);
res.status(500).json({ error: 'Failed to load plugins' });
}
});
this.app.get('/api/permissions', async (req, res) => {
try {
await this.loadPluginData();
res.json({
permissions: this.permissions || {},
counts: {
agents: (this.permissions?.agents || []).length,
commands: (this.permissions?.commands || []).length,
hooks: (this.permissions?.hooks || []).length,
mcps: (this.permissions?.mcps || []).length
},
timestamp: new Date().toISOString()
});
} catch (error) {
console.error('Error loading permissions:', error);View on GitHub (pinned to a0851ed10c)
Solutions
- Read the server console 'Error loading plugins:' line for the root cause
- Remove or fix the offending plugin definition (JSON parse-check each file under the plugins directory)
- Restore/repair the plugins directory the loader scans, then restart the dashboard
- Update the package if a newer plugin format isn't understood by this loader
Defensive patterns
Strategy: fallback
Validate before calling
null
Try / catch
try { plugins = await getPlugins(); } catch { plugins = []; /* keep UI usable, surface banner */ } Prevention
- Keep plugin definitions machine-generated where possible
- Avoid deleting/moving plugin directories while the dashboard runs
- JSON-lint edited plugin files
When it happens
Trigger: GET /api/plugins when scanning installed plugin files fails — malformed plugin JSON/frontmatter, missing directory that's still referenced in config, or filesystem errors during the scan.
Common situations: A partially-installed plugin directory; plugin metadata edited by hand with syntax errors; plugins directory moved or deleted while the dashboard runs; OS-level permission changes.
Related errors
- Failed to load marketplaces
- Failed to load permissions
- Failed to update states
- Failed to get system health
- Failed to get Claude session info
AI-assisted analysis of davila7/claude-code-templates@a0851ed10c (2026-08-28).
Data as JSON: /api/errors/0d7ee088e2c7ccfb.
Report an issue: GitHub.