{"record":{"id":"cf9c2190d5342040","repo":"grafana/k6","slug":"parsing-geo-location-w","errorCode":null,"errorMessage":"parsing geo location: %w","messagePattern":"parsing geo location: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/browser/browser_context_mapping.go","lineNumber":97,"sourceCode":"\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn bc.Cookies(urls...) //nolint:wrapcheck\n\t\t\t})\n\t\t},\n\t\t\"grantPermissions\": func(permissions []string, opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts, err := exportTo[common.GrantPermissionsOptions](vu.Runtime(), opts)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing grant permission options: %w\", err)\n\t\t\t}\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn nil, bc.GrantPermissions(permissions, popts)\n\t\t\t}), nil\n\t\t},\n\t\t\"setDefaultNavigationTimeout\": bc.SetDefaultNavigationTimeout,\n\t\t\"setDefaultTimeout\":           bc.SetDefaultTimeout,\n\t\t\"setGeolocation\": func(geolocation sobek.Value) (*sobek.Promise, error) {\n\t\t\tgl, err := exportTo[common.Geolocation](vu.Runtime(), geolocation)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing geo location: %w\", err)\n\t\t\t}\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn nil, bc.SetGeolocation(&gl)\n\t\t\t}), nil\n\t\t},\n\t\t\"setHTTPCredentials\": func(httpCredentials sobek.Value) (*sobek.Promise, error) {\n\t\t\tcreds, err := exportTo[common.Credentials](rt, httpCredentials)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing HTTP credentials: %w\", err)\n\t\t\t}\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn nil, bc.SetHTTPCredentials(creds) //nolint:staticcheck\n\t\t\t}), nil\n\t\t},\n\t\t\"setOffline\": func(offline bool) *sobek.Promise {\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn nil, bc.SetOffline(offline) //nolint:wrapcheck\n\t\t\t})","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/browser/browser/browser_context_mapping.go#L79-L115","documentation":"Generic parse wrapper for browserContext.setGeolocation: the geolocation argument failed to decode into common.Geolocation (fields latitude/longitude/accuracy). The wrapped error names the offending field — typically a wrong type or missing required value.","triggerScenarios":"Thrown at internal/js/modules/k6/browser/browser/browser_context_mapping.go:97 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a plain object like { latitude: 50, longitude: 15 } with numeric values","Include both latitude and longitude","Check the wrapped error for the exact failing field"],"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"}