Protractor4.0.9 / jasmine2 / Chrome 54+: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL
Asked Answered
S

1

1

I know this question have been solved but it doesn't work for me.

I upgrade to protractor4.0.9/Jasmine2, chromedriver 2.25, Chrome54.

A simple test like this is failing:

describe('Test', () => {
    it('should go to home', () => {
      browser.get('/#/home');
      expect(browser.getCurrentUrl()).toContain('home');
    });
    it('should do something else', () => {
      expect(element(by.css('.element')).isPresent()).toEqual(true);
    });
  });

it will never go through the second spec. Even though browser.get() is working. It navigates at the right path. But it ends up with :

Running 1 instances of WebDriver
Started
...
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL

On my protractor conf, i have :

framework: 'jasmine2',
allScriptsTimeout: 110000,
directConnect: true,
useAllAngular2AppRoots: true,

jasmineNodeOpts: {
   defaultTimeoutInterval: 400000
},

onPrepare: function () {
    browser.ignoreSynchronization = true;
    // browser.param.jasmineTimeout = 400000;
    jasmine.getEnv().DEFAULT_TIMEOUT_INTERVAL = 400000;
}

I'm testing with an angular 2 app. Any idea?

Speciosity answered 25/10, 2016 at 11:23 Comment(3)
i havent used protractor much but as a guess are you missing a done callback?Pareu
can you try increasing the value of defaultTimeoutInterval Domela
Increase of how much? i set it to 1000000 ... doesn't change. I dont get the done callback. How and where to set that? thanksSpeciosity
S
0

The only solution i found for now is to downgrade to Chrome 53. Any explanation or suggestion to make it work with latest version of Chrome are more than welcome.

Speciosity answered 26/10, 2016 at 8:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.