Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
$ ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 1.5.0
Node: 8.9.1
OS: win32 x64
Angular: 4.4.6
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, tsc-wrapped
@angular/cli: 1.5.0
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.2
typescript: 2.3.4
webpack: 3.8.1
Repro steps.
- run
ng e2e
. - wait for it to fail the test
- run
ng e2e
. - when browser window comes up, resize the window. Test will pass.
The log given by the failure.
$ ng e2e
** NG Live Development Server is listening on localhost:49152, open your browser on http://localhost:49152/ **
Date: 2017-11-08T22:26:15.552Z
Hash: d2d7aac667932ee3b422
Time: 22028ms
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 395 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 217 kB [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 57.5 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 14.4 MB [initial] [rendered]
(node:7916) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
webpack: Compiled successfully.
[15:26:15] I/update - chromedriver: file exists C:\Users\jakeh\Documents\work\tdportal\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.33.zip
[15:26:15] I/update - chromedriver: unzipping chromedriver_2.33.zip
[15:26:16] I/update - chromedriver: chromedriver_2.33.exe up to date
[15:26:16] I/launcher - Running 1 instances of WebDriver
[15:26:16] I/direct - Using ChromeDriver directly...
Jasmine started
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
tdportal App
× should display message saying Team Digital Portal
- Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
at ontimeout (timers.js:475:11)
at tryOnTimeout (timers.js:310:5)
- Failed: Timed out waiting for asynchronous Angular tasks to finish after 30 seconds. This may be because the current page is not an Angular application. Please see the FAQ for mor
e details: https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular
While waiting for element with locator - Locator: By(css selector, header.header > div.header-content > div.header-logo > a.logo > span.header-title)
(Session info: chrome=61.0.3163.100)
(Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.15063 x86_64)
at Object.checkLegacyResponse (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\error.js:505:15)
at parseHttpResponse (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\http.js:440:13)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
From: Task: Protractor.waitForAngular() - Locator: By(css selector, header.header > div.header-content > div.header-logo > a.logo > span.header-title)
at Driver.schedule (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\webdriver.js:816:17)
at ProtractorBrowser.executeAsyncScript_ (C:\Users\jakeh\Documents\work\tdportal\node_modules\protractor\lib\browser.ts:609:24)
at angularAppRoot.then (C:\Users\jakeh\Documents\work\tdportal\node_modules\protractor\lib\browser.ts:643:23)
at ManagedPromise.invokeCallback_ (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:1366:14)
at TaskQueue.execute_ (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:2970:14)
at TaskQueue.executeNext_ (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:2953:27)
at asyncRun (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:2813:27)
at C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:676:7
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)Error
at ElementArrayFinder.applyAction_ (C:\Users\jakeh\Documents\work\tdportal\node_modules\protractor\lib\element.ts:482:23)
at ElementArrayFinder.(anonymous function).args [as getText] (C:\Users\jakeh\Documents\work\tdportal\node_modules\protractor\lib\element.ts:96:21)
at ElementFinder.(anonymous function).args [as getText] (C:\Users\jakeh\Documents\work\tdportal\node_modules\protractor\lib\element.ts:873:14)
at TDPortalPage.getParagraphText (C:\Users\jakeh\Documents\work\tdportal\e2e\app.po.ts:9:113)
at UserContext.<anonymous> (C:\Users\jakeh\Documents\work\tdportal\e2e\app.e2e-spec.ts:12:22)
at new ManagedPromise (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:1067:7)
at ControlFlow.promise (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:2396:12)
at TaskQueue.execute_ (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:2970:14)
at TaskQueue.executeNext_ (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:2953:27)
at asyncRun (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:2860:25)
at C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:676:7
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
From: Task: Run it("should display message saying Team Digital Portal") in control flow
at ControlFlow.emit (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\events.js:62:21)
at ControlFlow.shutdown_ (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:2565:10)
at shutdownTask_.MicroTask (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:2490:53)
at MicroTask.asyncRun (C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:2619:9)
at C:\Users\jakeh\Documents\work\tdportal\node_modules\selenium-webdriver\lib\promise.js:676:7
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
From asynchronous test:
Error
at Suite.<anonymous> (C:\Users\jakeh\Documents\work\tdportal\e2e\app.e2e-spec.ts:10:3)
at Object.<anonymous> (C:\Users\jakeh\Documents\work\tdportal\e2e\app.e2e-spec.ts:3:1)
at Module._compile (module.js:635:30)
at Module.m._compile (C:\Users\jakeh\Documents\work\tdportal\node_modules\ts-node\src\index.ts:392:23)
at Module._extensions..js (module.js:646:10)
at Object.require.extensions.(anonymous function) [as .ts] (C:\Users\jakeh\Documents\work\tdportal\node_modules\ts-node\src\index.ts:395:12)
at Module.load (C:\Users\jakeh\Documents\work\tdportal\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Array.forEach (<anonymous>)
at Function.promise (C:\Users\jakeh\Documents\work\tdportal\node_modules\q\q.js:682:9)
at _fulfilled (C:\Users\jakeh\Documents\work\tdportal\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\jakeh\Documents\work\tdportal\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\jakeh\Documents\work\tdportal\node_modules\q\q.js:796:13)
at C:\Users\jakeh\Documents\work\tdportal\node_modules\q\q.js:556:49
at runSingle (C:\Users\jakeh\Documents\work\tdportal\node_modules\q\q.js:137:13)
at flush (C:\Users\jakeh\Documents\work\tdportal\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
**************************************************
* Failures *
**************************************************
1) tdportal App should display message saying Team Digital Portal
- Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
- Failed: Timed out waiting for asynchronous Angular tasks to finish after 30 seconds. This may be because the current page is not an Angular application. Please see the FAQ for more de
tails: https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular
While waiting for element with locator - Locator: By(css selector, header.header > div.header-content > div.header-logo > a.logo > span.header-title)
Executed 1 of 1 spec (1 FAILED) in 34 secs.
[15:26:52] I/launcher - 0 instance(s) of WebDriver still running
[15:26:52] I/launcher - chrome #01 failed 1 test(s)
[15:26:52] I/launcher - overall: 1 failed spec(s)
[15:26:52] E/launcher - Process exited with error code 1
Desired functionality.
My end-to-end test stopped passing and I found out that if I interact with the browser window that comes up, the test passes. It’s like the test doesn’t know the window is there and ready until I manually interact with it.
Mention any other details that might be useful.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:10 (1 by maintainers)
Top Results From Across the Web
jasmine: Async callback was not invoked within timeout ...
In my case, this error was caused by improper use of "fixture.detectChanges()" It seems this method ...
Read more >Async callback was not invoked within timeout specified by ...
In my case, this error was caused by improper use of "fixture.detectChanges()" It seems this method is a event listener (async) which will...
Read more >Jasmine–Async callback was not invoked within timeout
This is a void function that signals Jasmine that the callback is finished. Jasmine will wait for done() to be called before continuing ......
Read more >Async callback was not invoked within timeout specified by ...
This error is coming because your webpage is not loading within the default timeout period of jasmine. You should increase the timeout period ......
Read more >Async callback was not invoked within timeout specified by ...
I read about the Asynchronous Support in Jasmine, but as I am rather new to unit testing with javascript couldn't make it work....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1
I get this error:
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.