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

Cannot read property 'commands' of undefined #768

Open
oliversalzburg opened this issue May 2, 2015 · 16 comments
Open

Cannot read property 'commands' of undefined #768

oliversalzburg opened this issue May 2, 2015 · 16 comments
Assignees
Labels

Comments

@oliversalzburg
Copy link
Member

I get a lot of Cannot read property 'commands' of undefined errors during a run.

@knownasilya
Copy link
Member

Is this during rebases

@oliversalzburg
Copy link
Member Author

No, I wasn't rebasing. This was a fresh setup of Strider in combination with GitLab.

@knownasilya
Copy link
Member

Do you have a callstack? Would like to know which phase is triggering the error.

@oliversalzburg
Copy link
Member Author

@knownasilya I don't seem to be able to repro right now. It happened in a fresh installation.

I'm only seeing this right now, but it's probably a different issue:

@oliversalzburg
Copy link
Member Author

Seems like ensureCommand is missing semicolons btw.

@knownasilya
Copy link
Member

@oliversalzburg most of the code is not following a specific style guide. I've been slowly following the airbnb guide as I make changes. Eventually I want to setup eslint and fix all the code O.O

@oliversalzburg
Copy link
Member Author

Yeah, sorry for not collecting more useful information when the error happens.

Whenever I set up a fresh Strider instance, I seem to be running into all kinds of weird issues that resolve themselves shortly after. In those situations I'm usually under a lot of time pressure and am battling with multiple issues.

If it happens again, I'll make sure to capture more useful information.

@knownasilya
Copy link
Member

@oliversalzburg can you walk me through how you setup gitlab with Strider (I don't use gitlab and the plugin is a little raw - adds to huge todo list)?

@oliversalzburg
Copy link
Member Author

@knownasilya I can try and reproduce this later at home, but it was a process involving a lot of trial-and-error. I'm not sure if I'll remember making the same mistakes again ;D

@oliversalzburg
Copy link
Member Author

@knownasilya So, I'm trying to reproduce this, but I'm running into Strider-CD/strider-gitlab#8 for now. I'll see if I can find the root of that one.

@oliversalzburg
Copy link
Member Author

Alright, I got two more call stacks for the same error after setting up a fresh strider instance on my Windows desktop.

The git clone failed here, because I neglected to add the strider SSH key to GitLab though. But maybe this is already helping:

@oliversalzburg
Copy link
Member Author

So, this is what I did (originally, I used our on-premise GitLab, but I would assume the public gitlab.com works just as well):

  1. Clone strider git clone [email protected]:Strider-CD/strider.git
  2. npm install
  3. bower install
  4. Set SERVER_NAME environment variable (http://localhost:3000)
  5. Add initial user node .bin/strider addUser
  6. Start strider node .bin/strider
  7. Log into strider
  8. Add GitLab account to my strider account
  9. Add a project from Gitlab to strider
    • Set it as a nodejs project
  10. Configure the project
    • Set node_modules caching to strict
  11. Deploy project

@knownasilya
Copy link
Member

@oliversalzburg awesome! Thanks for hanging in there. This will make it much easier to debug.

@knownasilya knownasilya self-assigned this May 5, 2015
@knownasilya knownasilya modified the milestone: v1.7.0 May 5, 2015
@oliversalzburg
Copy link
Member Author

I'm experiencing a similar issue right now that feels related.

I have set up all our projects fresh. When there are no builds running, I go to the project configuration and click Retest & Deploy, which sends me to the build page.

I have placed a breakpoint in the command.done handler of JobDataMonitor.prototype.statuses. Here, this.phase is undefined:

The full async stack trace is:

JobDataMonitor.statuses._.extend.command.done (app.js:2729)
JobMonitor.update (app.js:2822)
Emitter.emit (app.js:46010)
Socket.onevent (app.js:45554)
Socket.onpacket (app.js:45512)
module.exports (app.js:45872)
Emitter.emit (app.js:46010)
Manager.ondecoded (app.js:45070)
module.exports (app.js:45872)
Emitter.emit (app.js:46010)
Decoder.add (app.js:50621)
Manager.ondata (app.js:45060)
module.exports (app.js:45872)
Emitter.emit (app.js:46010)
Socket.onPacket (app.js:46628)
(anonymous function) (app.js:46446)
Emitter.emit (app.js:46010)
Transport.onPacket (app.js:47053)
Polling.onData.callback (app.js:47893)
(anonymous function) (app.js:49336)
exports.decodePayloadAsBinary (app.js:49335)
exports.decodePayload (app.js:49103)
Polling.onData (app.js:47897)
(anonymous function) (app.js:47481)
Emitter.emit (app.js:46010)
Request.onData (app.js:47629)
Request.onLoad (app.js:47700)
Request.create.xhr.onreadystatechange (app.js:47582)
XMLHttpRequest.send (async)
Request.create (app.js:47594)
Request (app.js:47517)
XHR.request (app.js:47448)
XHR.doPoll (app.js:47478)
Polling.poll (app.js:47867)
Polling.onData (app.js:47906)
(anonymous function) (app.js:47481)
Emitter.emit (app.js:46010)
Request.onData (app.js:47629)
Request.onLoad (app.js:47700)
Request.create.xhr.onreadystatechange (app.js:47582)
XMLHttpRequest.send (async)
Request.create (app.js:47594)
Request (app.js:47517)
XHR.request (app.js:47448)
XHR.doPoll (app.js:47478)
Polling.poll (app.js:47867)
Polling.doOpen (app.js:47811)
Transport.open (app.js:46988)
Socket.open (app.js:46418)
Socket (app.js:46300)
Socket (app.js:46235)
Manager.open.Manager.connect (app.js:44974)
Manager (app.js:44832)
Manager (app.js:44802)
lookup (app.js:44735)
module.exports (app.js:1817)
invoke (app.js:8253)
instantiate (app.js:8264)
$get (app.js:11561)
link (app.js:4266)
nodeLinkFn (app.js:10991)
compositeLinkFn (app.js:10385)
publicLinkFn (app.js:10281)
$get.boundTranscludeFn (app.js:10405)
controllersBoundTransclude (app.js:11012)
update (app.js:4224)
$get.Scope.$broadcast (app.js:17239)
(anonymous function) (app.js:3905)
deferred.promise.then.wrappedCallback (app.js:15848)
deferred.promise.then.wrappedCallback (app.js:15848)
(anonymous function) (app.js:15934)
$get.Scope.$eval (app.js:16960)
$get.Scope.$digest (app.js:16772)
$get.Scope.$apply (app.js:17064)
(anonymous function) (app.js:5734)
invoke (app.js:8253)
doBootstrap (app.js:5732)
bootstrap (app.js:5746)
angularInit (app.js:5655)
(anonymous function) (app.js:26236)
jQuery.Callbacks.fire (app.js:30682)
jQuery.Callbacks.self.fireWith (app.js:30794)
jQuery.extend.ready (app.js:31006)
completed (app.js:31037)

@oliversalzburg
Copy link
Member Author

I can, however, not repro this issue at will. Partly due to #785

@oliversalzburg
Copy link
Member Author

If I wait long enough I get a ton of these though. Here's more:

These all seem related and look like race conditions to me. I can't even tell where std is set on the job monitor.

@knownasilya knownasilya removed this from the v1.8.0 milestone Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants