glanceapp/glance · error

no loid cookie found

Error message

no loid cookie found

What it means

Thrown by fetchRedditLoidCookie (internal/glance/widget-reddit.go:455) when the challenge solution was accepted (HTTP 200) but the response's Set-Cookie headers contain no 'loid' cookie. The entire challenge dance exists to obtain the loid cookie used for subsequent Reddit API calls; a 200 without it means Reddit changed which cookie it sets (renamed, moved to a different endpoint, or set only via JS) or the response came from an edge/redirect that did not set it.

Source

Thrown at internal/glance/widget-reddit.go:455

	setBrowserUserAgentHeader(request)

	response, err = redditHTTPClient.Do(request)
	if err != nil {
		return "", err
	}
	defer response.Body.Close()

	if response.StatusCode != http.StatusOK {
		return "", fmt.Errorf("unexpected status code %d when submitting challenge solution", response.StatusCode)
	}

	for _, cookie := range response.Cookies() {
		if cookie.Name == "loid" {
			return cookie.Value, nil
		}
	}

	return "", fmt.Errorf("no loid cookie found")
}

View on GitHub (pinned to 91324e8de7)

Solutions

  1. Update Glance to the latest version where cookie-name changes are patched
  2. Check the widget's cached loid cookie fallback (used when present and <6h old)
  3. Test outside proxies/middleboxes that might strip Set-Cookie headers
  4. Report upstream: capture the Set-Cookie headers Reddit now returns (do not share your own cookie values)
Defensive patterns

Strategy: fallback

Try / catch

if err != nil && strings.Contains(err.Error(), "no loid cookie found") {
    // challenge solved but cookie scheme changed; fall back to cached cookie or degrade widget
}

Prevention

When it happens

Trigger: Challenge solution accepted but Set-Cookie headers only include reddit_session/other cookies; Reddit renamed or stopped setting 'loid' on this endpoint; an intermediary (proxy with cookie stripping, HTTP/2 edge) removed Set-Cookie from the response.

Common situations: Reddit cookie-scheme changes after a Glance release (this error and 120-122 tend to appear together in waves), corporate proxies stripping cookies, Reddit setting loid only on a follow-up request.

Related errors


AI-assisted analysis of glanceapp/glance@91324e8de7 (2026-08-15). Data as JSON: /api/errors/b64e3a3b72af5eef. Report an issue: GitHub.