{"action":"created","issue":{"url":"https://api.github.com/repos/ariya/phantomjs/issues/14072","repository_url":"https://api.github.com/repos/ariya/phantomjs","labels_url":"https://api.github.com/repos/ariya/phantomjs/issues/14072/labels{/name}","comments_url":"https://api.github.com/repos/ariya/phantomjs/issues/14072/comments","events_url":"https://api.github.com/repos/ariya/phantomjs/issues/14072/events","html_url":"https://github.com/ariya/phantomjs/issues/14072","id":139102602,"number":14072,"title":"2.1: wrong script syntax not reported","user":{"login":"mh-cbon","id":17096799,"avatar_url":"https://avatars.githubusercontent.com/u/17096799?v=3","gravatar_id":"","url":"https://api.github.com/users/mh-cbon","html_url":"https://github.com/mh-cbon","followers_url":"https://api.github.com/users/mh-cbon/followers","following_url":"https://api.github.com/users/mh-cbon/following{/other_user}","gists_url":"https://api.github.com/users/mh-cbon/gists{/gist_id}","starred_url":"https://api.github.com/users/mh-cbon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mh-cbon/subscriptions","organizations_url":"https://api.github.com/users/mh-cbon/orgs","repos_url":"https://api.github.com/users/mh-cbon/repos","events_url":"https://api.github.com/users/mh-cbon/events{/privacy}","received_events_url":"https://api.github.com/users/mh-cbon/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-07T21:37:52Z","updated_at":"2016-03-08T05:46:52Z","closed_at":"2016-03-08T05:46:52Z","body":"Hi,\r\n\r\nI have this script with a wrong syntax.\r\nPhantomjs won t show up any error while executing the script, just blank failure,\r\n\r\nsee the last two handlers bound on page object, opening parenthesis is not closed because of the comment,\r\n```js\r\n\r\n\r\n// instanciate a webpage\r\n// http://phantomjs.org/quick-start.html\r\nvar page = require('webpage').create();\r\n\r\nconsole.log('phantom process started');\r\nconsole.error('phantom process started');\r\n// phantom.exit();\r\n\r\npage.open('http://127.0.0.1:3000/page-1.html', function() {\r\n\r\n    console.log('page-1 open')\r\n  // render page 1 screenshot\r\n  // http://phantomjs.org/screen-capture.html\r\n  // page.render('output/page-1.png');\r\n\r\n  // automate page action to trigger the form and move to page 2\r\n  // http://phantomjs.org/page-automation.html\r\n  // page.evaluate(function() {\r\n  //   return document.querySelectorAll('[action=\"/page-2.html\"]')[0].submit();\r\n  // });\r\n\r\n\r\n  // phantom.exit();\r\n});\r\n\r\n//\r\n// http://phantomjs.org/api/webpage/handler/on-resource-received.html\r\npage.onResourceReceived = function(response) {\r\n  console.log('Response (#' + response.id + ', stage \"' + response.stage + '\"): ' //+ JSON.stringify(response));\r\n};\r\n//\r\n// http://phantomjs.org/api/webpage/handler/on-resource-requested.html\r\npage.onResourceRequested = function(requestData, networkRequest) {\r\n  console.log('Request (#' + requestData.id + '): ' // + JSON.stringify(requestData));\r\n};\r\n\r\n```\r\n\r\nmachine info and setup steps\r\n```\r\n$> lsb_release -a\r\nLSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch\r\nDistributor ID: Fedora\r\nDescription:    Fedora release 23 (Twenty Three)\r\nRelease:    23\r\nCodename:   TwentyThree\r\n\r\n$> uname -a\r\nLinux pc12.home 4.4.3-300.fc23.x86_64 #1 SMP Fri Feb 26 18:45:40 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux\r\n\r\n$> npm install phantomjs-prebuilt --save\r\n\r\n> phantomjs-prebuilt@2.1.5 install /home/mh-cbon/projects/problems-and-solutions/patricks-problem/node_modules/phantomjs-prebuilt\r\n> node install.js\r\n\r\nPhantomJS not found on PATH\r\nDownloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2\r\nSaving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2\r\nReceiving...\r\n  [========================================] 100%\r\nReceived 22866K total.\r\nExtracting tar contents (via spawned process)\r\n```"},"comment":{"url":"https://api.github.com/repos/ariya/phantomjs/issues/comments/193618641","html_url":"https://github.com/ariya/phantomjs/issues/14072#issuecomment-193618641","issue_url":"https://api.github.com/repos/ariya/phantomjs/issues/14072","id":193618641,"user":{"login":"Vitallium","id":1894248,"avatar_url":"https://avatars.githubusercontent.com/u/1894248?v=3","gravatar_id":"","url":"https://api.github.com/users/Vitallium","html_url":"https://github.com/Vitallium","followers_url":"https://api.github.com/users/Vitallium/followers","following_url":"https://api.github.com/users/Vitallium/following{/other_user}","gists_url":"https://api.github.com/users/Vitallium/gists{/gist_id}","starred_url":"https://api.github.com/users/Vitallium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vitallium/subscriptions","organizations_url":"https://api.github.com/users/Vitallium/orgs","repos_url":"https://api.github.com/users/Vitallium/repos","events_url":"https://api.github.com/users/Vitallium/events{/privacy}","received_events_url":"https://api.github.com/users/Vitallium/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T05:46:52Z","updated_at":"2016-03-08T05:46:52Z","body":"Thanks for reporting! Duplicate. Please see #12973"}}