{"record":{"id":"4abf87a13b1b23ff","repo":"t8y2/dbx","slug":"invalid-hive-browserresponseport-q-expected-0-65-4abf87","errorCode":null,"errorMessage":"invalid Hive browserResponsePort %q: expected 0-65535","messagePattern":"invalid Hive browserResponsePort %q: expected 0-65535","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/config.go","lineNumber":570,"sourceCode":"\tif hasParameter(values, \"ssl\") {\n\t\tconfig.TLSExplicit = true\n\t}\n\tconfig.ZooKeeperAuthScheme = parameter(values, \"zookeeperauthscheme\")\n\tconfig.ZooKeeperAuth = parameter(values, \"zookeeperauth\")\n\tconfig.HTTPHeaders = prefixedParameters(values, \"http.header.\")\n\tconfig.HTTPCookies = prefixedParameters(values, \"http.cookie.\")\n\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)","sourceCodeStart":552,"sourceCodeEnd":588,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/config.go#L552-L588","documentation":"The browserresponseport connection parameter is parsed as an integer and must be within 0-65535. If strconv.Atoi fails or the value is out of range, the driver returns this error while applying connection parameters. Port 0 is allowed (disabled/auto semantics).","triggerScenarios":"Connection string containing browserResponsePort=abc, browserResponsePort=99999, or browserResponsePort=-1.","commonSituations":"Copy-pasting a callback URL where only the path was intended; typos like 655536; leaving a placeholder 'browserResponsePort=PORT' in a templated DSN.","solutions":["Set browserResponsePort to an integer between 0 and 65535","Remove the parameter entirely if a browser response port is not needed","Check the wrapped DSN for stray characters around the number","Use 0 explicitly to disable the browser response listener"],"exampleFix":"// before\ndsn := \"...;browserResponsePort=NONE\"\n// after\ndsn := \"...;browserResponsePort=0\"","handlingStrategy":"validation","validationCode":"if v := params.Get(\"browserResponsePort\"); v != \"\" {\n    p, err := strconv.Atoi(v)\n    if err != nil || p < 0 || p > 65535 {\n        return fmt.Errorf(\"browserResponsePort %q must be 0-65535\", v)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := applyParams(values); err != nil {\n    if strings.Contains(err.Error(), \"browserResponsePort\") {\n        return fmt.Errorf(\"fix browserResponsePort: %w\", err)\n    }\n    return err\n}","preventionTips":["Only pass decimal integers 0-65535 for browserResponsePort","Use 0 to disable the browser response listener","Keep DSN params free of units or placeholders"],"tags":["hive","config","port","validation"],"backgroundTag":"invalid-port","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}