{"action":"created","issue":{"url":"https://api.github.com/repos/guard/guard-jasmine/issues/186","labels_url":"https://api.github.com/repos/guard/guard-jasmine/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/guard/guard-jasmine/issues/186/comments","events_url":"https://api.github.com/repos/guard/guard-jasmine/issues/186/events","html_url":"https://github.com/guard/guard-jasmine/issues/186","id":70481512,"number":186,"title":"Error \"Cannot decode JSON from PhantomJS runner\" for phantomjs v1.9.8 (2)","user":{"login":"dima4p","id":25119,"avatar_url":"https://avatars.githubusercontent.com/u/25119?v=3","gravatar_id":"","url":"https://api.github.com/users/dima4p","html_url":"https://github.com/dima4p","followers_url":"https://api.github.com/users/dima4p/followers","following_url":"https://api.github.com/users/dima4p/following{/other_user}","gists_url":"https://api.github.com/users/dima4p/gists{/gist_id}","starred_url":"https://api.github.com/users/dima4p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dima4p/subscriptions","organizations_url":"https://api.github.com/users/dima4p/orgs","repos_url":"https://api.github.com/users/dima4p/repos","events_url":"https://api.github.com/users/dima4p/events{/privacy}","received_events_url":"https://api.github.com/users/dima4p/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-23T18:34:01Z","updated_at":"2015-04-29T00:52:58Z","closed_at":null,"body":"Hello, I get this message and the reason is that phantomj returns multi-line result like this\r\n```\r\n$ ~/.phantomjs/1.9.8/x86_64-linux/bin/phantomjs /usr/local/rvm/gems/ruby-2.2.1@pe_voip_server/gems/guard-jasmine-2.0.5/lib/guard/jasmine/phantomjs/guard-jasmine.js \"http://localhost:8888/?spec=Vox\" 60000\r\n{\"error\":\"Javascript error encountered on Jasmine test page: ReferenceError: Can't find variable: module\",\"trace\":[{\"file\":\"http://localhost:8888/__spec__/helpers/vox_mock.js\",\"line\":14,\"function\":\"\"}]}\r\n{\"error\":\"Javascript error encountered on Jasmine test page: ReferenceError: Can't find variable: require\",\"trace\":[{\"file\":\"http://localhost:8888/__spec__/session_spec.js\",\"line\":10,\"function\":\"\"}]}\r\n{\"error\":\"Javascript error encountered on Jasmine test page: ReferenceError: Can't find variable: require\",\"trace\":[{\"file\":\"http://localhost:8888/__spec__/vox_spec.js\",\"line\":7,\"function\":\"\"}]}\r\n```\r\nSo, when JSON parser meets the second line in :evaluate_response method it raises an error.\r\nI'm not sure if it is possible to break the string json into several lines and process them one by one."},"comment":{"url":"https://api.github.com/repos/guard/guard-jasmine/issues/comments/97274665","html_url":"https://github.com/guard/guard-jasmine/issues/186#issuecomment-97274665","issue_url":"https://api.github.com/repos/guard/guard-jasmine/issues/186","id":97274665,"user":{"login":"nathanstitt","id":79566,"avatar_url":"https://avatars.githubusercontent.com/u/79566?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanstitt","html_url":"https://github.com/nathanstitt","followers_url":"https://api.github.com/users/nathanstitt/followers","following_url":"https://api.github.com/users/nathanstitt/following{/other_user}","gists_url":"https://api.github.com/users/nathanstitt/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanstitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanstitt/subscriptions","organizations_url":"https://api.github.com/users/nathanstitt/orgs","repos_url":"https://api.github.com/users/nathanstitt/repos","events_url":"https://api.github.com/users/nathanstitt/events{/privacy}","received_events_url":"https://api.github.com/users/nathanstitt/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T00:52:58Z","updated_at":"2015-04-29T00:52:58Z","body":"Thanks for reporting the issue @dima4p.  I believe the error you encountered traces back to your page having multiple javascript errors present, and then GuardJasmine attempted to log them all individually.  I've changed how they're reported so it will only log them one at a time.\r\n\r\nI just released version 2.0.6 with the changes, please give it a spin and see if it works for you."}}