{"record":{"id":"b3845f794a1959c0","repo":"t8y2/dbx","slug":"invalid-hive-browserresponsetimeout-q-expected-p-b3845f","errorCode":null,"errorMessage":"invalid Hive browserResponseTimeout %q: expected positive seconds","messagePattern":"invalid Hive browserResponseTimeout %q: expected positive seconds","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/config.go","lineNumber":577,"sourceCode":"\tconfig.RequestTracking = parameterBool(values, \"requesttrack\")\n\tif value, exists := firstParameter(values, \"cookieauth\"); exists {\n\t\tconfig.CookieAuth = !strings.EqualFold(value, \"false\")\n\t}\n\tconfig.CookieName = firstNonEmpty(parameter(values, \"cookiename\"), defaultCookieName)\n\tconfig.JWT = firstNonEmpty(parameter(values, \"jwt\"), os.Getenv(\"JWT\"))\n\tconfig.BrowserToken = firstNonEmpty(parameter(values, \"browsertoken\"), parameter(values, \"token\"))\n\tconfig.BrowserClientID = parameter(values, \"browserclientidentifier\")\n\tif value := parameter(values, \"browserresponseport\"); value != \"\" {\n\t\tparsed, err := strconv.Atoi(value)\n\t\tif err != nil || parsed < 0 || parsed > 65535 {\n\t\t\treturn fmt.Errorf(\"invalid Hive browserResponsePort %q: expected 0-65535\", value)\n\t\t}\n\t\tconfig.BrowserResponsePort = parsed\n\t}\n\tif value := parameter(values, \"browserresponsetimeout\"); value != \"\" {\n\t\tparsed, err := strconv.ParseInt(value, 10, 64)\n\t\tif err != nil || parsed <= 0 {\n\t\t\treturn fmt.Errorf(\"invalid Hive browserResponseTimeout %q: expected positive seconds\", value)\n\t\t}\n\t\tconfig.BrowserResponseTimeout = time.Duration(parsed) * time.Second\n\t}\n\tconfig.BrowserDisableSSLCheck = parameterBool(values, \"browserdisablesslcheck\")\n\tif strings.EqualFold(config.Auth, \"JWT\") && config.JWT == \"\" {\n\t\treturn errors.New(\"Hive JWT authentication requires jwt or the JWT environment variable\")\n\t}\n\tif value := parameter(values, \"fetchsize\"); value != \"\" {\n\t\tparsed, err := strconv.Atoi(value)\n\t\tif err != nil || parsed <= 0 {\n\t\t\treturn fmt.Errorf(\"invalid Hive fetchSize %q: expected a positive integer\", value)\n\t\t}\n\t\tconfig.FetchSize = parsed\n\t}\n\tif value := parameter(values, \"sockettimeout\"); value != \"\" {\n\t\tparsed, err := strconv.ParseInt(value, 10, 64)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid Hive socketTimeout %q: expected seconds\", value)","sourceCodeStart":559,"sourceCodeEnd":595,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/config.go#L559-L595","documentation":"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.","triggerScenarios":"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.","commonSituations":"Users writing Go-style durations ('90s', '2m') into the DSN; setting 0 expecting 'unlimited'; locale-formatted numbers ('1,5').","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"],"exampleFix":"// before\ndsn := \"...;browserResponseTimeout=2m\"\n// after\ndsn := \"...;browserResponseTimeout=120\"","handlingStrategy":"validation","validationCode":"if v := params.Get(\"browserResponseTimeout\"); v != \"\" {\n    n, err := strconv.ParseInt(v, 10, 64)\n    if err != nil || n <= 0 {\n        return fmt.Errorf(\"browserResponseTimeout %q must be positive seconds\", v)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := applyParams(values); err != nil {\n    if strings.Contains(err.Error(), \"browserResponseTimeout\") {\n        return fmt.Errorf(\"pass plain seconds, not a duration string: %w\", err)\n    }\n    return err\n}","preventionTips":["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"],"tags":["hive","config","timeout","validation"],"backgroundTag":"invalid-timeout","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}