Thursday, 15 August 2013

'undefined' is not an object (evaluating 'c.startedAt.getTime') or 'undefined' is not an object (evaluating 'b.getTime')

'undefined' is not an object (evaluating 'c.startedAt.getTime') or
'undefined' is not an object (evaluating 'b.getTime')

I'm using CasperJS 1.0.3 and PhantomJS 1.9.0. Every now and then, an error
comes up saying 'undefined' is not an object (evaluating
'c.startedAt.getTime') [object Object],[object Object]. Even more rarely,
it will be b.getTime instead of c.startedAt.getTime. It only happens on a
few select pages, and the only thing that these pages have in common is
that they are very JavaScript-heavy.
The pages are loading and behaving exactly as expected when this error
happens, and the test continues to run exactly as it should, but this
error is causing a lot of false negatives from a pure pass/fail
perspective.
I've evaluated all of the javascript that is used on the pages this error
surfaces, and c.startedAt.getTime and b.getTime are not in any of the
files, both in dev and minified versions.
Has anyone ever seen this error? Is it an issue with CasperJS? PhantomJS?
The fact that it only happens on a few specific pages makes me think it's
a problem with those pages, but like I said, I can't find anything that
even remotely resembles c.startedAt.getTime or b.getTime in the source
javascript.
I've also used CasperJS 1.0.2 and PhantomJS 1.9.1 in various combinations,
and have still gotten the errors.

No comments:

Post a Comment