microsoft / BotFramework-Hubot

Hubot adapter for botframework
MIT License
111 stars 40 forks source link

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

Closed jerryline closed 5 years ago

jerryline commented 6 years ago

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 (https://github.com/github/hubot-scripts/issues/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 commented 6 years ago

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

jerryline commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

Yes that is correct.

MatSFT commented 6 years ago

Did that help your issue?

rbuezotordesillas commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

MatSFT commented 6 years ago

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

rbuezotordesillas commented 6 years ago

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

MatSFT commented 5 years ago

closing due to inactivity

bk1412 commented 4 years ago

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 commented 4 years ago

closing due to inactivity

can you help me ?