{"record":{"id":"2612d47be53a8477","repo":"grafana/k6","slug":"unknown-option-s","errorCode":null,"errorMessage":"unknown option: %s","messagePattern":"unknown option: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/browser/browser_context_mapping.go","lineNumber":220,"sourceCode":"\t}\n\tvar isCallable bool\n\tw.PredicateFn, isCallable = sobek.AssertFunction(optsOrPredicate)\n\tif isCallable {\n\t\treturn w, nil\n\t}\n\n\topts := optsOrPredicate.ToObject(rt)\n\tfor _, k := range opts.Keys() {\n\t\tswitch k {\n\t\tcase \"predicate\":\n\t\t\tw.PredicateFn, isCallable = sobek.AssertFunction(opts.Get(k))\n\t\t\tif !isCallable {\n\t\t\t\treturn nil, errors.New(\"predicate function is not callable\")\n\t\t\t}\n\t\tcase \"timeout\":\n\t\t\tw.Timeout = time.Duration(opts.Get(k).ToInteger()) * time.Millisecond\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"unknown option: %s\", k)\n\t\t}\n\t}\n\n\treturn w, nil\n}\n","sourceCodeStart":202,"sourceCodeEnd":226,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/browser/browser/browser_context_mapping.go#L202-L226","documentation":"Strict-key validation in parseWaitForEventOptions: the options object passed to waitForEvent contained a key other than 'predicate' or 'timeout'. Unlike many k6 APIs, unknown keys are rejected outright here rather than ignored — commonly a typo like 'timout' or an unsupported option.","triggerScenarios":"Thrown at internal/js/modules/k6/browser/browser/browser_context_mapping.go:220 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the unknown key; only 'predicate' and 'timeout' are supported","Check for typos in option names (e.g. 'timout' instead of 'timeout')","Note that timeout is specified in milliseconds, not an options string"],"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"}