{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/2763","repository_url":"https://api.github.com/repos/GoogleChrome/puppeteer","labels_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/2763/labels{/name}","comments_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/2763/comments","events_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/2763/events","html_url":"https://github.com/GoogleChrome/puppeteer/issues/2763","id":333341946,"node_id":"MDU6SXNzdWUzMzMzNDE5NDY=","number":2763,"title":"Inconsistence return from bad page.goto urls","user":{"login":"rbairwell","id":775269,"node_id":"MDQ6VXNlcjc3NTI2OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/775269?v=4","gravatar_id":"","url":"https://api.github.com/users/rbairwell","html_url":"https://github.com/rbairwell","followers_url":"https://api.github.com/users/rbairwell/followers","following_url":"https://api.github.com/users/rbairwell/following{/other_user}","gists_url":"https://api.github.com/users/rbairwell/gists{/gist_id}","starred_url":"https://api.github.com/users/rbairwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbairwell/subscriptions","organizations_url":"https://api.github.com/users/rbairwell/orgs","repos_url":"https://api.github.com/users/rbairwell/repos","events_url":"https://api.github.com/users/rbairwell/events{/privacy}","received_events_url":"https://api.github.com/users/rbairwell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-18T16:21:25Z","updated_at":"2018-06-20T21:21:02Z","closed_at":null,"author_association":"NONE","body":"### Steps to reproduce\r\n\r\n* Puppeteer version: v1.50\r\n* Platform / OS version: MacOS High Sierra 10.13.5\r\n* URLs (if applicable): Any invalid one\r\n* Node.js version: 10.2.1\r\n\r\nAlso reproducible on https://try-puppeteer.appspot.com/ v1.4.0\r\n\r\n```\r\nconst browser = await puppeteer.launch();\r\n\r\nconst page = await browser.newPage();\r\n\r\ntry {\r\nawait page.goto('https://invalid.tld');\r\n    console.log('1st url succeeded somehow');\r\n} catch (err) {\r\n   console.log('1st error: '+err.toString());\r\n}\r\nconsole.log('1st url at end:'+await page.url());\r\n// 2nd url : identical to first\r\ntry {\r\nawait page.goto('https://invalid.tld');\r\n  console.log('2nd url succeeded somehow');\r\n } catch (err) {\r\n   console.log('2nd error: '+err.toString());\r\n} \r\nconsole.log('2nd url at end:'+await page.url());\r\n// 3rd url: subdomain of 1st and 2nd\r\ntry {\r\nawait page.goto('https://something.invalid.tld');\r\n  console.log('3rd url succeeded somehow');\r\n } catch (err) {\r\n   console.log('3rd error: '+err.toString());\r\n} \r\nconsole.log('3rd url at end:'+await page.url());\r\n// 4th url: different tld\r\ntry {\r\nawait page.goto('https://invalid.fdsfosd');\r\n  console.log('4th url succeeded somehow');\r\n } catch (err) {\r\n   console.log('4th error: '+err.toString());\r\n} \r\nconsole.log('4th url at end:'+await page.url());\r\n\r\nawait browser.close();\r\n```\r\n\r\n**What is the expected result?**\r\n\r\nAll page.goto() attempts fail and throw an 'ERR_NAME_NOT_RESOLVED' error and the page.url() does not change from about:blank:\r\n```\r\n1st error: Error: net::ERR_NAME_NOT_RESOLVED at https://invalid.tld\r\n1st url at end:about:blank\r\n2nd error: Error: net::ERR_NAME_NOT_RESOLVED at https://invalid.tld\r\n2nd url at end:about:blank\r\n3rd error: Error: net::ERR_NAME_NOT_RESOLVED at https://something.invalid.tld\r\n3rd url at end:about:blank\r\n4th error: Error: net::ERR_NAME_NOT_RESOLVED at https://invalid.fdsfosd\r\n4th url at end:about:blank\r\n```\r\n\r\n**What happens instead?**\r\nOver 80% of the time some page.goto() do not throw exceptions and the page.url() gets changed to a chrome-error one instead.\r\n```\r\n1st error: Error: net::ERR_NAME_NOT_RESOLVED at https://invalid.tld\r\n1st url at end:about:blank\r\n2nd url succeeded somehow\r\n2nd url at end:chrome-error://chromewebdata/\r\n3rd error: Error: net::ERR_NAME_NOT_RESOLVED at https://something.invalid.tld\r\n3rd url at end:chrome-error://chromewebdata/\r\n4th url succeeded somehow\r\n4th url at end:chrome-error://chromewebdata/\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/comments/398901086","html_url":"https://github.com/GoogleChrome/puppeteer/issues/2763#issuecomment-398901086","issue_url":"https://api.github.com/repos/GoogleChrome/puppeteer/issues/2763","id":398901086,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODkwMTA4Ng==","user":{"login":"pariola","id":11618490,"node_id":"MDQ6VXNlcjExNjE4NDkw","avatar_url":"https://avatars1.githubusercontent.com/u/11618490?v=4","gravatar_id":"","url":"https://api.github.com/users/pariola","html_url":"https://github.com/pariola","followers_url":"https://api.github.com/users/pariola/followers","following_url":"https://api.github.com/users/pariola/following{/other_user}","gists_url":"https://api.github.com/users/pariola/gists{/gist_id}","starred_url":"https://api.github.com/users/pariola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pariola/subscriptions","organizations_url":"https://api.github.com/users/pariola/orgs","repos_url":"https://api.github.com/users/pariola/repos","events_url":"https://api.github.com/users/pariola/events{/privacy}","received_events_url":"https://api.github.com/users/pariola/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T21:21:02Z","updated_at":"2018-06-20T21:21:02Z","author_association":"NONE","body":"Also having the same issues, i'm creating a new page and performing some processes then closing the page after for a list of URLs but somehow some succeed and if one fails:\r\n```js\r\nawait page.goto(\"https://someurl.com\");\r\nconsole.log(page.url()); // results to 'about:blank'\r\n```\r\nI've had to revert from v`1.5.0` all the way back to v`1.3.0` with the same result."}}
{"actor":{"display_login":"pariola"}}