Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

testConfigure.js:27 :: TypeError: Cannot read property 'length' of undefined #134

Closed
darkwing opened this issue Nov 3, 2015 · 3 comments

Comments

@darkwing
Copy link
Contributor

darkwing commented Nov 3, 2015

In the creation of...

#130

... the testConfigure file chokes at:

for (var i = 0; i < waitingArr.length; i++) {

Full error detail:

Configure
/home/travis/build/mozilla/oghliner/test/testConfigure.js:27
      for (var i = 0; i < waitingArr.length; i++) {
                                    ^
TypeError: Cannot read property 'length' of undefined
    at WriteStream.process.stdout.write (/home/travis/build/mozilla/oghliner/test/testConfigure.js:27:37)
    at Object.exports.cursor.deleteLine (/home/travis/build/mozilla/oghliner/node_modules/mocha/lib/reporters/base.js:137:30)
    at Object.exports.cursor.CR (/home/travis/build/mozilla/oghliner/node_modules/mocha/lib/reporters/base.js:146:22)
    at Runner.<anonymous> (/home/travis/build/mozilla/oghliner/node_modules/mocha/lib/reporters/spec.js:73:12)
    at Runner.emit (events.js:129:20)
    at Runner.fail (/home/travis/build/mozilla/oghliner/node_modules/mocha/lib/runner.js:232:8)
    at Runner.uncaught (/home/travis/build/mozilla/oghliner/node_modules/mocha/lib/runner.js:682:8)
    at process.uncaught (/home/travis/build/mozilla/oghliner/node_modules/mocha/lib/runner.js:727:10)
    at process.emit (events.js:107:17)
    at process._fatalException (node.js:236:26)
The command "gulp test" exited with 7.

Filed at @marco-c 's request

@marco-c
Copy link
Contributor

marco-c commented Nov 3, 2015

The only test that, run in isolation, fails is test/testBootstrap.js:

[18:57:58] [conflict] Creating app/images/favicon-16x16.png
    1) "before all" hook


  0 passing (90ms)
  1 failing

  1) Bootstrap "before all" hook:
     Uncaught SyntaxError: Unexpected token ILLEGAL
      at Function (native)
      at node_modules/gulp-template/node_modules/lodash/index.js:10809:16
      at node_modules/gulp-template/node_modules/lodash/index.js:11082:21
      at node_modules/gulp-template/node_modules/lodash/index.js:8152:31
      at template (node_modules/gulp-template/node_modules/lodash/index.js:10808:20)
      at DestroyableTransform._transform (node_modules/gulp-template/index.js:20:14)
      at DestroyableTransform.Transform._read (node_modules/gulp-template/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
      at DestroyableTransform.Transform._write (node_modules/gulp-template/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
      at doWrite (node_modules/gulp-template/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
      at writeOrBuffer (node_modules/gulp-template/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
      at DestroyableTransform.Writable.write (node_modules/gulp-template/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)
      at Transform.ondata (_stream_readable.js:540:20)
      at readableAddChunk (_stream_readable.js:163:16)
      at Transform.Readable.push (_stream_readable.js:126:10)
      at Transform.push (_stream_transform.js:140:32)
      at afterTransform (_stream_transform.js:96:12)
      at TransformState.afterTransform (_stream_transform.js:74:12)
      at Transform.stream._transform (node_modules/gulp-rename/index.js:59:5)
      at Transform._read (_stream_transform.js:179:10)
      at Transform._write (_stream_transform.js:167:12)
      at doWrite (_stream_writable.js:301:12)
      at writeOrBuffer (_stream_writable.js:288:5)
      at Transform.Writable.write (_stream_writable.js:217:11)
      at write (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
      at flow (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)
      at DestroyableTransform.pipeOnReadable (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:664:5)
      at emitReadable_ (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
      at emitReadable (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
      at readableAddChunk (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
      at DestroyableTransform.Readable.push (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
      at DestroyableTransform.Transform.push (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
      at afterTransform (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
      at TransformState.afterTransform (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
      at DestroyableTransform.noop [as _transform] (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/through2.js:26:3)
      at DestroyableTransform.Transform._read (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
      at DestroyableTransform.Transform._write (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
      at doWrite (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
      at writeOrBuffer (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
      at DestroyableTransform.Writable.write (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)
      at write (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
      at flow (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)
      at DestroyableTransform.pipeOnReadable (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:664:5)
      at emitReadable_ (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
      at emitReadable (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
      at readableAddChunk (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
      at DestroyableTransform.Readable.push (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
      at DestroyableTransform.Transform.push (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
      at afterTransform (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
      at TransformState.afterTransform (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
      at node_modules/gulp/node_modules/vinyl-fs/lib/src/getContents/bufferFile.js:12:5
      at evalmachine.<anonymous>:334:14
      at node_modules/gulp/node_modules/vinyl-fs/node_modules/graceful-fs/graceful-fs.js:102:5
      at FSReqWrap.oncomplete (evalmachine.<anonymous>:95:15)

@marco-c
Copy link
Contributor

marco-c commented Nov 3, 2015

The test works if I remove templates/app/images/favicon-196x196.png or if I modify it. (???)

@darkwing
Copy link
Contributor Author

darkwing commented Nov 3, 2015

Was happening to due to a corrupted (?) image file. Tests pass now.

@darkwing darkwing closed this as completed Nov 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants