Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'start' of undefined #27

Closed
lc3t35 opened this issue Jul 3, 2013 · 44 comments
Closed

TypeError: Cannot read property 'start' of undefined #27

lc3t35 opened this issue Jul 3, 2013 · 44 comments

Comments

@lc3t35
Copy link
Contributor

lc3t35 commented Jul 3, 2013

MacOS 10.8.3, Node 0.8.14, meteor 0.6.4
Error raised during coverage tests

TypeError: Cannot read property 'start' of undefined
at tmp (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:58:44)
at Array.forEach (native)
at Object.addDerivedInfoForFile (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:57:37)
at Object.Collector.fileCoverageFor (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/collector.js:93:15)
at app/packages/istanbul-middleware-port/core.js:143:86
at Array.forEach (native)
at getTreeSummary (app/packages/istanbul-middleware-port/core.js:142:23)
at Object.core.render (app/packages/istanbul-middleware-port/core.js:186:19)
at app.get.origUrl (app/packages/istanbul-middleware-port/handlers.js:31:14)
at Object. (app/packages/istanbul-middleware-port/express-shim.js:16:13)
Fatal error: TypeError: Cannot read property 'start' of undefined
at tmp (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:58:44)
at Array.forEach (native)
at Object.addDerivedInfoForFile (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:57:37)
at Object.Collector.fileCoverageFor (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/collector.js:93:15)
at app/packages/istanbul-middleware-port/core.js:143:86
at Array.forEach (native)
at getTreeSummary (app/packages/istanbul-middleware-port/core.js:142:23)
at Object.core.render (app/packages/istanbul-middleware-port/core.js:186:19)
at app.get.origUrl (app/packages/istanbul-middleware-port/handlers.js:31:14)
at Object. (app/packages/istanbul-middleware-port/express-shim.js:16:13)

{ [TypeError: Cannot call method 'getText' of undefined] webdriver_promise_error_: true }
Fatal error: { [TypeError: Cannot call method 'getText' of undefined] webdriver_promise_error_: true }

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 3, 2013

The source code where the problem raise is :

    function addDerivedInfoForFile(fileCoverage) {
    var statementMap = fileCoverage.statementMap,
        statements = fileCoverage.s,
        lineMap;

      if (!fileCoverage.l) {
          fileCoverage.l = lineMap = {};
          Object.keys(statements).forEach(function (st) {
              var line = statementMap[st].start.line,                            <============== here
                  count = statements[st],
                  prevVal = lineMap[line];
              if (typeof prevVal === 'undefined' || prevVal < count) {
                  lineMap[line] = count;
              }
          });
      }
    }

@xolvio
Copy link
Collaborator

xolvio commented Jul 3, 2013

Hi, I just updated RTD, could you try again please with the latest? If you have errors, please enable debug in /test/rtd/rtd.conf.js

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 3, 2013

Removed, reinstalled, debug true and run grunt --debug

  • - - Running unit tests - - -
    ......................
    Chrome 27.0 (Mac): Executed 11 of 11 SUCCESS (0.078 secs / 0.01 secs)

Chrome 27.0 (Mac): Executed 11 of 11 SUCCESS (0.078 secs / 0.01 secs)

