{"record":{"id":"16c4c1a3d2b8e4bf","repo":"projectdiscovery/katana","slug":"could-not-get-page-info-16c4c1","errorCode":null,"errorMessage":"could not get page info","messagePattern":"could not get page info","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/engine/headless/crawler/state.go","lineNumber":70,"sourceCode":"func newPageState(page *browser.BrowserPage, action *types.Action) (*types.PageState, error) {\n\tpageInfo, err := page.Info()\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"could not get page info\")\n\t}\n\tif pageInfo.URL == \"\" || pageInfo.URL == \"about:blank\" {\n\t\treturn nil, ErrEmptyPage\n\t}\n\n\touterHTML, err := page.HTML()\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"could not get html content\")\n\t}\n\n\tstate := &types.PageState{\n\t\tURL:              pageInfo.URL,\n\t\tDOM:              outerHTML,\n\t\tNavigationAction: action,\n\t\tTitle:            pageInfo.Title,\n\t}","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/projectdiscovery/katana/blob/e3e742739c3746f085943ce918fb4e2b8daf6fe6/pkg/engine/headless/crawler/state.go#L52-L88","documentation":"newPageState fails when browser.Page.Info() returns an error, meaning the browser could not report the current page's URL/title (e.g. page crashed, closed, navigation in progress, or CDP call failed). The wrap annotates the underlying browser error before it propagates to getPageHash/crawlFn.","triggerScenarios":"Thrown at pkg/engine/headless/crawler/state.go:70 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped cause: if the browser page was closed or crashed, recreate the page before retrying","Log the underlying error to distinguish transient navigation races from a dead browser session","Retry page.Info() once if the failure occurred during an in-flight navigation","Skip this page state and let the crawler continue with other queued actions"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e3e742739c3746f085943ce918fb4e2b8daf6fe6","analyzedAt":"2026-09-03T14:55:13.248Z","contentChangedAt":"2026-09-03T14:55:13.248Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}