{"record":{"id":"46888041d91bbf93","repo":"grafana/k6","slug":"parsing-fill-options-w","errorCode":null,"errorMessage":"parsing fill options: %w","messagePattern":"parsing fill options: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"info","filePath":"internal/js/modules/k6/browser/browser/frame_mapping.go","lineNumber":98,"sourceCode":"\t\t},\n\t\t\"evaluateHandle\": func(pageFunc sobek.Value, gargs ...sobek.Value) (*sobek.Promise, error) {\n\t\t\tif sobekEmptyString(pageFunc) {\n\t\t\t\treturn nil, fmt.Errorf(\"evaluateHandle requires a page function\")\n\t\t\t}\n\t\t\tfuncString := pageFunc.String()\n\t\t\tgopts := exportArgs(gargs)\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\tjsh, err := f.EvaluateHandle(funcString, gopts...)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err //nolint:wrapcheck\n\t\t\t\t}\n\t\t\t\treturn mapJSHandle(vu, jsh), nil\n\t\t\t}), nil\n\t\t},\n\t\t\"fill\": func(selector, value string, opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts := common.NewFrameFillOptions(f.Timeout())\n\t\t\tif err := popts.Parse(vu.Context(), opts); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing fill options: %w\", err)\n\t\t\t}\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn nil, f.Fill(selector, value, popts) //nolint:wrapcheck\n\t\t\t}), nil\n\t\t},\n\t\t\"focus\": func(selector string, opts sobek.Value) (*sobek.Promise, error) {\n\t\t\tpopts := common.NewFrameBaseOptions(f.Timeout())\n\t\t\tif err := popts.Parse(vu.Context(), opts); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing focus options: %w\", err)\n\t\t\t}\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\treturn nil, f.Focus(selector, popts) //nolint:wrapcheck\n\t\t\t}), nil\n\t\t},\n\t\t\"frameElement\": func() *sobek.Promise {\n\t\t\treturn promise(vu, func() (any, error) {\n\t\t\t\tfe, err := f.FrameElement()\n\t\t\t\tif err != nil {","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/js/modules/k6/browser/browser/frame_mapping.go#L80-L116","documentation":"Options passed to frame.fill(selector, value, opts) failed to parse (frame_mapping.go:98). FrameFillOptions delegates to ElementHandleBaseOptions.Parse, which only coerces 'force', 'noWaitAfter', and 'timeout' and always returns nil in this codebase - so this branch is defensive and effectively unreachable in the current version.","triggerScenarios":"No fill option ({ force, noWaitAfter, timeout, strict }) can trigger it today; values are coerced, not validated. It would only fire if a k6 version made these parsers type-sensitive.","commonSituations":"Rarely seen; appears mainly against custom k6 builds or after upstream changes to the option parsers.","solutions":["Pass a plain options object with supported keys: { timeout: 5000, force: true }","Reproduce on the latest stable k6 and report an issue with the script if it persists","Pin a known-good k6 version while investigating"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const safeOpts = { force: !!opts?.force, noWaitAfter: !!opts?.noWaitAfter, timeout: Number(opts?.timeout) || undefined, strict: !!opts?.strict };","typeGuard":null,"tryCatchPattern":"try {\n  await frame.fill(sel, value, safeOpts);\n} catch (e) {\n  console.error(`fill(${sel}) failed: ${e.message}`);\n}","preventionTips":["Keep fill options to force/noWaitAfter/timeout/strict","If this fires on stock k6, file an issue - the underlying parser cannot fail in the current version"],"tags":["k6","browser","frame","options-parsing","fill"],"backgroundTag":null,"analyzedSha":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}