davila7/claude-code-templates · error
Failed to load permissions
Error message
Failed to load permissions
What it means
HTTP 500 from GET /api/permissions in the plugin dashboard when building the permissions payload (tools, agents, mcps from this.permissions) fails during data loading. The catch-all responds after logging 'Error loading permissions:'.
Source
Thrown at cli-tool/src/plugin-dashboard.js:601
}
});
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);
res.status(500).json({ error: 'Failed to load permissions' });
}
});
this.app.get('/api/summary', async (req, res) => {
try {
await this.loadPluginData();
res.json({
marketplaces: (this.marketplaces || []).length,
plugins: (this.plugins || []).length,
permissions: {
agents: (this.permissions?.agents || []).length,
commands: (this.permissions?.commands || []).length,
hooks: (this.permissions?.hooks || []).length,
mcps: (this.permissions?.mcps || []).length,
total: (this.permissions?.agents || []).length +
(this.permissions?.commands || []).length +
(this.permissions?.hooks || []).length +
(this.permissions?.mcps || []).lengthView on GitHub (pinned to a0851ed10c)
Solutions
- Check the server console for 'Error loading permissions:' and the underlying message
- JSON-validate the permissions/settings files the dashboard reads; restore from backup or regenerate
- Fix filesystem read permissions on the config directory and restart the dashboard
- Update the plugin-dashboard package to match the current permissions file format
Defensive patterns
Strategy: fallback
Validate before calling
null
Try / catch
try { perms = await getPermissions(); } catch { perms = { tools: [], agents: [], mcps: [] }; } Prevention
- Treat config files as code: validate and back them up
- Retry once after repairing the offending file
- Watch dashboard console output for the wrapped root cause
When it happens
Trigger: GET /api/permissions when loadPluginData() throws while reading the permissions/settings files that populate this.permissions, or when those files are malformed.
Common situations: Corrupted or hand-edited settings/permissions JSON; file locked or unreadable due to permissions; partial upgrade leaving a new-format permissions file the loader can't parse.
Related errors
- Failed to load marketplaces
- Failed to load plugins
- 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/486080eab11636f3.
Report an issue: GitHub.