github / janky

Continuous integration server built on top of Jenkins and Hubot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Object #<Object> has no method 'request'

gregholland opened this issue · comments

I've been following the tutorial to setup Janky word for word. Hubot with Campfire is working correctly, (ping -> pong) and the Janky Hubot Bi Directional logo shows up when I try to access my Janky Heroku app through the browser. I have installed the janky.coffee plugin, however when I try hubot ci with any command, I do not get any response from Hubot.

This is the output from heroku logs

Gregs-MacBook-Pro:hubot greg$ heroku logs
2013-03-01T20:13:45+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/hubot-scripts/src/scripts/9gag.coffee:48:4)
2013-03-01T20:13:45+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2013-03-01T20:13:45+00:00 app[web.1]:     at Module._compile (module.js:449:26)
2013-03-01T20:13:45+00:00 app[web.1]:     at Module.load (module.js:356:32)
2013-03-01T20:13:45+00:00 app[web.1]:     at Function.Module._load (module.js:312:12)
2013-03-01T20:13:45+00:00 app[web.1]:     at Object.require.extensions..coffee (/app/node_modules/hubot/node_modules/coffee-script/lib/coffee-script/coffee-script.js:30:21)
2013-03-01T20:13:45+00:00 app[web.1]: Error: Cannot find module 'soupselect'
2013-03-01T20:13:45+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2013-03-01T20:13:45+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/hubot-scripts/src/scripts/9gag.coffee:48:4)
2013-03-01T20:13:45+00:00 app[web.1]:     at Module.require (module.js:362:17)
2013-03-01T20:13:45+00:00 app[web.1]:     at require (module.js:378:17)
2013-03-01T20:13:45+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/hubot-scripts/src/scripts/9gag.coffee:4:12)
2013-03-01T20:13:45+00:00 app[web.1]: [Fri Mar 01 2013 20:13:45 GMT+0000 (UTC)] ERROR Unable to load /app/node_modules/hubot-scripts/src/scripts/9gag: Error: Cannot find module 'soupselect'
2013-03-01T20:13:45+00:00 app[web.1]:     at Object.require.extensions..coffee (/app/node_modules/hubot/node_modules/coffee-script/lib/coffee-script/coffee-script.js:30:21)
2013-03-01T20:13:45+00:00 app[web.1]:     at Module.load (module.js:356:32)
2013-03-01T20:13:45+00:00 app[web.1]:     at Module._compile (module.js:449:26)
2013-03-01T20:13:45+00:00 app[web.1]:     at Function.Module._load (module.js:312:12)
2013-03-01T20:13:45+00:00 app[web.1]: [Fri Mar 01 2013 20:13:45 GMT+0000 (UTC)] INFO /app/node_modules/hubot-scripts/src/scripts/beerme.coffee is using deprecated documentation syntax
2013-03-01T20:13:45+00:00 heroku[web.1]: State changed from starting to up
2013-03-01T20:13:46+00:00 heroku[web.1]: Process exited with status 0
2013-03-01T20:23:33+00:00 heroku[slugc]: Slug compilation started
2013-03-01T20:23:54+00:00 heroku[api]: Release v20 created by greg.holland@lightmaker.com
2013-03-01T20:23:54+00:00 heroku[api]: Deploy b5cb0a6 by greg.holland@lightmaker.com
2013-03-01T20:23:54+00:00 heroku[web.1]: State changed from up to starting
2013-03-01T20:23:55+00:00 heroku[slugc]: Slug compilation finished
2013-03-01T20:23:55+00:00 heroku[web.1]: Starting process with command `bin/hubot -a campfire -n Hubot`
2013-03-01T20:23:56+00:00 app[web.1]: bin/hubot: 3: npm: not found
2013-03-01T20:23:58+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2013-03-01T20:23:58+00:00 heroku[web.1]: State changed from starting to up
2013-03-01T20:24:00+00:00 heroku[web.1]: Process exited with status 0
2013-03-01T20:24:50+00:00 app[web.1]: { host: 'http',
2013-03-01T20:24:50+00:00 app[web.1]:   headers: { Authorization: 'Basic MW50ZXJuZXR6' } }
2013-03-01T20:24:50+00:00 app[web.1]:   path: '//guarded-fortress-2958.herokuapp.com/_hubot/help',
2013-03-01T20:24:50+00:00 app[web.1]:   port: 80,
2013-03-01T20:24:50+00:00 app[web.1]: TypeError: Object #<Object> has no method 'request'
2013-03-01T20:24:50+00:00 app[web.1]:     at TextListener.Listener.call (/app/node_modules/hubot/src/listener.coffee:19:14)
2013-03-01T20:24:50+00:00 app[web.1]:     at Robot.receive (/app/node_modules/hubot/src/robot.coffee:105:33)
2013-03-01T20:24:50+00:00 app[web.1]:     at get (/app/scripts/janky.coffee:28:16)
2013-03-01T20:24:50+00:00 app[web.1]:     at TextListener.module.exports.robot.respond.app [as callback] (/app/scripts/janky.coffee:80:14)
2013-03-01T20:24:50+00:00 app[web.1]:     at Campfire.Adapter.receive (/app/node_modules/hubot/src/adapter.coffee:37:25)
2013-03-01T20:24:50+00:00 app[web.1]: [Fri Mar 01 2013 20:24:50 GMT+0000 (UTC)] ERROR Unable to call the listener: TypeError: Object #<Object> has no method 'request'
2013-03-01T20:24:50+00:00 app[web.1]:     at IncomingMessage.EventEmitter.emit (events.js:126:20)
2013-03-01T20:24:50+00:00 app[web.1]:     at Campfire.run.bot.Me.bot.info (/app/node_modules/hubot/src/adapters/campfire.coffee:83:23)
2013-03-01T20:24:50+00:00 app[web.1]:     at IncomingMessage.CampfireStreaming.request (/app/node_modules/hubot/src/adapters/campfire.coffee:326:20)
2013-03-01T20:24:50+00:00 app[web.1]:     at IncomingMessage._emitEnd (http.js:366:10)
2013-03-01T20:24:50+00:00 app[web.1]:     at TextListener.Listener.call (/app/node_modules/hubot/src/listener.coffee:19:14)
2013-03-01T20:24:50+00:00 app[web.1]:   port: 80,
2013-03-01T20:24:50+00:00 app[web.1]:     at Campfire.run.withAuthor (/app/node_modules/hubot/src/adapters/campfire.coffee:76:22)
2013-03-01T20:24:50+00:00 app[web.1]:   path: '//guarded-fortress-2958.herokuapp.com/_hubot/help',
2013-03-01T20:24:50+00:00 app[web.1]:     at TextListener.module.exports.robot.respond.app [as callback] (/app/node_modules/hubot-scripts/src/scripts/janky.coffee:80:14)
2013-03-01T20:24:50+00:00 app[web.1]:     at Campfire.Adapter.receive (/app/node_modules/hubot/src/adapter.coffee:37:25)
2013-03-01T20:24:50+00:00 app[web.1]:     at Campfire.run.withAuthor (/app/node_modules/hubot/src/adapters/campfire.coffee:76:22)
2013-03-01T20:24:50+00:00 app[web.1]: { host: 'http',
2013-03-01T20:24:50+00:00 app[web.1]: TypeError: Object #<Object> has no method 'request'
2013-03-01T20:24:50+00:00 app[web.1]: [Fri Mar 01 2013 20:24:50 GMT+0000 (UTC)] ERROR Unable to call the listener: TypeError: Object #<Object> has no method 'request'
2013-03-01T20:24:50+00:00 app[web.1]:     at Robot.receive (/app/node_modules/hubot/src/robot.coffee:105:33)
2013-03-01T20:24:50+00:00 app[web.1]:   headers: { Authorization: 'Basic MW50ZXJuZXR6' } }
2013-03-01T20:24:50+00:00 app[web.1]:     at get (/app/node_modules/hubot-scripts/src/scripts/janky.coffee:28:16)
2013-03-01T20:24:50+00:00 app[web.1]:     at Campfire.run.bot.Me.bot.info (/app/node_modules/hubot/src/adapters/campfire.coffee:83:23)
2013-03-01T20:24:50+00:00 app[web.1]:     at IncomingMessage.CampfireStreaming.request (/app/node_modules/hubot/src/adapters/campfire.coffee:326:20)
2013-03-01T20:24:50+00:00 app[web.1]:     at IncomingMessage.EventEmitter.emit (events.js:126:20)
2013-03-01T20:24:50+00:00 app[web.1]:     at IncomingMessage._emitEnd (http.js:366:10)
2013-03-01T20:24:58+00:00 app[web.1]:   headers: { Authorization: 'Basic MW50ZXJuZXR6' } }
2013-03-01T20:24:58+00:00 app[web.1]: [Fri Mar 01 2013 20:24:58 GMT+0000 (UTC)] ERROR Unable to call the listener: TypeError: Object #<Object> has no method 'request'
2013-03-01T20:24:58+00:00 app[web.1]:   path: '//guarded-fortress-2958.herokuapp.com/_hubot/rooms',
2013-03-01T20:24:58+00:00 app[web.1]: { host: 'http',
2013-03-01T20:24:58+00:00 app[web.1]:   port: 80,
2013-03-01T20:24:58+00:00 app[web.1]: TypeError: Object #<Object> has no method 'request'
2013-03-01T20:24:58+00:00 app[web.1]:     at TextListener.Listener.call (/app/node_modules/hubot/src/listener.coffee:19:14)
2013-03-01T20:24:58+00:00 app[web.1]:     at TextListener.module.exports.robot.respond.app [as callback] (/app/scripts/janky.coffee:147:14)
2013-03-01T20:24:58+00:00 app[web.1]:     at Campfire.Adapter.receive (/app/node_modules/hubot/src/adapter.coffee:37:25)
2013-03-01T20:24:58+00:00 app[web.1]:     at Robot.receive (/app/node_modules/hubot/src/robot.coffee:105:33)
2013-03-01T20:24:58+00:00 app[web.1]:     at IncomingMessage.EventEmitter.emit (events.js:126:20)
2013-03-01T20:24:58+00:00 app[web.1]:     at IncomingMessage.CampfireStreaming.request (/app/node_modules/hubot/src/adapters/campfire.coffee:326:20)
2013-03-01T20:24:58+00:00 app[web.1]:     at IncomingMessage._emitEnd (http.js:366:10)
2013-03-01T20:24:58+00:00 app[web.1]:     at get (/app/scripts/janky.coffee:28:16)
2013-03-01T20:24:58+00:00 app[web.1]:     at Campfire.run.withAuthor (/app/node_modules/hubot/src/adapters/campfire.coffee:76:22)
2013-03-01T20:24:58+00:00 app[web.1]:     at TextListener.Listener.call (/app/node_modules/hubot/src/listener.coffee:19:14)
2013-03-01T20:24:58+00:00 app[web.1]:     at Campfire.Adapter.receive (/app/node_modules/hubot/src/adapter.coffee:37:25)
2013-03-01T20:24:58+00:00 app[web.1]:   path: '//guarded-fortress-2958.herokuapp.com/_hubot/rooms',
2013-03-01T20:24:58+00:00 app[web.1]:     at Campfire.run.bot.Me.bot.info (/app/node_modules/hubot/src/adapters/campfire.coffee:83:23)
2013-03-01T20:24:58+00:00 app[web.1]:   headers: { Authorization: 'Basic MW50ZXJuZXR6' } }
2013-03-01T20:24:58+00:00 app[web.1]:     at Campfire.run.bot.Me.bot.info (/app/node_modules/hubot/src/adapters/campfire.coffee:83:23)
2013-03-01T20:24:58+00:00 app[web.1]:   port: 80,
2013-03-01T20:24:58+00:00 app[web.1]: [Fri Mar 01 2013 20:24:58 GMT+0000 (UTC)] ERROR Unable to call the listener: TypeError: Object #<Object> has no method 'request'
2013-03-01T20:24:58+00:00 app[web.1]:     at Campfire.run.withAuthor (/app/node_modules/hubot/src/adapters/campfire.coffee:76:22)
2013-03-01T20:24:58+00:00 app[web.1]:     at IncomingMessage.EventEmitter.emit (events.js:126:20)
2013-03-01T20:24:58+00:00 app[web.1]:     at IncomingMessage._emitEnd (http.js:366:10)
2013-03-01T20:24:58+00:00 app[web.1]: TypeError: Object #<Object> has no method 'request'
2013-03-01T20:24:58+00:00 app[web.1]:     at Robot.receive (/app/node_modules/hubot/src/robot.coffee:105:33)
2013-03-01T20:24:58+00:00 app[web.1]:     at IncomingMessage.CampfireStreaming.request (/app/node_modules/hubot/src/adapters/campfire.coffee:326:20)
2013-03-01T20:24:58+00:00 app[web.1]: { host: 'http',
2013-03-01T20:24:58+00:00 app[web.1]:     at get (/app/node_modules/hubot-scripts/src/scripts/janky.coffee:28:16)
2013-03-01T20:24:58+00:00 app[web.1]:     at TextListener.module.exports.robot.respond.app [as callback] (/app/node_modules/hubot-scripts/src/scripts/janky.coffee:147:14)
2013-03-01T20:25:49+00:00 heroku[web.1]: State changed from up to starting
2013-03-01T20:25:50+00:00 heroku[web.1]: Starting process with command `bin/hubot -a campfire -n Hubot`
2013-03-01T20:25:51+00:00 app[web.1]: bin/hubot: 3: npm: not found
2013-03-01T20:25:52+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2013-03-01T20:25:53+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2013-03-01T20:25:53+00:00 heroku[web.1]: State changed from starting to up
2013-03-01T20:25:54+00:00 heroku[web.1]: Process exited with status 0

Your 9gag.coffee script is missing dependencies. Try removing it from hubot-scripts.json.

I don't believe that is the issue. I just did a new clean, working install of Hubot, and when i run any hubot ci command this is what I get:

2013-03-01T22:02:21+00:00 app[web.1]:   path: '//myapp.herokuapp.com/_hubot/help',
2013-03-01T22:02:21+00:00 app[web.1]:   headers: { Authorization: 'Basic MW50ZXJuZXR6' } }
2013-03-01T22:02:21+00:00 app[web.1]: [Fri Mar 01 2013 22:02:21 GMT+0000 (UTC)] ERROR Unable to call the listener: TypeError: Object #<Object> has no method 'request'
2013-03-01T22:02:21+00:00 app[web.1]: TypeError: Object #<Object> has no method 'request'
2013-03-01T22:02:21+00:00 app[web.1]:     at get (/app/node_modules/hubot-scripts/src/scripts/janky.coffee:28:16)
2013-03-01T22:02:21+00:00 app[web.1]:     at TextListener.module.exports.robot.respond.app [as callback] (/app/node_modules/hubot-scripts/src/scripts/janky.coffee:80:14)
2013-03-01T22:02:21+00:00 app[web.1]:     at TextListener.Listener.call (/app/node_modules/hubot/src/listener.coffee:19:14)
2013-03-01T22:02:21+00:00 app[web.1]:     at Robot.receive (/app/node_modules/hubot/src/robot.coffee:105:33)
2013-03-01T22:02:21+00:00 app[web.1]:     at Campfire.Adapter.receive (/app/node_modules/hubot/src/adapter.coffee:37:25)
2013-03-01T22:02:21+00:00 app[web.1]:     at Campfire.run.bot.Me.bot.info (/app/node_modules/hubot/src/adapters/campfire.coffee:83:23)
2013-03-01T22:02:21+00:00 app[web.1]:     at Campfire.run.withAuthor (/app/node_modules/hubot/src/adapters/campfire.coffee:76:22)
2013-03-01T22:02:21+00:00 app[web.1]:     at IncomingMessage.CampfireStreaming.request (/app/node_modules/hubot/src/adapters/campfire.coffee:326:20)
2013-03-01T22:02:21+00:00 app[web.1]:     at IncomingMessage.EventEmitter.emit (events.js:126:20)
2013-03-01T22:02:21+00:00 app[web.1]:     at IncomingMessage._emitEnd (http.js:366:10)

