chenhg5/cc-connect · error
qq: http_url not configured
Error message
qq: http_url not configured
What it means
Returned by callHTTPAPI when p.httpURL is empty. The HTTP path (used by parseMessage-driven file operations like /upload_group_file) requires a OneBot HTTP endpoint to be configured because WebSocket cannot handle large file uploads or cross-host file paths. Without http_url, file operations simply cannot run.
Source
Thrown at platform/qq/qq.go:592
if resp.RetCode != 0 {
return nil, fmt.Errorf("qq: API %s failed (retcode=%d)", action, resp.RetCode)
}
var result map[string]any
_ = json.Unmarshal(resp.Data, &result)
return result, nil
case <-time.After(15 * time.Second):
return nil, fmt.Errorf("qq: API %s timeout", action)
}
}
// callHTTPAPI calls a OneBot v11 HTTP endpoint (e.g. /upload_group_file).
// Used for file operations — avoids WebSocket message size limits and
// file-path issues across Windows/WSL/Docker boundaries.
// Requires http_url to be configured.
func (p *Platform) callHTTPAPI(action string, params map[string]any) (map[string]any, error) {
if p.httpURL == "" {
return nil, fmt.Errorf("qq: http_url not configured")
}
body, err := json.Marshal(params)
if err != nil {
return nil, err
}
url := p.httpURL + "/" + action
req, err := http.NewRequest("POST", url, bytes.NewReader(body))
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", "application/json")
if p.token != "" {
req.Header.Set("Authorization", "Bearer "+p.token)
}
client := &http.Client{Timeout: 120 * time.Second}
resp, err := client.Do(req)
if err != nil {
return nil, fmt.Errorf("qq: HTTP %s failed: %w", action, err)View on GitHub (pinned to 4000b2338a)
Solutions
- Add http_url to the qq platform config pointing at the OneBot HTTP endpoint (e.g. "http://127.0.0.1:5700").
- Ensure the OneBot implementation has its HTTP server enabled on that address/port (not just the WS server).
- If you only need WS, avoid the file-upload features that require the HTTP API, or upgrade your OneBot setup to expose HTTP.
- Verify the URL is reachable from the cc-connect host: curl http://<host>:<port>/get_login_info.
Example fix
// before (config.toml) [platforms.qq] ws_url = "ws://127.0.0.1:6700" // after [platforms.qq] ws_url = "ws://127.0.0.1:6700" http_url = "http://127.0.0.1:5700"
Defensive patterns
Strategy: validation
Validate before calling
if cfg.QQ.HTTPURL == "" {
return fmt.Errorf("qq platform requires http_url for file operations")
}
u, err := url.Parse(cfg.QQ.HTTPURL)
if err != nil || u.Scheme != "http" && u.Scheme != "https" {
return fmt.Errorf("invalid qq http_url: %q", cfg.QQ.HTTPURL)
}
resp, err := http.Get(cfg.QQ.HTTPURL + "/get_login_info")
if err != nil {
return fmt.Errorf("onebot http endpoint unreachable: %w", err)
}
resp.Body.Close() Try / catch
result, err := p.callHTTPAPI("upload_group_file", params)
if err != nil {
if strings.Contains(err.Error(), "http_url not configured") {
return fmt.Errorf("file upload unavailable: add http_url to the qq platform config")
}
return err
} Prevention
- Always configure http_url alongside ws_url for full-featured deployments
- Enable the OneBot HTTP server, not just the WS server
- Probe the HTTP endpoint at startup and warn early if missing
- Validate config keys against the platform's required fields on load
When it happens
Trigger: Any file operation routed to callHTTPAPI (e.g. upload_group_file triggered from a parsed message) while the qq platform config omits http_url.
Common situations: Deployments configured for WebSocket-only OneBot access; config.toml missing the http_url key after an upgrade that introduced HTTP file upload; reverse proxy exposing only the WS endpoint, not the HTTP API port.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- dingtalk: upload file: %w
- too many redirects
- range chunk retries exhausted
- acp: agent option "cmd" or "command" is required (path or na
- acp: command %q not found in PATH: %w
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/61cb7e8d71e3d76b.
Report an issue: GitHub.