{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1002","repository_url":"https://api.github.com/repos/GoogleChrome/lighthouse","labels_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1002/labels{/name}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1002/comments","events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1002/events","html_url":"https://github.com/GoogleChrome/lighthouse/issues/1002","id":190885397,"number":1002,"title":"Chrome doesn't close during 'invalid url' error","user":{"login":"ramlmn","id":12368291,"avatar_url":"https://avatars.githubusercontent.com/u/12368291?v=3","gravatar_id":"","url":"https://api.github.com/users/ramlmn","html_url":"https://github.com/ramlmn","followers_url":"https://api.github.com/users/ramlmn/followers","following_url":"https://api.github.com/users/ramlmn/following{/other_user}","gists_url":"https://api.github.com/users/ramlmn/gists{/gist_id}","starred_url":"https://api.github.com/users/ramlmn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramlmn/subscriptions","organizations_url":"https://api.github.com/users/ramlmn/orgs","repos_url":"https://api.github.com/users/ramlmn/repos","events_url":"https://api.github.com/users/ramlmn/events{/privacy}","received_events_url":"https://api.github.com/users/ramlmn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-22T01:41:30Z","updated_at":"2016-12-16T22:44:06Z","closed_at":"2016-12-16T22:44:06Z","body":"Lighthouse doesn't kill any instances of chrome when an error or exception occurs during the audit or at the start of the audit like when an error is used to reject the Promise(`lighthouse-core/runner.js:46`) when the url passed is invalid(like: `file:///D:/demo.html`) lighthouse exits without closing chrome instance:\r\n```\r\n$ lighthouse file:///D:/demo.html\r\n  Lighthouse CLI Launching Chrome... +0ms\r\n  ChromeLauncher Waiting for browser. +31ms\r\n  ChromeLauncher Waiting for browser... +0ms\r\n  ChromeLauncher Waiting for browser...✓ +513ms\r\nRuntime error encountered: Error: The url provided should have a proper protocol and hostname.\r\n    at Function.run (C:\\Users\\ramlmn\\AppData\\Roaming\\npm\\node_modules\\lighthouse\\lighthouse-core\\runner.js:45:19)\r\n    at Promise (C:\\Users\\ramlmn\\AppData\\Roaming\\npm\\node_modules\\lighthouse\\lighthouse-core\\index.js:64:20)\r\n    at module.exports (C:\\Users\\ramlmn\\AppData\\Roaming\\npm\\node_modules\\lighthouse\\lighthouse-core\\index.js:47:10)\r\n    at lighthouseRun (C:\\Users\\ramlmn\\AppData\\Roaming\\npm\\node_modules\\lighthouse\\lighthouse-cli\\bin.js:191:12)\r\n    at launcher.isDebuggerReady.catch.then (C:\\Users\\ramlmn\\AppData\\Roaming\\npm\\node_modules\\lighthouse\\lighthouse-cli\\bin.js:180:25)\r\nError: The url provided should have a proper protocol and hostname.\r\n    at Function.run (C:\\Users\\ramlmn\\AppData\\Roaming\\npm\\node_modules\\lighthouse\\lighthouse-core\\runner.js:45:19)\r\n    at Promise (C:\\Users\\ramlmn\\AppData\\Roaming\\npm\\node_modules\\lighthouse\\lighthouse-core\\index.js:64:20)\r\n    at module.exports (C:\\Users\\ramlmn\\AppData\\Roaming\\npm\\node_modules\\lighthouse\\lighthouse-core\\index.js:47:10)\r\n    at lighthouseRun (C:\\Users\\ramlmn\\AppData\\Roaming\\npm\\node_modules\\lighthouse\\lighthouse-cli\\bin.js:191:12)\r\n    at launcher.isDebuggerReady.catch.then (C:\\Users\\ramlmn\\AppData\\Roaming\\npm\\node_modules\\lighthouse\\lighthouse-cli\\bin.js:180:25)\r\n```\r\n\r\nI don't think that this is a suggested behaviour. It can be fixed by catching the Promise rejection in `lighthouse-cli/bin.js:181` by adding:\r\n``` js\r\n.catch((error) => {\r\n  console.error(error);\r\n  launcher.kill();\r\n});\r\n```\r\n\r\nIs this behaviour is acceptable then you can close this issue or else can I make a PR for this please?"},"comment":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/comments/267714176","html_url":"https://github.com/GoogleChrome/lighthouse/issues/1002#issuecomment-267714176","issue_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1002","id":267714176,"user":{"login":"brendankenny","id":316891,"avatar_url":"https://avatars.githubusercontent.com/u/316891?v=3","gravatar_id":"","url":"https://api.github.com/users/brendankenny","html_url":"https://github.com/brendankenny","followers_url":"https://api.github.com/users/brendankenny/followers","following_url":"https://api.github.com/users/brendankenny/following{/other_user}","gists_url":"https://api.github.com/users/brendankenny/gists{/gist_id}","starred_url":"https://api.github.com/users/brendankenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendankenny/subscriptions","organizations_url":"https://api.github.com/users/brendankenny/orgs","repos_url":"https://api.github.com/users/brendankenny/repos","events_url":"https://api.github.com/users/brendankenny/events{/privacy}","received_events_url":"https://api.github.com/users/brendankenny/received_events","type":"User","site_admin":false},"created_at":"2016-12-16T22:44:06Z","updated_at":"2016-12-16T22:44:06Z","body":"fixed in #1141 "}}
{"actor":{"display_login":"brendankenny"}}