sipeed/picoclaw · error

channel does not support media sending

Error message

channel %q does not support media sending

What it means

A capability guard in sendMediaWithRetry: the named channel implements the Channel interface but not MediaSender, so media messages cannot be routed through it. The channel name at fault is embedded in the error.

Solutions

  1. Send only text through channels without MediaSender support
  2. Implement MediaSender on the channel if media support is required
  3. Route media messages to a media-capable channel
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/channels/manager.go:1746 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/55b0086385c3474b. Report an issue: GitHub.

Appendix: source

Thrown at pkg/channels/manager.go:1746

			_, _ = m.sendMediaWithRetry(ctx, name, w, msg)
		case <-ctx.Done():
			return
		}
	}
}

// sendMediaWithRetry sends a media message through the channel with rate limiting and
// retry logic. It returns the message IDs and nil on success, or nil and the last error
// after retries, including when the channel does not support MediaSender.
func (m *Manager) sendMediaWithRetry(
	ctx context.Context,
	name string,
	w *channelWorker,
	msg bus.OutboundMediaMessage,
) ([]string, error) {
	ms, ok := w.ch.(MediaSender)
	if !ok {
		err := fmt.Errorf("channel %q does not support media sending", name)
		logger.WarnCF("channels", "Channel does not support MediaSender", map[string]any{
			"channel": name,
			"error":   err.Error(),
		})
		return nil, err
	}

	// Rate limit: wait for token
	if err := w.limiter.Wait(ctx); err != nil {
		m.publishChannelEvent(
			runtimeevents.KindChannelRateLimited,
			name,
			scopeFromOutboundContext(msg.Context),
			runtimeevents.SeverityWarn,
			ChannelOutboundPayload{
				Media: true,
				Error: err.Error(),
			},

View on GitHub (pinned to 49183d7e8d)