Can you try grabbing the latest janky.coffee from the hubot-scripts repo instead of adding it to hubot-scripts.json?

Also, what version of node are you running?

I removed it from hubot-scripts.json and manually added the raw janky.coffee and pushed up to Heroku, which according to the git log is running the following:

Using Node.js version: 0.8.21
Using npm version: 1.1.65

The same error posted above is still happening when I run a hubot ci command (ping pong still works fine). I noticed an npm not found error in the log that occurred after the push:

2013-03-01T22:28:04+00:00 heroku[slugc]: Slug compilation started
2013-03-01T22:28:27+00:00 heroku[api]: Release v11 created by greg.holland@lightmaker.com
2013-03-01T22:28:27+00:00 heroku[api]: Deploy bae47ca by greg.holland@lightmaker.com
2013-03-01T22:28:27+00:00 heroku[web.1]: State changed from up to starting
2013-03-01T22:28:28+00:00 heroku[slugc]: Slug compilation finished
2013-03-01T22:28:28+00:00 heroku[web.1]: Starting process with command `bin/hubot -a campfire -n Hubot`
2013-03-01T22:28:29+00:00 app[web.1]: bin/hubot: 3: npm: not found
2013-03-01T22:28:30+00:00 heroku[web.1]: State changed from starting to up
2013-03-01T22:28:31+00:00 heroku[web.1]: Stopping all processes with SIGTERM

That's normal. heroku runs npm for you as part of their bootstrapping process.

It's kinda weird that your web process is being stopped here. We're on 0.8.11 here, I wonder if they changed the API between those versions.

I just tried with 0.8.11, no luck either :-(

Which version of hubot?

I wonder if the problem is getting the hubot master tarball. Can you
download the robot from hubot.github.com and update the package.json file
in it to the latest version of hubot on npmjs.org?

On Fri, Mar 1, 2013 at 3:46 PM, Greg Holland notifications@github.comwrote:

Today's master from: https://github.com/github/hubot/archive/master.zip


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

The package.json file that comes from NPM seems to crash the app on heroku. Hubot does work correctly for everything but Janky

FYI, I setup Hubot on AWS Ubuntu 12.04 with the same config and I couldn't replicate this issue.

Crazy. I'm gonna close this issue until we get another report or get more information about what's causing the issue.