Timeout with Phantomjs

Hello,

I’m using PhantomJS 2.1.1 and The Intern 3.3.1 in a project to automate functional tests on a build. It’s working nicely, except when it isn’t. I would say that 75% of the builds are failing because of a timeout on the first test of the intern. The error message is always this one:

CancelError: Timeout reached on phantomjs on any platform

If I rebuild the same commit for another time (sometimes more then once), the build is successful. Sometimes it works only by rebuilding without the cache, sometime just a single simple rebuild words.

When I try to reproduce the same problem here locally I don’t succeed. I think it might be related to the specific build environment in the circle environment.

Did anyone else experience problems like this?

Thanks.

P.S. About my environment:

  • PhantomJS 2.1.1 (from the circle ci download link)
  • phantomjs2 npm package
  • intern 3.3.1

This is the only test failing because of the timeout:

'page has the page identifier': function () {
	return this.remote
		.get(require.toUrl(''))
		.setFindTimeout(5000)
		.findByCssSelector('[data-page]')
		.getAttribute('data-page')
		.then(function (text) {
			assert.strictEqual(text, 'index', 'The index page should have the page identifier index');
		});
	},`