This is a known issue with CasperJS and PhantomJS version 1.9.8. It does nothing, and errors are only output during exit. They do not interfere with your script. There is a workaround, and it has been merged into a lead branch on GitHub, but it is not available as CasperJS release yet (latest version 1.1-beta3).
The easiest way to solve this is to upgrade to PhantomJS 1.9.7. Since you are using NPM, this is easy to do with
npm -g install phantomjs@1.9.7-15
PhantomJS versions correspond to phantomjs NPM versions up to 1.9.7, then everything breaks. You can check versions with npm show phantomjs .
If you upgrade to version 1.9.7, you will have to run with the command line --ssl-protocol=any for sites requesting https resources. The reason is given in my answer here.
the correct way to solve this problem is to install a new version from git . This will allow you to not only use PhantomJS 1.9.8 without additional error lines, but also PhantomJS 2, which would not be possible with CasperJS 1.1-beta3.
Literature:
GitHub Problem # 1068
Workaround for CasperJS # 1139
Problem with PhantomJS on SO
source share