{"record":{"id":"0af880d355edcbc6","repo":"grafana/k6","slug":"proxy-server-must-be-set","errorCode":null,"errorMessage":"proxy.server must be set","messagePattern":"proxy\\.server must be set","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/common/browser_context_options.go","lineNumber":68,"sourceCode":"type Geolocation struct {\n\tLatitude  float64 `js:\"latitude\"`\n\tLongitude float64 `js:\"longitude\"`\n\tAccuracy  float64 `js:\"accuracy\"`\n}\n\n// ProxyOptions represents proxy configuration for a browser context.\ntype ProxyOptions struct {\n\tServer string `js:\"server\"`\n\tBypass string `js:\"bypass\"`\n}\n\n// Validate validates the [ProxyOptions].\nfunc (p *ProxyOptions) Validate() error {\n\tif p == nil {\n\t\treturn nil\n\t}\n\tif strings.TrimSpace(p.Server) == \"\" {\n\t\treturn fmt.Errorf(\"proxy.server must be set\")\n\t}\n\treturn nil\n}\n\n// Validate validates the [Geolocation].\nfunc (g *Geolocation) Validate() error {\n\tif g.Longitude < -180 || g.Longitude > 180 {\n\t\treturn fmt.Errorf(`invalid longitude \"%.2f\": precondition -180 <= LONGITUDE <= 180 failed`, g.Longitude)\n\t}\n\tif g.Latitude < -90 || g.Latitude > 90 {\n\t\treturn fmt.Errorf(`invalid latitude \"%.2f\": precondition -90 <= LATITUDE <= 90 failed`, g.Latitude)\n\t}\n\tif g.Accuracy < 0 {\n\t\treturn fmt.Errorf(`invalid accuracy \"%.2f\": precondition 0 <= ACCURACY failed`, g.Accuracy)\n\t}\n\treturn nil\n}\n","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/browser/common/browser_context_options.go#L50-L86","documentation":"browserContext was created with a proxy options object whose server field is empty/whitespace. ProxyOptions.Validate requires server to be set whenever a proxy block is present; the faulting input is the {proxy:{...}} part of newContext options.","triggerScenarios":"Thrown at internal/js/modules/k6/browser/common/browser_context_options.go:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set a server, e.g. proxy: {server: 'http://myproxy:8080'}","Remove the proxy block if no proxy is needed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}