0

everyone I try to follow the tutorial to build my first bot.

But when I use Bot Framework Emulator to connect it, It don't show Hello World on Emulator.

And when I send some thing word(like 'test' or 'P') to server, It crash can show me

Error: connect ECONNREFUSED 127.0.0.1:5631
    at Object.exports._errnoException (util.js:1022:11)
    at exports._exceptionWithHostPort (util.js:1045:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)

how can i fix it?

2
  • Please share the code that you've worked on so we can help you fix the error :) Commented Feb 9, 2017 at 6:01
  • Are you running with Administrator privileges your debugger (I assumed Visual Studio Code)? Commented Feb 9, 2017 at 19:08

2 Answers 2

1

Finally, I use ngrok to connect my local applicaion. I don't know why I can't connect it without ngrok. But It just can work, Thanks everyone ^^

Sign up to request clarification or add additional context in comments.

Comments

0

You fill in the right values under the following section:

var connector = new builder.ChatConnector({
    appId: process.env.MICROSOFT_APP_ID,
    appPassword: process.env.MICROSOFT_APP_PASSWORD
});

MICROSOFT_APP_ID and MICROSOFT_APP_PASSWORD should be 'undefined' or filled properly by registering a new bot under: Microsoft Bot Framework

Also, I see that you are trying to connect using port 5631 instead of 3986 - Make sure to check the right port is set when creating the server:

server.listen(process.env.port || process.env.PORT || 3978, function () {
    console.log('%s listening to %s', server.name, server.url); 
});

2 Comments

Working with the Emulator does not require entering MICROSOFT_APP_ID and MICROSOFT_APP_PASSWORD. But definitely the port, on which the server is running on, should be checked .
I use the currect MICROSOFT_APP_ID and MICROSOFT_APP_PASSWORD and the port is Emulator generate

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.