sipeed/picoclaw · error
Pico channel not configured
Error message
Pico channel not configured
What it means
Sent by handleWebSocketProxy when the Pico channel has no token configured, so the proxy cannot inject credentials on the upstream gateway request and refuses to forward the WebSocket. Generic guard on the missing-token precondition.
Solutions
- Run POST /api/pico/setup or regenerate a token to configure the Pico channel
- Verify the Pico channel settings in the config contain a non-empty token
- Retry the WebSocket connection after the token is set
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at web/backend/api/pico.go:162 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/9ebbe78121bfce0e.
Report an issue: GitHub.
Appendix: source
Thrown at web/backend/api/pico.go:162
w.Header().Set("Content-Type", "application/json")
_ = json.NewEncoder(w).Encode(resp)
}
// handleWebSocketProxy wraps a reverse proxy to handle WebSocket connections.
// It relies on launcher dashboard auth, then injects the raw pico token only
// on the upstream gateway request.
func (h *Handler) handleWebSocketProxy() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
if !h.gatewayAvailableForProxy() {
logger.Warnf("Gateway not available for WebSocket proxy")
http.Error(w, "Gateway not available", http.StatusServiceUnavailable)
return
}
upstreamProtocol := picoGatewayProtocol()
if upstreamProtocol == "" {
logger.Warn("Pico token unavailable for WebSocket proxy")
http.Error(w, "Pico channel not configured", http.StatusServiceUnavailable)
return
}
var origProtocol string
if prot := r.Header.Values(protocolKey); len(prot) > 0 {
origProtocol = prot[0]
}
h.createWsProxy(origProtocol, upstreamProtocol).ServeHTTP(w, r)
}
}
func (h *Handler) handlePicoMediaProxy() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
if !h.gatewayAvailableForProxy() {
logger.Warnf("Gateway not available for Pico media proxy")
http.Error(w, "Gateway not available", http.StatusServiceUnavailable)
returnView on GitHub (pinned to 49183d7e8d)