chenhg5/cc-connect · error
webex: getMe: %w
Error message
webex: getMe: %w
What it means
Start first fetches the bot's own identity via GET /people/me. Any client error (auth failure, network problem, API error) is wrapped as 'webex: getMe: %w'. This usually means authentication or connectivity to Webex failed before the platform could start.
Source
Thrown at platform/webex/webex.go:211
stableConnWindow = 10 * time.Second
)
// Start fetches the bot identity, registers a device, and launches the
// reconnecting WebSocket read loop in the background.
func (p *Platform) Start(handler core.MessageHandler) error {
p.mu.Lock()
if p.stopping {
p.mu.Unlock()
return fmt.Errorf("webex: platform stopped")
}
p.handler = handler
ctx, cancel := context.WithCancel(context.Background())
p.cancel = cancel
p.mu.Unlock()
me, err := p.client.GetMe(ctx)
if err != nil {
return fmt.Errorf("webex: getMe: %w", err)
}
p.mu.Lock()
p.selfID = me.ID
if len(me.Emails) > 0 {
p.selfEmail = me.Emails[0]
}
p.mu.Unlock()
slog.Info("webex: authenticated", "bot", me.DisplayName)
go p.connectLoop(ctx)
return nil
}
// Stop cancels the read loop and deletes the registered device.
func (p *Platform) Stop() error {
p.mu.Lock()
p.stopping = true
cancel := p.cancelView on GitHub (pinned to 4000b2338a)
Solutions
- Validate the bot token with curl -H "Authorization: Bearer $TOKEN" https://webexapis.com/v1/people/me
- Check network/proxy configuration so the host can reach webexapis.com over TLS
- Regenerate the token if it was revoked or belongs to a deleted bot
- Inspect the wrapped cause (%w) for the underlying status or transport error
Example fix
// before token := "old-token" // after // verify first: // curl -H "Authorization: Bearer $TOKEN" https://webexapis.com/v1/people/me // then regenerate from developer.webex.com if it returns 401
Defensive patterns
Strategy: retry
Validate before calling
// pre-flight: curl -f -H "Authorization: Bearer $TOKEN" https://webexapis.com/v1/people/me
Try / catch
if err := p.Start(handler); err != nil {
var apiErr *webex.APIError
if errors.As(err, &apiErr) && apiErr.StatusCode == 401 { regenerateTokenAndRestart() }
return err
} Prevention
- Validate the bot token at deployment time with a /people/me smoke test
- Monitor egress to webexapis.com from the host
- Wrap Start with retry+backoff for transient network errors
- Unwrap the error chain to distinguish 401 from network failures
When it happens
Trigger: GetMe returns non-2xx (401 invalid token, 403) or a network error occurs (DNS, TLS, proxy) during Start.
Common situations: Wrong or revoked bot token; corporate proxy blocking api.webex.com; Webex outage; DNS failure in restricted network environments.
Related errors
- webex: unauthorized (401) — check bot token
- whisper API %d: %s
- get access token: %w
- discord: token is required
- qqbot: failed to get access token: %w
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/03195cbfb5d85cc4.
Report an issue: GitHub.