moeru-ai/airi · error · Error
Electron transport is not implemented yet.
Error message
Electron transport is not implemented yet.
What it means
Thrown by createPluginContext() in the node runtime adapter when transport.kind is 'electron'. The node adapter does not implement Electron IPC bridging; Electron transport belongs to the Electron runtime adapter, not node.
Source
Thrown at packages/plugin-sdk/src/plugin-host/runtimes/node/index.ts:33
* Use when:
* - Bootstrapping a node runtime extension session
*
* Expects:
* - `transport` describes a transport supported by the node runtime
*
* Returns:
* - A node-compatible Eventa context, or throws if the transport is not implemented
*/
export function createPluginContext(transport: PluginTransport): EventContext<any, any> {
switch (transport.kind) {
case 'in-memory':
return createContext()
case 'websocket':
throw new Error('WebSocket transport is not implemented for node runtime yet.')
case 'node-worker':
throw new Error('Node worker transport is not implemented yet.')
case 'electron':
throw new Error('Electron transport is not implemented yet.')
case 'web-worker':
throw new Error('Web worker transport is not available in node runtime.')
default:
throw new Error('Unknown plugin transport kind.')
}
}
View on GitHub (pinned to 27111382b4)
Solutions
- Use the Electron runtime adapter (not the node one) when the host runs inside Electron's main process.
- In a pure node process, use { kind: 'in-memory' } or implement the appropriate node transport.
- Verify the imported createPluginContext comes from the runtime-matching entrypoint.
Example fix
// before — node adapter, electron transport
import { createPluginContext } from '@proj-airi/plugin-sdk/plugin-host/runtimes/node'
const ctx = createPluginContext({ kind: 'electron', target: 'main' })
// after — in-memory for node
const ctx = createPluginContext({ kind: 'in-memory' }) Defensive patterns
Strategy: validation
Validate before calling
if (transport.kind === 'electron') {
throw new Error('Electron transport belongs to the Electron runtime adapter, not node.')
}
const ctx = createPluginContext(transport) Type guard
function isImplementedNodeTransport(transport: PluginTransport): boolean {
return transport.kind === 'in-memory'
} Try / catch
try {
ctx = createPluginContext(transport)
} catch (error) {
if (error instanceof Error && /Electron transport is not implemented/.test(error.message)) {
ctx = createPluginContext({ kind: 'in-memory' })
} else {
throw error
}
} Prevention
- Import createPluginContext from the runtime-matching entrypoint (Electron adapter for Electron hosts).
- In pure node, never pass an electron transport.
- Assert the transport kind is supported by the imported adapter before calling.
When it happens
Trigger: Calling createPluginContext({ kind: 'electron', target, webContentsId }) from a node (non-Electron) host process. The PluginTransport union allows electron, but only the Electron runtime adapter is meant to handle it.
Common situations: Running the plugin host in a plain node process (e.g. a server or CLI) but passing an electron transport because the config was copied from an Electron app. Or the wrong runtime adapter was imported.
Related errors
- WebSocket transport is not implemented for node runtime yet.
- Node worker transport is not implemented yet.
- Web worker transport is not available in node runtime.
- Unknown plugin transport kind.
- WebSocket transport is not implemented for web runtime yet.
AI-assisted analysis of moeru-ai/airi@27111382b4 (2026-08-12).
Data as JSON: /api/errors/9a93da2f6ba9b55b.
Report an issue: GitHub.