{"record":{"id":"7c1f170fe7ce830e","repo":"grafana/k6","slug":"value-couldn-t-be-parsed-q","errorCode":null,"errorMessage":"value couldn't be parsed %q","messagePattern":"value couldn't be parsed %q","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/common/frame_session.go","lineNumber":396,"sourceCode":"\t\tDelta          json.Number\n\t\tNumEntries     json.Number\n\t\tNavigationType string\n\t\tURL            string\n\t\tSpanID         string\n\t}{}\n\n\tif err := json.Unmarshal([]byte(object), &wv); err != nil {\n\t\treturn fmt.Errorf(\"json couldn't be parsed: %w\", err)\n\t}\n\n\tmetric, ok := fs.k6Metrics.WebVitals[wv.Name]\n\tif !ok {\n\t\treturn fmt.Errorf(\"metric not registered %q\", wv.Name)\n\t}\n\n\tvalue, err := wv.Value.Float64()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"value couldn't be parsed %q\", wv.Value)\n\t}\n\n\tstate := fs.vu.State()\n\ttags := state.Tags.GetCurrentValues().Tags\n\tif state.Options.SystemTags.Has(k6metrics.TagURL) {\n\t\ttags = handleURLTag(fs.page, wv.URL, http.MethodGet, tags)\n\t}\n\n\ttags = tags.With(\"rating\", wv.Rating)\n\n\t// Buffer the latest value for this page and metric instead of emitting it\n\t// immediately. The buffer is flushed once per page so each page contributes\n\t// a single sample per metric.\n\tfs.bufferedWebVitalsMu.Lock()\n\tfs.bufferedWebVitals[webVitalKey{url: wv.URL, name: wv.Name}] = webVitalSample{\n\t\tsample: k6metrics.Sample{\n\t\t\tTimeSeries: k6metrics.TimeSeries{Metric: metric, Tags: tags},\n\t\t\tValue:      value,","sourceCodeStart":378,"sourceCodeEnd":414,"githubUrl":"https://github.com/grafana/k6/blob/3fcf5388d78cb382f0c0d42ec556a06bfd1b8dee/internal/js/modules/k6/browser/common/frame_session.go#L378-L414","documentation":"After successfully matching a web-vitals metric, its Value field (a json.Number) could not be converted with Float64(). The value in the JSON payload is not a valid number — an internal data-quality issue in the payload sent from the page.","triggerScenarios":"Thrown at internal/js/modules/k6/browser/common/frame_session.go:365 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Update k6 in case of a web-vitals script bug","Report to grafana/k6 with the offending value shown in the error","Retry the run; transient bad payloads are rare"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3fcf5388d78cb382f0c0d42ec556a06bfd1b8dee","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}