wavetermdev/waveterm · warning

wcloud ping endpoint not set

Error message

wcloud ping endpoint not set

What it means

makePingPostReq (used by SendDiagnosticPing) checks GetPingEndpoint() and returns this error when the dedicated ping endpoint configuration is empty. This is separate from the main wcloud endpoint, so the main endpoint may be set while the ping endpoint is missing. It guards diagnostic pings from being sent to an invalid URL.

Source

Thrown at pkg/wcloud/wcloud.go:272

	return nil
}

func SendNoTelemetryUpdate(ctx context.Context, clientId string, noTelemetryVal bool) error {
	req, err := makeAnonPostReq(ctx, NoTelemetryUrl, NoTelemetryInputType{ClientId: clientId, Value: noTelemetryVal})
	if err != nil {
		return err
	}
	_, err = doRequest(req, nil, true)
	if err != nil {
		return err
	}
	return nil
}

func makePingPostReq(ctx context.Context, apiUrl string, data interface{}) (*http.Request, error) {
	endpoint := GetPingEndpoint()
	if endpoint == "" {
		return nil, errors.New("wcloud ping endpoint not set")
	}
	var dataReader io.Reader
	if data != nil {
		byteArr, err := json.Marshal(data)
		if err != nil {
			return nil, fmt.Errorf("error marshaling json for %s request: %v", apiUrl, err)
		}
		dataReader = bytes.NewReader(byteArr)
	}
	fullUrl := endpoint + apiUrl
	req, err := http.NewRequestWithContext(ctx, "POST", fullUrl, dataReader)
	if err != nil {
		return nil, fmt.Errorf("error creating %s request: %v", apiUrl, err)
	}
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("X-PromptAPIVersion", strconv.Itoa(APIVersion))
	req.Close = true
	return req, nil

View on GitHub (pinned to a4447c1563)

Solutions

  1. Set the ping endpoint configuration value (GetPingEndpoint's backing config key) to the correct URL.
  2. Check GetPingEndpoint() == "" before calling SendDiagnosticPing and skip gracefully.
  3. Confirm the config file/env actually carries the ping endpoint key — it is independent of the main endpoint.
  4. Update deployment templates so new environments include both endpoint values.

Example fix

// before
err := wcloud.SendDiagnosticPing(diagData)
if err != nil {
    return err
}
// after
if wcloud.GetPingEndpoint() == "" {
    return nil // ping endpoint not configured; skip diagnostic ping
}
err := wcloud.SendDiagnosticPing(diagData)
if err != nil {
    return err
}
Defensive patterns

Strategy: fallback

Validate before calling

if wcloud.GetPingEndpoint() == "" {
    // ping endpoint unset: skip diagnostic ping
    return nil
}

Try / catch

err := wcloud.SendDiagnosticPing(data)
if err != nil && strings.Contains(err.Error(), "wcloud ping endpoint not set") {
    log.Printf("diagnostic ping skipped: ping endpoint not configured")
    return nil // non-fatal
}
if err != nil {
    return err
}

Prevention

When it happens

Trigger: Calling wcloud.SendDiagnosticPing when GetPingEndpoint() returns "" — e.g. the ping endpoint config key was never set, was cleared, or only the main endpoint was configured.

Common situations: Deployments that configure the main wcloud endpoint but forget the separate ping endpoint; environment-specific configs where the ping URL differs per region and is missing in some; upgrades introducing the ping endpoint to existing configs.

Understand the failure class

Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01). Data as JSON: /api/errors/9ed7a61219a5732f. Report an issue: GitHub.