{"record":{"id":"7fae7e6932237ca0","repo":"grafana/k6","slug":"unable-to-normalize-number-strings-w","errorCode":null,"errorMessage":"unable to normalize number strings: %w","messagePattern":"unable to normalize number strings: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/grpc/client.go","lineNumber":419,"sourceCode":"\tif err != nil {\n\t\treturn grpcReq, fmt.Errorf(\"invalid GRPC's client.invoke() parameters: %w\", err)\n\t}\n\n\t// k6 GRPC Invoke's default timeout is 2 minutes\n\tif p.Timeout == time.Duration(0) {\n\t\tp.Timeout = 2 * time.Minute\n\t}\n\n\tif req == nil {\n\t\treturn grpcReq, errors.New(\"request cannot be nil\")\n\t}\n\n\tobject := req.ToObject(c.vu.Runtime())\n\n\tvar stack []*sobek.Object\n\tnormalized, err := normalizeNumberStrings(object, c.vu.Runtime(), stack)\n\tif err != nil {\n\t\treturn grpcReq, fmt.Errorf(\"unable to normalize number strings: %w\", err)\n\t}\n\n\tb, err := normalized.ToObject(c.vu.Runtime()).MarshalJSON()\n\tif err != nil {\n\t\treturn grpcReq, fmt.Errorf(\"unable to serialise request object: %w\", err)\n\t}\n\n\tp.SetSystemTags(state, c.addr, method)\n\n\treturn grpcext.InvokeRequest{\n\t\tMethod:                 method,\n\t\tMethodDescriptor:       methodDesc,\n\t\tTimeout:                p.Timeout,\n\t\tDiscardResponseMessage: p.DiscardResponseMessage,\n\t\tMessage:                b,\n\t\tTagsAndMeta:            &p.TagsAndMeta,\n\t\tMetadata:               p.Metadata,\n\t}, nil","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/grafana/k6/blob/8d06114777191d21ef885d05c5f8aa9e1ed838ae/internal/js/modules/k6/grpc/client.go#L401-L437","documentation":"Raised in buildInvokeRequest when normalizeNumberStrings fails while walking the request object to convert number-like strings (int64/uint64 JSON safety) before marshalling. Usually a cyclic or otherwise non-normalizable object structure.","triggerScenarios":"Thrown at internal/js/modules/k6/grpc/client.go:388 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for the failing property","Avoid cyclic references and exotic objects in the request payload","Represent large integers as strings consistently so normalization is unnecessary"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8d06114777191d21ef885d05c5f8aa9e1ed838ae","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}