canopy-network/canopy · error · kotlin.Exception

Request timeout for id $requestId

Error message

Request timeout for id $requestId

What it means

Thrown in PluginClient.sendSync when the registered PendingResponse latch is not released within TIMEOUT_SECONDS after the message is sent. The FSM never replied (crash, hang, lost frame, or slow processing), so the pending entry is removed and the caller gets a timeout carrying the request id.

Source

Thrown at plugin/kotlin/src/main/kotlin/com/canopy/plugin/PluginClient.kt:317

        val requestId = msg.id
        val pendingResponse = PendingResponse()

        lock.withLock {
            pending[requestId] = pendingResponse
            if (contract != null) {
                requestContract[requestId] = contract
            }
        }

        sendMessage(msg)

        // Wait for response with timeout
        if (!pendingResponse.lock.await(TIMEOUT_SECONDS, TimeUnit.SECONDS)) {
            lock.withLock {
                pending.remove(requestId)
                requestContract.remove(requestId)
            }
            throw Exception("Request timeout for id $requestId")
        }

        return pendingResponse.response ?: throw Exception("No response received for id $requestId")
    }

    /**
     * Send response to FSM
     */
    private fun sendResponse(id: Long, builder: PluginToFSM.Builder) {
        val msg = builder.setId(id).build()
        sendMessage(msg)
    }

    /**
     * Send protobuf message with length prefix
     */
    private fun sendMessage(msg: PluginToFSM) {
        val bytes = msg.toByteArray()

View on GitHub (pinned to ee8197d91d)

Solutions

  1. Check FSM health/logs for crashes or stalled processing at the time of the request.
  2. Retry the request; if timeouts recur, increase TIMEOUT_SECONDS or investigate transport latency.
  3. Ensure the FSM is not dropping messages for the plugin's connection.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at plugin/kotlin/src/main/kotlin/com/canopy/plugin/PluginClient.kt:317 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of canopy-network/canopy@ee8197d91d (2026-09-06). Data as JSON: /api/errors/08870ef514300087. Report an issue: GitHub.