{"action":"created","issue":{"url":"https://api.github.com/repos/johntitus/node-horseman/issues/73","labels_url":"https://api.github.com/repos/johntitus/node-horseman/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/johntitus/node-horseman/issues/73/comments","events_url":"https://api.github.com/repos/johntitus/node-horseman/issues/73/events","html_url":"https://github.com/johntitus/node-horseman/issues/73","id":115221578,"number":73,"title":"Phantom crashes on Ubuntu 14.04 under Horseman","user":{"login":"zero-","id":1594723,"avatar_url":"https://avatars.githubusercontent.com/u/1594723?v=3","gravatar_id":"","url":"https://api.github.com/users/zero-","html_url":"https://github.com/zero-","followers_url":"https://api.github.com/users/zero-/followers","following_url":"https://api.github.com/users/zero-/following{/other_user}","gists_url":"https://api.github.com/users/zero-/gists{/gist_id}","starred_url":"https://api.github.com/users/zero-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zero-/subscriptions","organizations_url":"https://api.github.com/users/zero-/orgs","repos_url":"https://api.github.com/users/zero-/repos","events_url":"https://api.github.com/users/zero-/events{/privacy}","received_events_url":"https://api.github.com/users/zero-/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-05T07:02:48Z","updated_at":"2015-11-05T16:05:51Z","closed_at":null,"body":"This is going to be hard one to debug but let's try.\r\n\r\nI've a super simple script like this which is simply suppose to record what redirects happen:\r\n```\r\nhorseman\r\n    .on('urlChanged', function(url){\r\n        console.log(url)\r\n        urls.push(url)\r\n    })\r\n   .open('http://main.exoclick.com/click.php?data=IHw5MTEwNjJ8fGh0dHAlM0ElMkYlMkZhZC5kbW0uY29tJTJGYWQlMkZwJTJGciUzRl9zaXRlJTNEMzQ4MiUyNl9hcnRpY2xlJTNENTM2MSUyNl9saW5rJTNEMTA1ODEyJTI2X2ltYWdlJTNEMTA1ODkwJTI2c3VpZCUzRCU3QmNvbnZlcnNpb25zX3RyYWNraW5nJTdEJTI2c2FkJTNEJTdCc2l0ZV9pZCU3RHx8fHx8MTQ0NjU1Mzc2NHxwb3JuZHJlYW1lci5jb218MTA3LjE1MC41My43NHx8MTExNTE3NTB8MTU2MzUzNHw1MDh8N3w0MXwzfDE2fDB8MHx8MzAweDI1MHwxfDB8MTAyNHg3Njh8NTYzOGE4OWQyOGFmMjMuMzk0OTM5ODc2MTY0ODk5NTZ8NDkyfGY0MGJhYjZhZThjZmEyMjQxMzAwNWRkYzEwMjU0NmIxfDB8Mnxwb3JuZHJlYW1lci5jb218T0t8YjVmODFmNzhjNzg2MTBkNmEzMmM4NDgwNDU2NjNmMDA%3D')\r\n   .waitForNextPage()\r\n   .close();\r\n```\r\nand it ends with PhantomJS crashing with the standard error `phantom stderr: PhantomJS has crashed. Please read the crash reporting guide...`. It does finish all redirects as far as I can see and then crashes.\r\n\r\nI've tried with PhantomJS 2.0 and the latest 2.0.1-dev version, same result.\r\n\r\n**WARNING**: That exoclick.com link leads to an adult site and unfortunately it's the only URL I've at hand where this happens but I know there's a lot more.\r\n\r\nCrazy thing is that this happens only with Horseman, and only with Ubuntu 14.04. With OSX it works fine which led me to believe this is PhantomJS issue until I wrote PhantomJS script that does the same thing however it works without crashing on both systems. Also CasperJS crashes with Linux.\r\n\r\nUPDATE:\r\nI just ran the test script again trying various \"fixes\" I could imagine and I started getting `Request() error evaluating exit() call: Error: connect ECONNREFUSED` after `PhantomJS has crashed...`.\r\n\r\nUPDATE 2:\r\nIt appears this is related to the redirects somehow because if I remove `waitForNextPage()` script exits normally."},"comment":{"url":"https://api.github.com/repos/johntitus/node-horseman/issues/comments/154103973","html_url":"https://github.com/johntitus/node-horseman/issues/73#issuecomment-154103973","issue_url":"https://api.github.com/repos/johntitus/node-horseman/issues/73","id":154103973,"user":{"login":"johntitus","id":590334,"avatar_url":"https://avatars.githubusercontent.com/u/590334?v=3","gravatar_id":"","url":"https://api.github.com/users/johntitus","html_url":"https://github.com/johntitus","followers_url":"https://api.github.com/users/johntitus/followers","following_url":"https://api.github.com/users/johntitus/following{/other_user}","gists_url":"https://api.github.com/users/johntitus/gists{/gist_id}","starred_url":"https://api.github.com/users/johntitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johntitus/subscriptions","organizations_url":"https://api.github.com/users/johntitus/orgs","repos_url":"https://api.github.com/users/johntitus/repos","events_url":"https://api.github.com/users/johntitus/events{/privacy}","received_events_url":"https://api.github.com/users/johntitus/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T16:05:51Z","updated_at":"2015-11-05T16:05:51Z","body":"huh. What was the useragent string you gave it, if you don't mind providing it? I'd like to try and recreate it.\r\n"}}