stablyai/orca · error
plugin exceeds the ${MAX_PLUGIN_TOTAL_BYTES}-byte limit
Error message
plugin exceeds the ${MAX_PLUGIN_TOTAL_BYTES}-byte limit What it means
Thrown by the packaged plugin resource verifier when the cumulative byte size of all files in a single plugin tree exceeds MAX_PLUGIN_TOTAL_BYTES (50 MiB, defined as 50 * 1024 * 1024 at line 6). The counter accumulates metadata.size for every regular file and throws immediately when totalBytes crosses the threshold. This prevents oversized plugins from bloating the installer and slowing downloads.
Source
Thrown at config/scripts/verify-packaged-plugin-resources.cjs:40
for (const entry of entries) {
if (directory === root && entry.name === '.git') {
continue
}
const entryPath = join(directory, entry.name)
const metadata = lstatSync(entryPath)
entriesVisited += 1
if (entriesVisited > MAX_PLUGIN_FILES) {
throw new Error(`plugin exceeds the ${MAX_PLUGIN_FILES}-entry limit`)
}
if (metadata.isSymbolicLink()) {
throw new Error(`packaged plugin contains a symlink: ${relative(root, entryPath)}`)
}
if (metadata.isDirectory()) {
visit(entryPath)
} else if (metadata.isFile()) {
totalBytes += metadata.size
if (totalBytes > MAX_PLUGIN_TOTAL_BYTES) {
throw new Error(`plugin exceeds the ${MAX_PLUGIN_TOTAL_BYTES}-byte limit`)
}
files.push({ path: entryPath, size: metadata.size })
} else {
throw new Error(`packaged plugin contains an unsupported entry: ${entryPath}`)
}
}
}
visit(root)
const hash = createHash('sha256').update('orca-plugin-tree-v1\0')
for (const file of files) {
const relativePath = relative(root, file.path).replaceAll('\\', '/')
hashLength(hash, Buffer.byteLength(relativePath, 'utf8'))
hash.update(relativePath, 'utf8')
hashLength(hash, file.size)
hash.update(readFileSync(file.path))
}
return hash.digest('hex')
}View on GitHub (pinned to 1136503c6a)
Solutions
- Identify the largest files in the plugin: du -ah <pluginRoot> | sort -rh | head -20.
- Exclude source maps from the packaged plugin if they're not needed at runtime.
- Optimize or compress binary assets (images, fonts); consider lazy-loading large assets from a CDN instead of bundling them.
- If the plugin legitimately exceeds 50 MiB, raise MAX_PLUGIN_TOTAL_BYTES — but review whether all content is necessary first.
Defensive patterns
Strategy: validation
Validate before calling
// Before packaging, measure total size of the plugin directory.
const { execSync } = require('node:child_process')
function preCheckPluginSize(pluginRoot, maxBytes = 50 * 1024 * 1024) {
const output = execSync(`du -sb ${JSON.stringify(pluginRoot)}`, {
encoding: 'utf8'
})
const bytes = parseInt(output.split(/\s+/)[0], 10)
return { ok: bytes <= maxBytes, bytes, maxBytes }
} Prevention
- Exclude source maps from packaged plugins when they're not needed at runtime.
- Optimize binary assets (images, fonts, WASM) before packaging; use compression or lower resolution where acceptable.
- Monitor plugin size trends in CI to catch size regressions early before they hit the 50 MiB limit.
When it happens
Trigger: hashPackagedPluginTree(root) accumulates more than 50 MiB across all files in a single plugin. Typically caused by packaging binary assets, large data files, source maps, or unoptimized bundles.
Common situations: A plugin bundles binary assets (images, fonts, WASM files) that push it over 50 MiB; source maps (.map files) from the build are included in the package; a large third-party dependency was bundled without tree-shaking; test data or fixtures were not excluded.
Related errors
- plugin exceeds the ${MAX_PLUGIN_FILES}-entry limit
- packaged plugin contains a symlink: ${relative(root, entryPa
- packaged plugin contains an unsupported entry: ${entryPath}
- [verify-packaged-plugin-resources] invalid ${label} at ${pat
- [verify-packaged-plugin-resources] missing launch directory
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/d978a6ae5765bbb3.
Report an issue: GitHub.