BUPT / cad-board

Monitor Reports for CAD Lab(CAD看板)
https://cad-board.surge.sh
Apache License 2.0
0 stars 2 forks source link

Error: 2 timer(s) still in the queue. #1

Open huan opened 6 years ago

huan commented 6 years ago

Seems it related to firebase / @angular/fire npm module:

When we injected the AngularFirestore(only, do nothing else), then the test will fail.

$ npm ls @angular/fire
cad-screen@0.0.10 /Users/zixia/git/cad-screen
└── @angular/fire@5.0.2 

Error Message

ng test --watch=false

 10% building modules 7/7 modules 0 active14 10 2018 06:06:51.301:INFO [karma]: Karma v3.0.0 server started at http://0.0.0.0:9876/
14 10 2018 06:06:51.305:INFO [launcher]: Launching browser ChromeHeadless with unlimited concurrency
 10% building modules 8/8 modules 0 active14 10 2018 06:06:51.386:INFO [launcher]: Starting browser ChromeHeadless
14 10 2018 06:06:58.485:INFO [HeadlessChrome 0.0.0 (Mac OS X 10.12.6)]: Connected on socket WRuU-cegxHOdRwKpAAAA with id 76337079
HeadlessChrome 0.0.0 (Mac OS X 10.12.6) AppComponent should render title in a h1 tag FAILED
    Error: 2 timer(s) still in the queue.
        at UserContext.eval (./node_modules/zone.js/dist/zone-testing.js?:1434:27)
        at ZoneDelegate.invoke (./node_modules/zone.js/dist/zone.js?:387:26)
        at ProxyZoneSpec.onInvoke (./node_modules/zone.js/dist/zone-testing.js?:287:39)
        at ZoneDelegate.invoke (./node_modules/zone.js/dist/zone.js?:386:32)
        at Zone.run (./node_modules/zone.js/dist/zone.js?:137:43)
        at runInTestZone (./node_modules/zone.js/dist/zone-testing.js?:508:34)
        at UserContext.eval (./node_modules/zone.js/dist/zone-testing.js?:523:20)
HeadlessChrome 0.0.0 (Mac OS X 10.12.6): Executed 3 of 5 (1 FAILED) (0 secs / 0.309 secs)
HeadlessChrome 0.0.0 (Mac OS X 10.12.6) AppComponent should render title in a h1 tag FAILED
    Error: 2 timer(s) still in the queue.
        at UserContext.eval (./node_modules/zone.js/dist/zone-testing.js?:1434:27)
        at ZoneDelegate.invoke (./node_modules/zone.js/dist/zone.js?:387:26)
        at ProxyZoneSpec.onInvoke (./node_modules/zone.js/dist/zone-testing.js?:287:39)
        at ZoneDelegate.invoke (./node_modules/zone.js/dist/zone.js?:386:32)
        at Zone.run (./node_modules/zone.js/dist/zone.js?:137:43)
        at runInTestZone (./node_modules/zone.js/dist/zone-testing.js?:508:34)
HeadlessChrome 0.0.0 (Mac OS X 10.12.6): Executed 5 of 5 (1 FAILED) (0.454 secs / 0.388 secs)
TOTAL: 1 FAILED, 4 SUCCESS
TOTAL: 1 FAILED, 4 SUCCESS

Travis CI

https://travis-ci.com/BUPT/cad-screen/jobs/151635569

Versions

./node_modules/.bin/ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 6.2.5
Node: 10.5.0
OS: darwin x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.8.5
@angular-devkit/build-angular     0.8.5
@angular-devkit/build-optimizer   0.8.5
@angular-devkit/build-webpack     0.8.5
@angular-devkit/core              0.8.5
@angular-devkit/schematics        0.8.5
@angular/cli                      6.2.5
@angular/fire                     5.0.2
@angular/material                 6.4.7
@ngtools/webpack                  6.2.5
@schematics/angular               0.8.5
@schematics/update                0.8.5
rxjs                              6.2.2
typescript                        2.9.2
webpack                           4.20.2

See Also

  1. https://stackoverflow.com/a/38343969/1123955
  2. https://github.com/angular/protractor/issues/2750
  3. http://mylifeandcode.blogspot.com/2018/05/resolving-n-timers-still-in-queue-error.html
  4. https://github.com/angular/protractor/issues/4300#issuecomment-360039887
  5. https://github.com/angular/angularfire2/issues/779