Running "bgShell:synchronizeMirrorApp" (bgShell) task
[D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee

Running "bgShell:instrumentCode" (bgShell) task
[D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee
.
Processed [3] files in 0 secs

Running "bgShell:runTests" (bgShell) task
[D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee

  • - - Running acceptance tests - - -
    => Meteor server restarted.

Finished in 5.994 seconds
1 test, 4 assertions, 0 failures, 0 skipped

Running "postLatestUnitCoverage" task
[D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/Gruntfile.js

Running "bgShell:killReports" (bgShell) task
[D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee

Running "bgShell:runCoverageCheck" (bgShell) task
[D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee

  • - - Running coverage tests - - -

TypeError: Cannot read property 'start' of undefined
at tmp (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:58:44)
at Array.forEach (native)
at Object.addDerivedInfoForFile (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:57:37)
at Object.Collector.fileCoverageFor (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/collector.js:93:15)
at app/packages/istanbul-middleware-port/core.js:143:86
at Array.forEach (native)
at getTreeSummary (app/packages/istanbul-middleware-port/core.js:142:23)
at Object.core.render (app/packages/istanbul-middleware-port/core.js:186:19)
at app.get.origUrl (app/packages/istanbul-middleware-port/handlers.js:31:14)
at Object. (app/packages/istanbul-middleware-port/express-shim.js:16:13)
Fatal error: TypeError: Cannot read property 'start' of undefined
at tmp (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:58:44)
at Array.forEach (native)
at Object.addDerivedInfoForFile (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:57:37)
at Object.Collector.fileCoverageFor (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/collector.js:93:15)
at app/packages/istanbul-middleware-port/core.js:143:86
at Array.forEach (native)
at getTreeSummary (app/packages/istanbul-middleware-port/core.js:142:23)
at Object.core.render (app/packages/istanbul-middleware-port/core.js:186:19)
at app.get.origUrl (app/packages/istanbul-middleware-port/handlers.js:31:14)
at Object. (app/packages/istanbul-middleware-port/express-shim.js:16:13)

and a few second later, i have also :

{ [TypeError: Cannot call method 'getText' of undefined] webdriver_promise_error_: true }
Fatal error: { [TypeError: Cannot call method 'getText' of undefined] webdriver_promise_error_: true }

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 3, 2013

Do you have an idea how to debug step by step, or log some values ?

@xolvio
Copy link
Collaborator

xolvio commented Jul 3, 2013

To debug, go to the /test/rtd/rtd.conf.js file and enable debug

It looks like istanbul is having some problems. You could try going into the core.js file under /test/rtd/lib/istanbul-middleware-port/core.js and seeing if it has everything it needs to do this call: getTreeSummary

Another thing to try, can you try deleting the node_modules directory and then cd /test/rtd and run ./rtd instead of running grunt? This will just run npm install and set the ulimit higher.

Another thing, try to clone this repo and see if it works out the box: https://github.com/xolvio/real-time-development-with-meteor

@xolvio
Copy link
Collaborator

xolvio commented Jul 4, 2013

if you cd /test/rtd ad then run ./rtd --debug, this now outputs everything

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 4, 2013

FYI, I removed bgShell:runCoverageCheck in Gruntfile.js -> no error

after the run i have a coverage.txt file but in build/reports/coverage/Chrome 27.0 (Mac) folder

=============================== Coverage summary ===============================
Statements   : 100% ( 21/21 )
Branches     : 100% ( 6/6 )
Functions    : 100% ( 8/8 )
Lines        : 100% ( 21/21 )
================================================================================

@xolvio
Copy link
Collaborator

xolvio commented Jul 4, 2013

What you have there is the coverage check but only from the unit test runs, it has not been combined with the coverage from the running meteor app (both client and server). That's what the runCoverageCheck does, it goes to see the combined results.

It looks like somehow, the npm dependency that Istanbul needs is not the right version and that would explain why node_modules/istanbul/lib/object-utils would be not working. Perhaps this has something to do with npm itself. What version of NPM are you using there?

I'm using:
node v0.10.12
npm 1.2.32
phantomjs 1.9.0

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 4, 2013

upgrade to the same versions -> same errors
Removed all, reinstalling ... some warning messages after running ./rtd --debug :

npm WARN package.json growl@1.7.0 No repository field.
npm WARN package.json dateformat@1.0.2-1.2.3 No repository field.
npm WARN package.json ctype@0.5.2 No repository field.
npm WARN package.json assert-plus@0.1.2 No repository field.

=> Meteor 0.6.4 is available. Update this project with 'meteor update'.

  • - - Running coverage tests - - -

TypeError: Cannot read property 'start' of undefined
at tmp (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:58:44)
at Array.forEach (native)
at Object.addDerivedInfoForFile (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:57:37)
at Object.Collector.fileCoverageFor (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/collector.js:93:15)
at app/packages/istanbul-middleware-port/core.js:143:86
at Array.forEach (native)
at getTreeSummary (app/packages/istanbul-middleware-port/core.js:142:23)
at Object.core.render (app/packages/istanbul-middleware-port/core.js:186:19)
at app.get.origUrl (app/packages/istanbul-middleware-port/handlers.js:31:14)
at Object. (app/packages/istanbul-middleware-port/express-shim.js:16:13)
Fatal error: TypeError: Cannot read property 'start' of undefined
at tmp (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:58:44)
at Array.forEach (native)
at Object.addDerivedInfoForFile (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:57:37)
at Object.Collector.fileCoverageFor (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/collector.js:93:15)
at app/packages/istanbul-middleware-port/core.js:143:86
at Array.forEach (native)
at getTreeSummary (app/packages/istanbul-middleware-port/core.js:142:23)
at Object.core.render (app/packages/istanbul-middleware-port/core.js:186:19)
at app.get.origUrl (app/packages/istanbul-middleware-port/handlers.js:31:14)
at Object. (app/packages/istanbul-middleware-port/express-shim.js:16:13)

{ [TypeError: Cannot call method 'getText' of undefined] webdriver_promise_error_: true }
Fatal error: { [TypeError: Cannot call method 'getText' of undefined] webdriver_promise_error_: true }

@wenzowski
Copy link

Using $ npm i -g phantomjs@1.9.0-0 solves the previously experienced fork bomb & manual launching of karma and selenium sessions, but this issue is still present when using the expected versions of global deps.

$ node --version
v0.10.12
$ npm --version
1.2.32

Are we running the same version of meteorite?

$ mrt --version
Meteorite version 0.6.6
Release 0.6.4

From root of the example app repo

$ WD=`pwd`
$ cd $WD/app
$ meteor --version
Release 0.6.3.1
$ cd $WD/test/rtd
$ meteor --version
Release 0.6.4

It doesn't seem to matter if the meteor servers being started are 0.6.3.1 or 0.6.4.

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 4, 2013

to suppress the warning of npm, add the following to node_modules/growl/package.json before "main" :

"repository": {
    "type": "git",
    "url": "git://github.com/visionmedia/node-growl.git"
 }, 

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 4, 2013

i solved the phantomjs problem (installing 1.9.0 instead of 1.9.1-1) but i have the same error message with PhantomJS and Chrome :

    TypeError: Cannot read property 'start' of undefined
    at tmp (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:58:44)
    at Array.forEach (native)
    at Object.addDerivedInfoForFile (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:57:37)
    at Object.Collector.fileCoverageFor (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/collector.js:93:15)
    at app/packages/istanbul-middleware-port/core.js:143:86
    at Array.forEach (native)
    at getTreeSummary (app/packages/istanbul-middleware-port/core.js:142:23)
    at Object.core.render (app/packages/istanbul-middleware-port/core.js:186:19)
    at app.get.origUrl (app/packages/istanbul-middleware-port/handlers.js:31:14)
    at Object. (app/packages/istanbul-middleware-port/express-shim.js:16:13)
    Fatal error: TypeError: Cannot read property 'start' of undefined
    at tmp (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:58:44)
    at Array.forEach (native)
    at Object.addDerivedInfoForFile (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/object-utils.js:57:37)
    at Object.Collector.fileCoverageFor (/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/istanbul-middleware-port/.npm/node_modules/istanbul/lib/collector.js:93:15)
    at app/packages/istanbul-middleware-port/core.js:143:86
    at Array.forEach (native)
    at getTreeSummary (app/packages/istanbul-middleware-port/core.js:142:23)
    at Object.core.render (app/packages/istanbul-middleware-port/core.js:186:19)
    at app.get.origUrl (app/packages/istanbul-middleware-port/handlers.js:31:14)
    at Object. (app/packages/istanbul-middleware-port/express-shim.js:16:13)

    { [TypeError: Cannot call method 'getText' of undefined] webdriver_promise_error_: true }
    Fatal error: { [TypeError: Cannot call method 'getText' of undefined] webdriver_promise_error_: true }

@xolvio
Copy link
Collaborator

xolvio commented Jul 4, 2013

@wenzowski @lc3t35 I'm a little confused on what errors we're talking about now! Where in the chain are you stuck?

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 4, 2013

Updated comment -> i found that the problem was in Gruntfile.js , replace /coverage/client by /coverage in this task !

grunt.registerTask('postLatestUnitCoverage', 'postLatestUnitCoverage', function () {
            var done = this.async();
            postJson('localhost', 8000, '/coverage', getLatestCoverageObject(), done);
        });

@xolvio
Copy link
Collaborator

xolvio commented Jul 4, 2013

@lc3t35 Not quite! That means the coverage object is being posed to /coverage, which doesn't accept posts. Since the problem is in the /coverage/client code, it looks like it's fixed it, but you won't get combined coverage this way.

Next thing to do, can you zip/tar up your whole directory as is and send it to me?

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 4, 2013

yes -> i send tar at sam address ?

coverage is not 100% with this wrong fix but it's no more crashing the RTD :)

@xolvio
Copy link
Collaborator

xolvio commented Jul 4, 2013

Can you put it on some file share? dropbox? googledrive?

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 4, 2013

uploading in Dropbox ... Done : https://www.dropbox.com/s/9ch9xww35fzvl0t/rtd.tar

@xolvio
Copy link
Collaborator

xolvio commented Jul 4, 2013

thanks

On Thu, Jul 4, 2013 at 1:39 PM, Laurent Roger notifications@github.comwrote:

uploading in Dropbox ... will put the link here when transfert is finished


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-20492901
.

Sam Hatoum | Founder | www.xolvio.com | +1 (415) 857 1317

@wenzowski
Copy link

@xolvio would you mind sharing your globally installed versions of

[
  karma
  selenium-webdriver
  grunt-cli
  jasmine-node
  istanbul
]

so I can confirm I have the same ones in my path?

@lc3t35 This is still the bundled istanbul middleware issue right? Npm warnings in trace don't seem like an issue to me. Did you notice a change in this issue installing/removing growl?

@wenzowski
Copy link

Hmm...in the example app this issue still presents for me, even with phantom 1.9.0.

Copying test/rtd/karma.conf.js to test/karma.conf.js without modifying it in any way solves the problem for me in the example app.

@xolvio
Copy link
Collaborator

xolvio commented Jul 4, 2013

versions are

node v0.10.12
npm 1.2.32
phantomjs 1.9.0
karma 0.8.6
selenium-webdriver 2.33.0
grunt-cli 0.1.9
jasmine-node 1.10.1
istanbul 0.1.39

About just copying the conf file.. can you try that a few times to see if it's deterministic or intermittent? Sounds very odd!

@wenzowski
Copy link

Can confirm same global versions. Can confirm copying config is deterministic on my macbook. I'll try on coworkers' rigs Monday.

@xolvio
Copy link
Collaborator

xolvio commented Jul 5, 2013

Can someone else please try this solution that @wenzowski suggested:

"Copying test/rtd/karma.conf.js to test/karma.conf.js without modifying it in any way solves the problem for me in the example app"

@wenzowski are you saying you used to get this Cannot read property 'start' of undefined error, but now you're not with this change?

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 5, 2013

@wenzowski yes this is the istanbul issue, i've checked all the version are the same.

@xolvio tryed the copy, same error

@xolvio
Copy link
Collaborator

xolvio commented Jul 5, 2013

@lc3t35 I tried your tar'd code from dropbox and it worked straight away for me. This tells me whatever it is, it's likely to be outside of the actual project.

I've just updated RTD to fix the npm version in packages.json for RTD. Could you rm -rf /test/rtd/npm_modules, do a git pull then npm install and let me know if that helps?

@xolvio
Copy link
Collaborator

xolvio commented Jul 5, 2013

I don't think it's the actual coverage object, because anytime you hit the
app, these can change since you increment the counters.

The problem I think is the /coverage/client post is not working due to a
failed dependency, which I think in turn is due to something outside. Vague
I know, but that's what I've pieced together so far.

On Fri, Jul 5, 2013 at 12:13 AM, Laurent Roger notifications@github.comwrote:

Continuing to trace and dump data when running postLatestUnitCoverage :
the json is

{
"./app/models/Players.js":{
"path":"./app/models/Players.js",
"s":{
"1":1
},
"b":{

  },
  "f":{

  },
  "fnMap":{

  },
  "statementMap":{
     "1":{
        "start":{
           "line":1,
           "column":0
        },
        "end":{
           "line":1,
           "column":43
        }
     }
  },
  "branchMap":{

  }

},
"./app/client/leaderboard.js":{
"path":"./app/client/leaderboard.js",
"s":{
"1":1,
"2":1,
"3":1,
"4":1,
"5":1,
"6":3,
"7":3,
"8":1,
"9":2,
"10":1,
"11":1,
"12":1,
"13":1
},
"b":{
"1":[
3,
2
],
"2":[
1,
1
]
},
"f":{
"1":1,
"2":1,
"3":3,
"4":2,
"5":1,
"6":1
},
"fnMap":{
"1":{
"name":"(anonymous_1)",
"line":1,
"loc":{
"start":{
"line":1,
"column":0
},
"end":{
"line":1,
"column":13
}
}
},
"2":{
"name":"(anonymous_2)",
"line":4,
"loc":{
"start":{
"line":4,
"column":35
},
"end":{
"line":4,
"column":47
}
}
},
"3":{
"name":"(anonymous_3)",
"line":8,
"loc":{
"start":{
"line":8,
"column":41
},
"end":{
"line":8,
"column":53
}
}
},
"4":{
"name":"(anonymous_4)",
"line":13,
"loc":{
"start":{
"line":13,
"column":31
},
"end":{
"line":13,
"column":43
}
}
},
"5":{
"name":"(anonymous_5)",
"line":18,
"loc":{
"start":{
"line":18,
"column":27
},
"end":{
"line":18,
"column":39
}
}
},
"6":{
"name":"(anonymous_6)",
"line":24,
"loc":{
"start":{
"line":24,
"column":17
},
"end":{
"line":24,
"column":29
}
}
}
},
"statementMap":{
"1":{
"start":{
"line":1,
"column":0
},
"end":{
"line":30,
"column":5
}
},
"2":{
"start":{
"line":2,
"column":4
},
"end":{
"line":2,
"column":17
}
},
"3":{
"start":{
"line":4,
"column":4
},
"end":{
"line":6,
"column":6
}
},
"4":{
"start":{
"line":5,
"column":8
},
"end":{
"line":5,
"column":62
}
},
"5":{
"start":{
"line":8,
"column":4
},
"end":{
"line":11,
"column":6
}
},
"6":{
"start":{
"line":9,
"column":8
},
"end":{
"line":9,
"column":69
}
},
"7":{
"start":{
"line":10,
"column":8
},
"end":{
"line":10,
"column":37
}
},
"8":{
"start":{
"line":13,
"column":4
},
"end":{
"line":15,
"column":6
}
},
"9":{
"start":{
"line":14,
"column":8
},
"end":{
"line":14,
"column":77
}
},
"10":{
"start":{
"line":17,
"column":4
},
"end":{
"line":21,
"column":7
}
},
"11":{
"start":{
"line":19,
"column":12
},
"end":{
"line":19,
"column":79
}
},
"12":{
"start":{
"line":23,
"column":4
},
"end":{
"line":27,
"column":7
}
},
"13":{
"start":{
"line":25,
"column":12
},
"end":{
"line":25,
"column":53
}
}
},
"branchMap":{
"1":{
"line":10,
"type":"binary-expr",
"locations":[
{
"start":{
"line":10,
"column":15
},
"end":{
"line":10,
"column":21
}
},
{
"start":{
"line":10,
"column":25
},
"end":{
"line":10,
"column":36
}
}
]
},
"2":{
"line":14,
"type":"cond-expr",
"locations":[
{
"start":{
"line":14,
"column":61
},
"end":{
"line":14,
"column":71
}
},
{
"start":{
"line":14,
"column":74
},
"end":{
"line":14,
"column":76
}
}
]
}
}
},
"./app/server/leaderboard.js":{
"path":"./app/server/leaderboard.js",
"s":{
"1":1,
"2":1,
"3":1,
"4":2,
"5":1,
"6":1,
"7":6
},
"b":{
"1":[
1,
1
]
},
"f":{
"1":1,
"2":2
},
"fnMap":{
"1":{
"name":"(anonymous_1)",
"line":1,
"loc":{
"start":{
"line":1,
"column":0
},
"end":{
"line":1,
"column":13
}
}
},
"2":{
"name":"(anonymous_2)",
"line":4,
"loc":{
"start":{
"line":4,
"column":19
},
"end":{
"line":4,
"column":31
}
}
}
},
"statementMap":{
"1":{
"start":{
"line":1,
"column":0
},
"end":{
"line":18,
"column":5
}
},
"2":{
"start":{
"line":2,
"column":4
},
"end":{
"line":2,
"column":17
}
},
"3":{
"start":{
"line":4,
"column":4
},
"end":{
"line":16,
"column":7
}
},
"4":{
"start":{
"line":5,
"column":8
},
"end":{
"line":15,
"column":9
}
},
"5":{
"start":{
"line":6,
"column":12
},
"end":{
"line":11,
"column":34
}
},
"6":{
"start":{
"line":12,
"column":12
},
"end":{
"line":14,
"column":13
}
},
"7":{
"start":{
"line":13,
"column":16
},
"end":{
"line":13,
"column":96
}
}
},
"branchMap":{
"1":{
"line":5,
"type":"if",
"locations":[
{
"start":{
"line":5,
"column":8
},
"end":{
"line":5,
"column":8
}
},
{
"start":{
"line":5,
"column":8
},
"end":{
"line":5,
"column":8
}
}
]
}
}
}
}

You can notice that in app/server/leaderboard.js the "s" is not the same
than the one we dump in addDerivedInfoForFile (see above)

"s":{
"1":1,
"2":1,
"3":1,
"4":2,
"5":1,
"6":1,
"7":6
},


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-20504142
.

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 5, 2013

retrying a fresh reinstall (rm -rf real-time-development-with-meteor)

@xolvio
Copy link
Collaborator

xolvio commented Jul 5, 2013

oh wait, I haven't bumped the version there. One sec....

On Fri, Jul 5, 2013 at 12:23 AM, Laurent Roger notifications@github.comwrote:

retrying a fresh reinstall (rm -rf real-time-development-with-meteor)


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-20504456
.

@xolvio
Copy link
Collaborator

xolvio commented Jul 5, 2013

ready

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 5, 2013

@xolvio yes, it's a global configuration problem of OSX10.8.4 -> can you send me the npm ls output so i can check if it's the same.

@xolvio
Copy link
Collaborator

xolvio commented Jul 5, 2013

also try npm ls -g by the way

npm ls output:

npm WARN package.json dateformat@1.0.2-1.2.3 No repository field.
npm WARN package.json istanbul@0.1.22 No repository field.
npm WARN package.json pause@0.0.1 No repository field.
npm WARN package.json policyfile@0.0.4 No repository field.
npm WARN package.json policyfile@0.0.4 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
/Users/sam
└─┬ karma@0.8.5
  ├── chokidar@0.6.2
  ├── coffee-script@1.6.2
  ├── colors@0.6.0-1
  ├── dateformat@1.0.2-1.2.3
  ├─┬ glob@3.1.21
  │ ├── graceful-fs@1.2.1
  │ └── inherits@1.0.0
  ├── growly@1.1.1
  ├─┬ http-proxy@0.10.2
  │ ├── pkginfo@0.2.3
  │ └─┬ utile@0.1.7
  │   ├── async@0.1.22
  │   ├── deep-equal@0.0.0
  │   ├── i@0.3.1
  │   ├── mkdirp@0.3.5
  │   ├── ncp@0.2.7
  │   └── rimraf@1.0.9
  ├─┬ istanbul@0.1.22
  │ ├── abbrev@1.0.4
  │ ├── async@0.1.22
  │ ├─┬ escodegen@0.0.22
  │ │ ├── esprima@1.0.3
  │ │ ├── estraverse@0.0.4
  │ │ └─┬ source-map@0.1.22
  │ │   └── amdefine@0.0.5
  │ ├── esprima@0.9.9
  │ ├── fileset@0.1.5
  │ ├─┬ handlebars@1.0.11
  │ │ └── uglify-js@1.2.6
  │ ├── mkdirp@0.3.5
  │ ├── nopt@2.0.0
  │ ├── which@1.0.5
  │ └── wordwrap@0.0.2
  ├─┬ LiveScript@1.0.1
  │ └── prelude-ls@1.0.0
  ├── lodash@1.1.1
  ├─┬ log4js@0.6.5
  │ ├── async@0.1.15
  │ ├── dequeue@1.0.3
  │ ├── readable-stream@1.0.2
  │ └── semver@1.1.4
  ├── mime@1.2.9
  ├─┬ minimatch@0.2.12
  │ ├── lru-cache@2.3.0
  │ └── sigmund@1.0.0
  ├─┬ optimist@0.3.5
  │ └── wordwrap@0.0.2
  ├── pause@0.0.1
  ├── q@0.9.4
  ├─┬ rimraf@2.1.4
  │ └── graceful-fs@1.2.1
  ├─┬ socket.io@0.9.14
  │ ├── base64id@0.1.0
  │ ├── policyfile@0.0.4
  │ ├── redis@0.7.3
  │ └─┬ socket.io-client@0.9.11
  │   ├─┬ active-x-obfuscator@0.0.1
  │   │ └── zeparser@0.0.5
  │   ├── uglify-js@1.2.5
  │   ├─┬ ws@0.4.25
  │   │ ├── commander@0.6.1
  │   │ ├── options@0.0.5
  │   │ └── tinycolor@0.0.1
  │   └── xmlhttprequest@1.4.2
  └── xmlbuilder@0.4.2

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 5, 2013

i still have the warnings :
npm WARN package.json growl@1.7.0 No repository field.
npm WARN package.json dateformat@1.0.2-1.2.3 No repository field.
npm WARN package.json assert-plus@0.1.2 No repository field.
npm WARN package.json ctype@0.5.2 No repository field.

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 5, 2013

Hum ! istanbul@0.1.40 , karma@0.8.6 in the global scope

@xolvio
Copy link
Collaborator

xolvio commented Jul 5, 2013

aha! I have istanbul@0.1.39
try removing 0.1.40 and replacing with this

On Fri, Jul 5, 2013 at 12:51 AM, Laurent Roger notifications@github.comwrote:

Hum ! istanbul@0.1.40 , karma@0.8.6 in the global scope


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-20505278
.

@lc3t35
Copy link
Contributor Author

lc3t35 commented Jul 5, 2013

using specific npm installation with version :

npm i -g karma@0.8.5 phantomjs@1.9.0-0 selenium-webdriver grunt-cli jasmine-node istanbul@0.1.39

evrything is working fine, no error, 100% coverage :)

Thank you

@lc3t35 lc3t35 closed this as completed Jul 5, 2013
@xolvio
Copy link
Collaborator

xolvio commented Jul 5, 2013

Excellent, thank you very much for your help. I'm updating the instructions to fix those versions

@Zev23
Copy link

Zev23 commented Jul 5, 2013

Did fresh install a few times (rm -rf real-...)
Still the same problem on linux after getting all the latest RTD and example app, and npm the exact package version.
I also modified the 'chrome' -> 'Chrome' in test/acceptance/leaderboard.spec.js.
And adding a 'return build;' in Gruntfile.js. This solve the problem of creating mirror_appundefined folder in the build folder.

var getInstrumentedCodeString = function (excludesArray) {
var build = '';
for (var i = 0; i < excludesArray.length; i += 1) {
build += ' -x "' + excludesArray[i] + '"';
}
return build; //added here
};

@xolvio
Copy link
Collaborator

xolvio commented Jul 5, 2013

oops! thanks for the build thing!

Did you remove your existing global istanbul package first? What does npm ls -g say re istanbul version?

@wenzowski
Copy link

After doing a complete environment reset

$ nvm uninstall 0.10 && nvm install 0.10
$ npm i -g karma@0.8.5 phantomjs@1.9.1-0 selenium-webdriver grunt-cli jasmine-node istanbul
$ git clone git@github.com:xolvio/real-time-development-with-meteor.git
$ cd real-time-development-with-meteor && git submodule update --init
$ cd test/rtd && npm i

Everything works as expected.

I'd say that perhaps karma@0.8.6 alone is the culprit. Testing that now.

@xolvio
Copy link
Collaborator

xolvio commented Jul 5, 2013

I've managed to repeat this locally. So it seems the problem is in the unit test coverage reports being posted to the mirror app that is causing the problem.

If you go to localhost:8000/coverage before the unit tests are posted, it works. This means the middleware is ok. Moreover, if I try to post coverage reports from a last-known-good-version to the mirror app, that also works. It's only when posting new unit coverage reports, which also leads me to think it's something to do with karma.. but what?! Grrrr this one is annoying me!

@stou
Copy link

stou commented Jul 5, 2013

I tried using:
npm i -g karma@0.8.5 phantomjs@1.9.0-0 selenium-webdriver grunt-cli jasmine-node istanbul@0.1.39

Unit tests and acceptance tests runs but stalls on coverage tests

I can confirm the issue with accessing localhost:8000/coverage.
before running the test suite, I get at nice report. After running the suilte, the response is like this:

[stou$ real-time-development-with-meteor]$ curl -D headers.txt localhost:8000/coverage
Unexpected error.[stou$ real-time-development-with-meteor]$ cat headers.txt
HTTP/1.1 503 Service Unavailable
Content-Type: text/plain
Date: Fri, 05 Jul 2013 20:03:46 GMT
Connection: keep-alive
Transfer-Encoding: chunked

[stou$ real-time-development-with-meteor]$

By the way I am running Mac OS X 10.7.5, but does not seem to make much difference

@Zev23
Copy link

Zev23 commented Jul 7, 2013

Finally gets the example to run properly in Ubuntu Linux 12.04-2.

Need to set the DISPLAY in system environment.
export DISPLAY=:0

To use chrome. Must install google-chrome, not chromium.

@samhatoum
Copy link
Member

Thanks for reporting back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants