{"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":365,"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\tnow := time.Now()\n\tpushIfNotDone(fs.vu.Context(), fs.logger, state.Samples, k6metrics.ConnectedSamples{\n\t\tSamples: []k6metrics.Sample{\n\t\t\t{\n\t\t\t\tTimeSeries: k6metrics.TimeSeries{Metric: metric, Tags: tags},\n\t\t\t\tValue:      value,\n\t\t\t\tTime:       now,\n\t\t\t},","sourceCodeStart":347,"sourceCodeEnd":383,"githubUrl":"https://github.com/grafana/k6/blob/94169daab29df52c1ed2ee0549657a577666b855/internal/js/modules/k6/browser/common/frame_session.go#L347-L383","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":"94169daab29df52c1ed2ee0549657a577666b855","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}