mozilla / vtt.js

A JavaScript implementation of the WebVTT specification

Home Page:http://dev.w3.org/html5/webvtt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mocha tests fail on local node

rillian opened this issue · comments

I can't run the tests on my Fedora 23 system with the packaged node v0.12.7. Most of the mochaTests fail with:

  29) parsing error tests "before all" hook:
     Error: done() invoked with non-Error: true
      at /home/giles/mozilla/vtt.js/node_modules/mocha/lib/runnable.js:198:38
      at /home/giles/mozilla/vtt.js/node_modules/node-vtt/lib/node-vtt.js:92:14
      at /home/giles/mozilla/vtt.js/node_modules/node-vtt/node_modules/node-phantom/node-phantom.js:65:6
      at null._onTimeout (/home/giles/mozilla/vtt.js/node_modules/node-vtt/node_modules/node-phantom/node-phantom.js:43:5)
      at Timer.listOnTimeout (timers.js:119:15)

Works ok on travis with 0.10 and others report it working on their machines with older node, so I assume it's a compatibility issue.

I've tried several things today to make this work, and it fails even with a fresh nvm install of 0.10. I made a docker container and everything: https://github.com/rillian/vtt.js/blob/line-endings/Dockerfile

@gkatsev Any idea what's going on here? Round-tripping things through travis is really slow. Get most of the tests failing if I try this on a fresh checkout:

nvm install 0.10
npm install
npm test

Hm... Not sure. I can take a look tomorrow. Also, at this point, probably best to upgrade straight to node 4 or maybe even node 6 :)

Ok, I'd appreciate it if you could take a look. I was trying to get us upgraded in fact, but I get this error with every node version I try.

Did a little more digging on my system. I can't just grunt run or bin/cue2json.js either; they both complain. E.g. in a fresh checkout:

nvm use 0.10
npm install
npm install grunt
npm install node-vtt
./bin/cue2json -v tests/cuetext/timestamp/basic.vtt
Error: Unable to initialize an instance of NodeVTT. undefined

After chatting with a colleague (thanks @Pomax!) it seems likely the issue is some mismatch between mocha and phantomjs. The tests seems to fail the same as cue2json instantiating a node-vtt instance. If I install phantomjs@1.9.8 (the version travis claims to have installed at the start of the successful runs there) the error message changes:

Running "mochaTest:test" (mochaTest) task


  cue-settings/align tests
phantom crash: code 0
    1) "before all" hook
...

The tests continue (slowly!) from there, so there's some kind of timeout.