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

HipChat adapter fails to connect with nickname with non-ASCII chars #47

Closed
1stvamp opened this issue Oct 26, 2011 · 12 comments
Closed

HipChat adapter fails to connect with nickname with non-ASCII chars #47

1stvamp opened this issue Oct 26, 2011 · 12 comments

Comments

@1stvamp
Copy link

1stvamp commented Oct 26, 2011

Using heroku config:add HUBOT_HIPCHAT_NAME='Totoro トトロ', while the name string should be unicode (both in heroku and in Node), hubot fails with the error:
2011-10-26T09:51:34+00:00 app[app.1]: Received error from HipChat: XMPP authentication failure undefined

@1stvamp
Copy link
Author

1stvamp commented Oct 26, 2011

Just to clarify, my own hipchat bot (HippyBot) connects fine with the exact same nickname, password, JID, etc.

@codafoo
Copy link

codafoo commented Oct 26, 2011

I don't think the hipchat adapter uses the hipchat name for connecting, it should be just the JID + password.

I tested with a HUBOT_HIPCHAT_NAME='Hu ボット' and it worked fine.

@tmm1
Copy link
Contributor

tmm1 commented Oct 26, 2011

This is probably an issue in the xmpp library we're using.

I assume it works correctly when the name does not contain unicode characters?

/cc @codafoo @assaf

@codafoo
Copy link

codafoo commented Oct 26, 2011

I think his error is due to an incorrect password or JID. Maybe leaving out "@chat.hipchat.com" in the JID. Just to be sure I tested myself and it worked fine locally with unicode characters.

Also, I discovered that the "Wobot" library used silently fails when connecting with the incorrect full name.

@1stvamp
Copy link
Author

1stvamp commented Oct 26, 2011

@codafoo true, it should only need the full nickname on room join.

It looks like the XMPP error I was getting was the JID, after dropping @chat.hipchat.com it's fine.

I'm now getting another error:

2011-10-26T12:36:43+00:00 app[app.1]: Successfully connected to Redis 2011-10-26T12:36:44+00:00 heroku[app.1]: State changed from starting to up 2011-10-26T12:36:46+00:00 app[app.1]: Received error from HipChat: { stack: [Getter/Setter], 2011-10-26T12:36:46+00:00 app[app.1]: arguments: undefined, 2011-10-26T12:36:46+00:00 app[app.1]: type: undefined, 2011-10-26T12:36:46+00:00 app[app.1]: message: 'ECONNREFUSED, Connection refused', 2011-10-26T12:36:46+00:00 app[app.1]: errno: 111, 2011-10-26T12:36:46+00:00 app[app.1]: code: 'ECONNREFUSED', 2011-10-26T12:36:46+00:00 app[app.1]: syscall: 'connect' } undefined

@codafoo
Copy link

codafoo commented Oct 26, 2011

Sorry if I wasn't clear, but the JID requires the "@chat.hipchat.com", perhaps double check your password?

@1stvamp
Copy link
Author

1stvamp commented Oct 26, 2011

@codafoo I actually knew this, from my own bot, without looking at the code thought maybe it got added somewhere, her der derp.

So with correct JID, and correct password, still receive undefined XMPP error.

@tmm1
Copy link
Contributor

tmm1 commented Oct 26, 2011

ECONNREFUSED seems to indicate a network issue.

@1stvamp
Copy link
Author

1stvamp commented Oct 26, 2011

@tmm1 that was just because I was trying it without the @chat.hipchat.com as misunderstood @codafoo's original suggestion.

@1stvamp
Copy link
Author

1stvamp commented Oct 26, 2011

Aha, it refused to connect unless I also added the resource to the JID, e.g. xxxx_xxxx@chat.hipchat.com/bot

@1stvamp 1stvamp closed this as completed Oct 26, 2011
@powdahound
Copy link

Our server should send back a not-acceptable "Resource is required" error in this case by the way. Would be good to show error details in the client if possible.

@assaf
Copy link
Contributor

assaf commented Oct 26, 2011

There's an onError callback that dumps the error message and stanza to the console. I've yet to see a stanza being included (that's the "undefined" at the end of each log line).

If it's a connection error reported by Node, the callback receives an error object, and the log would then show multiple lines with properties like stack and arguments.

Worth cleaning up for better error reporting, but right not it's possible to tell whether error is generated by HipChat or earlier on by client code.

jcblw pushed a commit to eGood/goodbot that referenced this issue Apr 18, 2013
Fix NickServ IDENTIFY messages for irc.mozilla.org - Fixes hubotio#46
technicalpickles pushed a commit that referenced this issue Apr 17, 2023
…4.17.21

chore(deps): bump lodash from 4.17.11 to 4.17.21
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