Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeError: null is not an object (evaluating 'document.body.querySelector('.alert > .bar.passed').innerText')

For some reason I'm getting intermittent failure to run (or at least report the running of) my jasmine tests. the error lies in run-jasmine.js and the error manifests itself as

`TypeError: null is not an object (evaluating 'document.body.querySelector('.alert > .bar.passed').innerText')
phantomjs://webpage.evaluate():58
phantomjs://webpage.evaluate():61` 

I am running TeamCity 8.1.3 (build 30101), Jasmine 2.2.0 and phantomjs 2.0.0. Build step command parameters are

--web-security=no
--local-to-remote-url-access=yes
--ignore-ssl-errors=yes
jasmine/run-jasmine.js
specs/SpecsRunner.html

I've tried downgrading Jasmine and phantomjs but no change. I've also tried various run-jasmine.js scripts but to no avail. Is anyone else having a similar problem?

Everything was fine until a few days ago and now it happens 90% of the time.

Thanks in advance.

like image 300
no1spirite Avatar asked Nov 10 '22 17:11

no1spirite


1 Answers

I've found a new run-jasmine.js script that does the job.

daniel-chambers / run-jasmine.js

I tried this script before but was getting a problem with timeouts so I moved on but now I've increased the 'Default Max Timeout' in the script to 60 seconds, it seems to do the trick just fine.

like image 98
no1spirite Avatar answered Dec 20 '22 14:12

no1spirite