Strider-CD / strider

Open Source Continuous Integration & Deployment Server
http://strider-cd.github.io/
4.59k stars 432 forks source link

cannot read property 'body' of undefined #613

Closed hans-d closed 9 years ago

hans-d commented 9 years ago

Strider is giving some issues (both latest fetch from github and 1.50).

[browser] --> [ haproxy:8000] -- (haproxy mapping) --> [ localhost:49xxx] -- (docker mapping) --> [ container:3000]

I can login, but as soon I switch to projects / want to add a project: server side:

22 Oct 13:06:19 - info: Fetching projects...

TypeError: Cannot read property 'body' of undefined
    at Request._callback (/usr/local/lib/node_modules/strider/node_modules/strider-gitlab/lib/api.js:28:26)
    at self.callback (/usr/local/lib/node_modules/strider/node_modules/strider-gitlab/node_modules/request/request.js:129:22)
    at Request.emit (events.js:95:17)
    at ClientRequest.self.clientErrorHandler (/usr/local/lib/node_modules/strider/node_modules/strider-gitlab/node_modules/request/request.js:239:10)
    at ClientRequest.emit (events.js:95:17)
    at Socket.socketErrorListener (http.js:1551:9)
    at Socket.emit (events.js:95:17)
    at net.js:440:14
    at process._tickCallback (node.js:419:13)

And already before that, sometimes also during this request: browser side a javascript error (socket.io related): Error during websocket handshake

kfatehi commented 9 years ago

@hans-d Ok so the stack trace looks like something you can discover more about by investigating what's going on around /usr/local/lib/node_modules/strider/node_modules/strider-gitlab/lib/api.js -- it could be a problem with strider-gitlab. I would check to see what version of that you've got. I remember I had issues with the strider-gitlab plugin myself -- I was in a hurry and stopped using it, instead switching to github.

The strider-gitlab plugin does have a PR sitting on it which i am considering the project's HEAD https://github.com/meric426/strider-gitlab/pull/9 however it is untested... you could try replacing yours with it and see if it solves the issue.

Just right off the bat I would think that, if it isn't the plugin's fault, it may be the SERVER_NAME env var isn't set correctly, that's the most common source of integration failure w/ Strider external provider plugins.

In case you didn't already know, you can use nsenter to put your shell into the context of your running docker container and poke around and find out what's going on.

Ok now as far as the websocket stuff -- I did try to use haproxy in front of my Strider for some time and I never managed to get the websocket issues to go away, no matter how many permutations of the configs I tried and however much research I applied to the problem. I am now using node-http-proxy instead and everything's fine.

I'm closing this issue because it's really 2 separate issues, but feel free to continue our discussion here or create new issues for the separate issues.