{"record":{"id":"063a39b9d71a5749","repo":"grafana/k6","slug":"execution-context-q-not-found","errorCode":null,"errorMessage":"execution context %q not found","messagePattern":"execution context %q not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/common/frame.go","lineNumber":2260,"sourceCode":"\tnavOpts := &FrameWaitForNavigationOptions{\n\t\tURL:       urlPattern,\n\t\tTimeout:   opts.Timeout,\n\t\tWaitUntil: opts.WaitUntil,\n\t}\n\t_, err = f.WaitForNavigation(navOpts, rm)\n\n\treturn err\n}\n\nfunc (f *Frame) adoptBackendNodeID(world executionWorld, id cdp.BackendNodeID) (*ElementHandle, error) {\n\tf.log.Debugf(\"Frame:adoptBackendNodeID\", \"fid:%s furl:%q world:%s id:%d\", f.ID(), f.URL(), world, id)\n\n\tf.executionContextMu.RLock()\n\tdefer f.executionContextMu.RUnlock()\n\n\tec := f.executionContexts[world]\n\tif ec == nil {\n\t\treturn nil, fmt.Errorf(\"execution context %q not found\", world)\n\t}\n\treturn ec.adoptBackendNodeID(id)\n}\n\nfunc (f *Frame) evaluate(\n\tapiCtx context.Context,\n\tworld executionWorld,\n\topts evalOptions, pageFunc string, args ...any,\n) (any, error) {\n\tf.log.Debugf(\"Frame:evaluate\", \"fid:%s furl:%q world:%s opts:%s\", f.ID(), f.URL(), world, opts)\n\n\tf.executionContextMu.RLock()\n\tdefer f.executionContextMu.RUnlock()\n\n\tec := f.executionContexts[world]\n\tif ec == nil {\n\t\treturn nil, fmt.Errorf(\"execution context %q not found\", world)\n\t}","sourceCodeStart":2242,"sourceCodeEnd":2278,"githubUrl":"https://github.com/grafana/k6/blob/3fcf5388d78cb382f0c0d42ec556a06bfd1b8dee/internal/js/modules/k6/browser/common/frame.go#L2242-L2278","documentation":"Returned by Frame.adoptBackendNodeID when the requested execution world's context is absent from the frame's context map at adoption time. A navigation/teardown race: the backend node cannot be adopted into a context that does not exist.","triggerScenarios":"Thrown at internal/js/modules/k6/browser/common/frame.go:2252 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the adoption after the frame loads","Wait for the relevant lifecycle event before adopting","Avoid concurrent navigation during adoption"],"exampleFix":null,"handlingStrategy":"retry","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"}