{"record":{"id":"5c618862245bc9e2","repo":"grafana/k6","slug":"navigating-to-q-w","errorCode":null,"errorMessage":"navigating to %q: %w","messagePattern":"navigating to %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/common/frame_manager.go","lineNumber":695,"sourceCode":"\tdefer lifecycleEvtCancel()\n\n\tfs, ok := frame.page.getFrameSession(cdp.FrameID(frame.ID()))\n\tif !ok {\n\t\tm.logger.Debugf(\"FrameManager:NavigateFrame\",\n\t\t\t\"fmid:%d fid:%v furl:%s url:%s fs:nil\",\n\t\t\tfmid, fid, furl, url)\n\n\t\t// Attaching an iframe to an existing page doesn't seem to trigger a \"Target.attachedToTarget\" event\n\t\t// from the browser even when \"Target.setAutoAttach\" is true. If this is the case fallback to the\n\n\t\t// main frame's session.\n\t\tfs = frame.page.mainFrameSession\n\t}\n\n\tvar err error\n\tnewDocumentID, err = fs.navigateFrame(frame, url, parsedOpts.Referer)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"navigating to %q: %w\", url, err)\n\t}\n\n\tif newDocumentID == \"\" {\n\t\t// It's a navigation within the same document (e.g., via anchor links or\n\t\t// the History API), so don't wait for a response nor any lifecycle\n\t\t// events.\n\t\treturn nil, nil //nolint:nilnil\n\t}\n\n\t// unblock the waiter goroutine\n\tclose(newDocIDIsReadyCh)\n\n\twrapTimeoutError := func(err error) error {\n\t\tif errors.Is(err, context.DeadlineExceeded) {\n\t\t\terr = &k6ext.UserFriendlyError{\n\t\t\t\tErr:     err,\n\t\t\t\tTimeout: parsedOpts.Timeout,\n\t\t\t}","sourceCodeStart":677,"sourceCodeEnd":713,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/browser/common/frame_manager.go#L677-L713","documentation":"Returned by FrameManager.NavigateFrame when the CDP Page.navigate call via the frame's session fails. The wrap names the target URL; the wrapped CDP error carries the cause: invalid URL, network failure, crashed target, or navigation cancelled by a subsequent navigation.","triggerScenarios":"Thrown at internal/js/modules/k6/browser/common/frame_manager.go:695 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the URL is valid and reachable","Increase navigation timeout","Check for concurrent navigations overriding this one","Ensure the browser session is alive"],"exampleFix":null,"handlingStrategy":"retry","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"}