t8y2/dbx · error
invalid Hive browserResponseTimeout %q: expected positive se
Error message
invalid Hive browserResponseTimeout %q: expected positive seconds
What it means
browserResponseTimeout is read with strconv.ParseInt and interpreted as seconds; it must parse and be strictly positive, or the driver rejects the parameter with this error. The parsed value is converted to a time.Duration in seconds for browser-based auth callback waiting.
Source
Thrown at agents/drivers/hive-go/config.go:577
config.RequestTracking = parameterBool(values, "requesttrack")
if value, exists := firstParameter(values, "cookieauth"); exists {
config.CookieAuth = !strings.EqualFold(value, "false")
}
config.CookieName = firstNonEmpty(parameter(values, "cookiename"), defaultCookieName)
config.JWT = firstNonEmpty(parameter(values, "jwt"), os.Getenv("JWT"))
config.BrowserToken = firstNonEmpty(parameter(values, "browsertoken"), parameter(values, "token"))
config.BrowserClientID = parameter(values, "browserclientidentifier")
if value := parameter(values, "browserresponseport"); value != "" {
parsed, err := strconv.Atoi(value)
if err != nil || parsed < 0 || parsed > 65535 {
return fmt.Errorf("invalid Hive browserResponsePort %q: expected 0-65535", value)
}
config.BrowserResponsePort = parsed
}
if value := parameter(values, "browserresponsetimeout"); value != "" {
parsed, err := strconv.ParseInt(value, 10, 64)
if err != nil || parsed <= 0 {
return fmt.Errorf("invalid Hive browserResponseTimeout %q: expected positive seconds", value)
}
config.BrowserResponseTimeout = time.Duration(parsed) * time.Second
}
config.BrowserDisableSSLCheck = parameterBool(values, "browserdisablesslcheck")
if strings.EqualFold(config.Auth, "JWT") && config.JWT == "" {
return errors.New("Hive JWT authentication requires jwt or the JWT environment variable")
}
if value := parameter(values, "fetchsize"); value != "" {
parsed, err := strconv.Atoi(value)
if err != nil || parsed <= 0 {
return fmt.Errorf("invalid Hive fetchSize %q: expected a positive integer", value)
}
config.FetchSize = parsed
}
if value := parameter(values, "sockettimeout"); value != "" {
parsed, err := strconv.ParseInt(value, 10, 64)
if err != nil {
return fmt.Errorf("invalid Hive socketTimeout %q: expected seconds", value)View on GitHub (pinned to c0390bff16)
Solutions
- Set browserResponseTimeout to a positive integer number of seconds (e.g. 90)
- Remove the parameter to use the driver default
- Convert duration strings to plain seconds before putting them in the DSN
- Check the JWT/browser auth docs for the supported range
Example fix
// before dsn := "...;browserResponseTimeout=2m" // after dsn := "...;browserResponseTimeout=120"
Defensive patterns
Strategy: validation
Validate before calling
if v := params.Get("browserResponseTimeout"); v != "" {
n, err := strconv.ParseInt(v, 10, 64)
if err != nil || n <= 0 {
return fmt.Errorf("browserResponseTimeout %q must be positive seconds", v)
}
} Try / catch
if err := applyParams(values); err != nil {
if strings.Contains(err.Error(), "browserResponseTimeout") {
return fmt.Errorf("pass plain seconds, not a duration string: %w", err)
}
return err
} Prevention
- Express timeouts as bare seconds ('120', never '2m')
- Use a positive value; 0 and negatives are rejected
- Convert time.Duration values with int(d.Seconds()) when building DSNs from code
When it happens
Trigger: Connection string with browserResponseTimeout=0, a negative value, or a non-numeric value like '30s' or 'none' — raw seconds are expected, not a duration string.
Common situations: Users writing Go-style durations ('90s', '2m') into the DSN; setting 0 expecting 'unlimited'; locale-formatted numbers ('1,5').
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- invalid Hive browserResponseTimeout %q: expected positive se
- invalid Hive endpoint %q
- invalid Hive browserResponsePort %q: expected 0-65535
- invalid Hive fetchSize %q: expected a positive integer
- invalid Hive socketTimeout %q: expected seconds
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/b3845f794a1959c0.
Report an issue: GitHub.