Hi All,
I'm experiencing a really odd issue with a CasperJS script that I have created. I developed a check that simulates a login to my company's Office 365 OWA using a test account, looking for a DIV element before finally logging off to clear the session. The idea behind this script is to improve on the monitoring solutions that Microsoft have provided us (which are pretty dense) and see if a service outage is actually affecting our O365 tenancy/userbase. So I run this script every 5 minutes with a test account and do not cache cookies/files/sessions - and this always works well for a couple of days before I start seeing this error:
No matter how long I leave it before running the script again, I always see the same "Phantomjs has crashed" outcome when running this script. On further inspection, the debug mode shows the following at the end of the script execution:
2015-04-07T10:53:48 [DEBUG] WebPage - setupFrame ""
2015-04-07T10:53:48 [DEBUG] WebPage - updateLoadingProgress: 50
2015-04-07T10:53:48 [DEBUG] WebPage - updateLoadingProgress: 100
2015-04-07T10:53:48 [DEBUG] WebPage - updateLoadingProgress: 10
Has anyone seen this sort of behaviour before? It appears that the resource that I receive from
outlook.office365.com causes a 299 error (does anyone know what this means?). Strangely, if I take the same script but run it on a different machine it will work but the same then happens. On further inspection, it even appeared that I could run the same script on the same box but as a different user and not see PhantomJS crash
I suspect that my check is being detected by Microsoft as some sort of malicious use of their service, but I'm baffled as to how I can then run the same check on the same box but as a different user. Does this mean that PhantomJS caches results or session data in someway for a particular user?
I am using PhantomJS 1.9.8 and CasperJS 1.1.0-beta3 on CentOS 5.10 (I know it's old). I have the seen the same problem occur on PhantomJS2.0 and CasperJS 1.0.4. on Ubuntu 14.04. Any help would be greatly appreciated.
Cheers,
Duncan