Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

hubot doesn't give me any reaction after I run ./bin/hubot -a botframework #23

Closed
jerryline opened this issue May 23, 2018 · 14 comments
Closed

Comments

@jerryline
Copy link

I want to use this adapter to create a hubot that can connect our mirosoft teams.
First, I generated a bot by this link: https://dev.botframework.com/bots/new, and set BOTBUILDER_APP_ID and BOTBUILDER_APP_PASSWORD with the value I get when I create the new bot. then I run ./bin/hubot -a botframework:

[ec2-user@ip-172-31-11-119 microsoft]$ ./bin/hubot -a botframework
npm WARN hubot-help@0.2.2 requires a peer of coffee-script@^1.12.6 but none was installed.

up to date in 1.497s
[Wed May 23 2018 09:05:46 GMT+0000 (UTC)] INFO hubot-botframework-adapter: Adapter loaded. Using appId 349c9cc8-3593-447d-8b97-a1367560cf4d
[Wed May 23 2018 09:05:46 GMT+0000 (UTC)] INFO hubot-botframework-adapter: Adapter running.
[Wed May 23 2018 09:05:47 GMT+0000 (UTC)] WARNING Loading scripts from hubot-scripts.json is deprecated and will be removed in 3.0 (github/hubot-scripts#1113) in favor of packages for each script.

Your hubot-scripts.json is empty, so you just need to remove it.
[Wed May 23 2018 09:05:47 GMT+0000 (UTC)] INFO hubot-redis-brain: Using default redis on localhost:6379

It stopped here.

Another question, when can not chat with my bot in microsoft teams, It tell me: sending new message to this bot has been disabled by your administrator. Any suggestion on this?

@MatSFT
Copy link

MatSFT commented May 24, 2018

What do you set your messages endpoint to in Bot Framework?

@jerryline
Copy link
Author

I didn't set the endpoint because I found it is optional ,what this endpoint is? I didn't find this nessage when I create the new bot

@MatSFT
Copy link

MatSFT commented May 24, 2018

We register a post endpoint here:
https://github.com/Microsoft/BotFramework-Hubot/blob/8d0cf959ff651f49cb4454c26cae968bd092f3a0/src/adapter.coffee#L68

By default it is /api/messages but you can change it. Your bot has to be visible on the internet to work.

@jerryline
Copy link
Author

If I didn't set the endpoint, It will be the default value /api/messages.I think the default value is OK.
I have read some bot example sued restify, I think restify is replace by hubot, is it? If I start the hubot by ./bin/hubot -a botframework, I guess I can access my bot by enter the url https://myserverip/api/messages, is it?

@MatSFT
Copy link

MatSFT commented May 25, 2018

Yes that is correct.

@MatSFT
Copy link

MatSFT commented May 30, 2018

Did that help your issue?

@rbuezotordesillas
Copy link

rbuezotordesillas commented Jul 5, 2018

I am having the same issue. I did not set the endpoint so it is using the default also but I do not understand how I can access my bot. In the test for dev.botframework i get the following issues:

image

I would appreciate it if someone who got hubot working with MS Teams, could share the different steps they took.

@MatSFT
Copy link

MatSFT commented Jul 9, 2018

You MUST set the endpoint in the azure portal for your bot channel registration. This hubot adapter for botframework runs an HTTP endpoint on {hubot web address}/api/messages by default. To use this adapter with BotFramework, this HTTP endpoint must somehow get exposed to the internet so that BotFramework can route messages to it. BotFramework uses a push model to send your bot messages.

One easy way to expose the endpoint on the internet is to use a tunneling service such as ngrok or serveo. You can also run the hubot on a cloud service such as Azure which can be configured to have a public endpoint as well.

@rbuezotordesillas
Copy link

Yes I am running the hubot on an AWS ec2 instance but I cannot figure out Hubot's endpoint.

@MatSFT
Copy link

MatSFT commented Jul 17, 2018

It would be whatever the public endpoint of your EC2 instance is + /api/messages

@rbuezotordesillas
Copy link

Thank you so much. That seemed to solve my first problem.

@MatSFT
Copy link

MatSFT commented Nov 14, 2018

closing due to inactivity

@MatSFT MatSFT closed this as completed Nov 14, 2018
@bk1412
Copy link

bk1412 commented Oct 10, 2019

i have set my messages endpoint to in Bot Framework , now i using Bot Framework Emulator try to make local test ,but it didnt work

[14:52:10]The bot's Microsoft App Id or Microsoft App Password is incorrect.
[14:52:10]POSTdirectline.conversationUpdate
[14:52:10]Error: The bot is remote, but the service URL is localhost. Without tunneling software you will not receive replies.
[14:52:10]Connecting to bots hosted remotely
[14:52:10]Configure ngrok

there is the log,because have two errorr ,so im not sure the problem is which one ,i install hubot in other computer,but in same network,and if i just connection , doesnt set APP ID and APP PASSWORD,thne hubot will show me this log :

ERROR: ChatConnector: receive - no security token sent.
ERROR: ChatConnector: receive - no security token sent.
ERROR: ChatConnector: receive - no security token sent.

so i think is not connection problem

@bk1412
Copy link

bk1412 commented Oct 10, 2019

closing due to inactivity

can you help me ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants