This document describes all error conditions a plugin developer may encounter, their causes, and how to fix them.
These errors are returned in { "success": false, "error": "..." } when calling
the Host API from WASM.
capability denied / Permiso denegadoWhat it means: The plugin attempted to call a Host API operation without the required capability being granted.
Probable cause:
plugin.json → capabilities.How to fix:
capabilities in plugin.json.Response signature:
{
"success": false,
"error": "Permiso denegado: el plugin requiere \"network.http\".",
"data": {
"permissionDenied": true,
"missingCapabilities": ["network.http"]
}
}
unknown capabilityWhat it means: The plugin declared a capability that does not exist in Chattree's registry.
Probable cause:
How to fix:
plugin disabledWhat it means: The plugin is installed but has been disabled by the user.
Probable cause:
How to fix:
plugin not installedWhat it means: The command was invoked but no plugin is registered for that command.
Probable cause:
primaryCommand in plugin.json doesn't match what was typed.How to fix:
primaryCommand in plugin.json matches the command.invalid manifestWhat it means: The plugin.json file failed validation.
Probable cause:
id, version, name, author, primaryCommand, runtime, entrypoint, wasmSha256).id doesn't match required format (missing dot, invalid chars).version not in semver format.primaryCommand contains illegal characters.capabilities.How to fix:
invalid packageWhat it means: The .chattree-plugin file is malformed or unreadable.
Probable cause:
plugin.json is missing from the archive root.plugin.wasm is missing from the archive root.How to fix:
unzip -l my-plugin.chattree-plugin.runtime version mismatchWhat it means: The runtimeApiVersion in plugin.json is not compatible with
the current Chattree version.
Probable cause:
runtimeApiVersion.How to fix:
runtimeApiVersion to "1.0.0" (the current stable version).WASM execution errorWhat it means: The WASM module crashed or produced an invalid result during execution.
Probable cause:
entrypoint name).plugin.wasm is corrupted.memory.How to fix:
entrypoint in plugin.json matches the exported function name.(memory (export "memory") N).wat2wasm --validate plugin.wat.plugin.wasm matches wasmSha256 in plugin.json.Error message pattern:
Función exportada "my_func" no encontrada en el módulo WASM.
or
El módulo WASM no exporta la memoria ("memory").
timeoutWhat it means: The WASM execution exceeded the allowed time limit.
Probable cause:
timeoutMs.How to fix:
memory limitWhat it means: The WASM module's linear memory exceeded maxMemoryPages × 64 KB.
Probable cause:
maxMemoryPages.How to fix:
maxMemoryPages in plugin.json.payload buffer exceeded / El payload excede la capacidad del buffer de entrada de la ABI v1What it means: The payload sent to the plugin (from user chat or AI tool JSON) is larger than the static input buffer available between inputOffset and outputOffset (default 1024 bytes) in an ABI v1 plugin.
Probable cause:
outputOffset was left at default (1024).How to fix:
chattree_allocate, chattree_deallocate, and chattree_dispatch. This unlocks dynamic memory allocation and supports payloads up to 16 MB (12 MB by default). See getting-started.md."outputOffset": 32768 (or another offset) in plugin.json to allocate a larger static input window.invalid argumentsWhat it means: A Host API operation received incorrect or missing parameters.
Probable cause:
key for storage.get).How to fix:
host_call for debugging.network deniedWhat it means: The HTTP request was blocked by Chattree's SSRF protection or the URL violates allowed schemes.
Probable cause:
ftp://).How to fix:
https:// or http:// URLs by default.localhost, 192.168.x.x, 10.x.x.x, or .local services on the user's LAN, declare the critical network.local capability alongside network.http in plugin.json.file handle invalidWhat it means: A files.read or share.file call used an invalid handle.
Probable cause:
files.pick or files.write first).How to fix:
files.pick before files.read.cancelled == false before using the handle from files.pick.websocket connection limit reached / websocket frame too largeWhat it means: WebSocket connection or messaging constraints were exceeded.
websocket.connect attempts are rejected. Close unused sockets with websocket.close.1009 to prevent memory exhaustion.network.local capability.ui card validation error / element limit exceededWhat it means: A declarative card failed validation in UiApiHandler.sanitizeUiCard.
scheduler minimum interval violation / scheduler task limit reachedWhat it means: A task schedule violates execution safety policies.
scheduler.cancel_task before adding new ones.database quota exceeded / database unauthorized statementWhat it means: Relational SQLite database constraints were violated.
.db + -wal + -shm + -journal) has exceeded the 200 MB limit. Run DELETE or VACUUM queries to free space.database.query call exceeded the 2,000 row ceiling. Use LIMIT and pagination (OFFSET) in your SQL queries.ATTACH DATABASE, DETACH DATABASE, VACUUM INTO, modifying sqlite_master, or altering system pragmas).These errors are displayed directly in the Chattree chat as a tool error message.
| Error shown | Cause | Fix |
|---|---|---|
El módulo WASM no exporta la memoria ("memory") | Missing memory export | Add (memory (export "memory") N) |
Función exportada "..." no encontrada | Wrong entrypoint name | Fix entrypoint in plugin.json |
Error de timeout WASM: ... | Execution timed out | Reduce computation, increase timeoutMs |
El buffer de entrada excede el tamaño de memoria | Input too large | Increase maxMemoryPages |
Tamaño o puntero de salida fuera de los límites | Output buffer too small | Check output offset and length math |
El plugin WASM no retornó un tamaño de salida válido | Function returned invalid value | Ensure function returns a non-negative i32 |
pluginId inválido o no proporcionado por el runtime | Internal error | File a bug report |
Use core.log — write debug messages with:
{ "api": "core", "operation": "log", "payload": { "level": "info", "message": "reached step 3" } }
Messages appear in Flutter debug logs with [Plugin:your.plugin.id] prefix.
Test your WASM locally — use wabt's wasm-interp or Wasm-standalone tools to
validate execution before packaging.
Validate the archive — use unzip -l to verify archive structure before importing.
Check SHA-256 — run sha256sum plugin.wasm and compare with wasmSha256 in plugin.json.
Start with minimal capabilities — comment out capabilities and add them back one by one to isolate permission issues.