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

ERROR: ReferenceError: robot is not defined #13

Closed
StubbsPKS opened this issue Jun 8, 2016 · 8 comments
Closed

ERROR: ReferenceError: robot is not defined #13

StubbsPKS opened this issue Jun 8, 2016 · 8 comments
Labels

Comments

@StubbsPKS
Copy link

I am using hubot with Hipchat, and I am attempting to set up DYNAMIC mode. Sadly, any time I interact with the plugin, the follow error appears in my bot's console:

[Wed Jun 08 2016 12:16:19 GMT-0400 (EDT)] ERROR ReferenceError: robot is not defined
  at getGroups (/home/mmiehling/hubot/node_modules/hubot-group-alias/src/alias.coffee:51:15, <js>:39:17)
  at TextListener.callback (/home/mmiehling/hubot/node_modules/hubot-group-alias/src/alias.coffee:125:14, <js>:141:16)
  at executeListener (/home/mmiehling/hubot/node_modules/hubot/src/listener.coffee:65:11, <js>:53:19)
  at allDone (/home/mmiehling/hubot/node_modules/hubot/src/middleware.coffee:44:37, <js>:34:16)
  at /home/mmiehling/hubot/node_modules/async/lib/async.js:274:13
  at Object.async.eachSeries (/home/mmiehling/hubot/node_modules/async/lib/async.js:142:20)
  at Object.async.reduce (/home/mmiehling/hubot/node_modules/async/lib/async.js:268:15)
  at /home/mmiehling/hubot/node_modules/hubot/src/middleware.coffee:49:7, <js>:37:22
  at process._tickCallback (node.js:448:13)

The relevant parts from the script that starts my bot are:

# Alias
export HUBOT_GROUP_ALIAS='DYNAMIC'
export HUBOT_GROUP_ALIAS_NAME_PROP="mention_name"

Here is a sample interaction with Andrew, the hubot.

[1:50pm] MatM: @andrew who has it role?
[1:50 PM] Andrew: @MatM The following people have the 'it' role: NetworkGuy, MatM
[1:50 PM] MatM: @it hey
cat package.json 
{
  "name": "Andrew",
  "version": "0.0.0",
  "private": true,
  "author": "[email protected]",
  "description": "A simple robot designed to aid users with Hipchat",
  "dependencies": {
    "hubot": "^2.18.0",
    "hubot-auth": "^1.2.0",
    "hubot-daily-update": "^1.1.1",
    "hubot-diagnostics": "0.0.1",
    "hubot-google-images": "^0.2.6",
    "hubot-google-translate": "^0.2.0",
    "hubot-group-alias": "^2.1.3",
    "hubot-help": "^0.1.3",
    "hubot-hipchat": "^2.12.0-6",
    "hubot-maps": "0.0.2",
    "hubot-pugme": "^0.1.0",
    "hubot-redis-brain": "0.0.3",
    "hubot-rules": "^0.1.1",
    "hubot-scripts": "^2.16.2",
    "hubot-shipit": "^0.2.0",
    "hubot-standup-alarm": "0.0.7",
    "hubot-thecat": "^1.0.1"
  },
  "engines": {
    "node": "0.10.x"
  }
}

cat external-scripts.json 
[
  "hubot-diagnostics",
  "hubot-help",
  "hubot-google-images",
  "hubot-google-translate",
  "hubot-pugme",
  "hubot-maps",
  "hubot-redis-brain",
  "hubot-rules",
  "hubot-auth",
  "hubot-standup-alarm",
  "hubot-daily-update",
  "hubot-shipit",
  "hubot-group-alias",
  "hubot-thecat"
]

I'm not sure if I've simply misunderstood the setup instructions for dynamic with hubot-group-alias or if I've hit a bug. Please let me know what other information you need from me and I'll provide it ASAP.

@VijiGithub
Copy link

hi ,

i am also facingthe same issue. may i know whether you got any solution for it.

@cycomachead
Copy link
Owner

Sorry I missed this!

There is definitely a bug, I'll push a fix later today.

@cycomachead cycomachead added the bug label Sep 7, 2016
@VijiGithub
Copy link

Hey Michael,

Glad to hear from you.Let me know when can we get this fixed.

Thanks,
Viji

From: Michael Ball [mailto:[email protected]]
Sent: Thursday, September 08, 2016 12:50 AM
To: cycomachead/hubot-group-alias [email protected]
Cc: konar, VIJAYALAKSHMI (Cognizant) [email protected]; Comment [email protected]
Subject: Re: [cycomachead/hubot-group-alias] ERROR: ReferenceError: robot is not defined (#13)

Sorry I missed this!

There is definitely a bug, I'll push a fix later today.


You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/13#issuecomment-245387413, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AURW9YicthlGjiYDRadC-p2aqltzMI0lks5qnw5KgaJpZM4IxO_V.

This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.

@cycomachead
Copy link
Owner

I just pushed a fix and released 2.2.0 on npm. Try that.

To be honest, I'm not exactly sure why things are working for me in my test setup because I feel like this should have never been working. I'll close this issue after I hear that things are working.

@StubbsPKS
Copy link
Author

Using 2.2.1 and still having this issue.

@cycomachead
Copy link
Owner

Can you share the stack trace?

Sorry I think I noticed this error, but I want to be sure it's the right one.

@StubbsPKS
Copy link
Author

Can you share the stack trace?

Whoops, not sure how I missed your reply sorry about the delay.

[Mon Jan 23 2017 12:12:48 GMT-0500 (EST)] ERROR ReferenceError: robot is not defined
  at userFromName (/opt/hubot/node_modules/hubot-group-alias/src/alias.coffee:75:14)
  at arrayMap (/opt/hubot/node_modules/lodash/index.js:1406:25)
  at Function.map (/opt/hubot/node_modules/lodash/index.js:6710:14)
  at getGroups (/opt/hubot/node_modules/hubot-group-alias/src/alias.coffee:56:16)
  at TextListener.callback (/opt/hubot/node_modules/hubot-group-alias/src/alias.coffee:125:14)
  at /opt/hubot/node_modules/hubot/src/listener.coffee:65:12
  at allDone (/opt/hubot/node_modules/hubot/src/middleware.coffee:44:37)
  at /opt/hubot/node_modules/async/lib/async.js:274:13
  at Object.async.eachSeries (/opt/hubot/node_modules/async/lib/async.js:142:20)
  at Object.async.reduce (/opt/hubot/node_modules/async/lib/async.js:268:15)
  at /opt/hubot/node_modules/hubot/src/middleware.coffee:49:13
  at nextTickCallbackWith0Args (node.js:420:9)
  at process._tickCallback (node.js:349:13)

@cycomachead
Copy link
Owner

Sorry for the delay! ☹️ I got a bit swamped with work and life, but I just pushed 2.2.2 to npm, which should hopefully fix this case.

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

3 participants