glanceapp/glance · error
parsing proxy URL: %v
Error message
parsing proxy URL: %v
What it means
Returned while building the per-widget HTTP proxy client when the proxy URL string (either the globally configured proxy URL or the field's own url) fails url.Parse with an error. This is a config-time failure: the raw error from net/url is wrapped with the 'parsing proxy URL' context. Note url.Parse is lenient — it mainly errors on control characters or unparseable escapes, so most 'invalid looking' URLs actually fail later at request time, not here.
Source
Thrown at internal/glance/config-fields.go:218
var proxyURL string
if err := node.Decode(&proxyURL); err != nil {
if err := node.Decode(alias); err != nil {
return err
}
}
if proxyURL == "" && p.URL == "" {
return nil
}
if p.URL != "" {
proxyURL = p.URL
}
parsedUrl, err := url.Parse(proxyURL)
if err != nil {
return fmt.Errorf("parsing proxy URL: %v", err)
}
var timeout = defaultClientTimeout
if p.Timeout > 0 {
timeout = time.Duration(p.Timeout)
}
p.client = &http.Client{
Timeout: timeout,
Transport: &http.Transport{
Proxy: http.ProxyURL(parsedUrl),
TLSClientConfig: &tls.Config{InsecureSkipVerify: p.AllowInsecure},
},
}
return nil
}
View on GitHub (pinned to 91324e8de7)
Solutions
- Re-enter the proxy URL as a clean single-line string: http://host:port or with credentials http://user:pass@host:port.
- Ensure no trailing spaces, quotes-with-newlines, or tabs around the value in YAML.
- Percent-encode special characters in the password (e.g. @ as %40).
- Validate with `glance config:validate` to confirm parsing succeeds.
Example fix
# before
proxy:
url: >-
http://proxy.local:8080
# after
proxy:
url: http://proxy.local:8080 Defensive patterns
Strategy: validation
Validate before calling
python3 -c "
from urllib.parse import urlparse
urlparse('http://user:pw@proxy.local:8080') # raises on malformed input in py via scheme checks; for Go parity:
import re,sys
u='http://user:pw@proxy.local:8080'
sys.exit(0 if re.match(r'^https?://[^\s]+:\d+$',u) else 1)
" Prevention
- Keep proxy URLs on a single YAML line, plain style.
- Percent-encode special characters in inline credentials.
- Prefer env vars HTTP_PROXY/HTTPS_PROXY when possible.
When it happens
Trigger: A widget/field with proxy configuration whose url contains control characters or malformed percent-encoding (e.g. 'http://%zz@host:port', or a value with embedded newlines from YAML folding) causing url.Parse to return a non-nil error.
Common situations: YAML multiline/folded scalars injecting whitespace into the URL; copy-paste artifacts with invisible control chars; malformed percent-escapes in passwords embedded in the URL.
Related errors
- no `{REQUEST-URL}` placeholder specified
- URL is required
- nested groups are not supported
- split columns inside of groups are not supported
- source is required
AI-assisted analysis of glanceapp/glance@91324e8de7 (2026-08-15).
Data as JSON: /api/errors/e48a9df69062ccb3.
Report an issue: GitHub.