I am trying to run the app.js from the demo_skype folder.
Unfortunately as I want to add the bot to my skype contacts it shows following Error:
ERROR: ChatConnector: startConversation - address is invalid.
Error: Invalid address.
at ChatConnector.startConversation (/home/pku/echo_bot/Vorlagen/BotBuilder-master/Node/core/lib/bots/ChatConnector.js:220:18)
at /home/pku/echo_bot/Vorlagen/BotBuilder-master/Node/core/lib/bots/UniversalBot.js:284:27
at UniversalBot.tryCatch (/home/pku/echo_bot/Vorlagen/BotBuilder-master/Node/core/lib/bots/UniversalBot.js:357:13)
at UniversalBot.ensureConversation (/home/pku/echo_bot/Vorlagen/BotBuilder-master/Node/core/lib/bots/UniversalBot.js:278:14)
at async.eachLimit.errorLogger._this.tryCatch.channelId (/home/pku/echo_bot/Vorlagen/BotBuilder-master/Node/core/lib/bots/UniversalBot.js:172:19)
at /home/pku/echo_bot/node_modules/async/lib/async.js:181:20
at replenish (/home/pku/echo_bot/node_modules/async/lib/async.js:319:21)
at /home/pku/echo_bot/node_modules/async/lib/async.js:330:15
at Object.async.forEachLimit.async.eachLimit (/home/pku/echo_bot/node_modules/async/lib/async.js:220:35)
at UniversalBot.send (/home/pku/echo_bot/Vorlagen/BotBuilder-master/Node/core/lib/bots/UniversalBot.js:171:15)
What do I have to change that this works?
It looks like (address && address.user && address.bot && address.serviceUrl) is evaluating to false. Are any of those undefined?
Thanks for your reply.
I am sorry to ask, but where are these defined?
I just followed the Core Concepts of https://docs.botframework.com/en-us/node/builder/guides/core-concepts/#publishing-to-the-bot-framework-service
I am still getting this error.
Thanks in advance.
Can you share your code? I think you actually bot.beginDialog() somewhere that you should have called session.beginDialog()
var builder = require('botbuilder');
var restify = require('restify');
var server = restify.createServer();
server.listen(process.env.port || process.env.PORT || 3978, function() {
console.log('%s listening to %s', server.name, server.url);
});
var connector = new builder.ChatConnector({
appId:process.env.MICROSOFT_APP_ID,
appPassword:process.env.MICROSOFT_APP_PASSWORD
});
var bot = new builder.UniversalBot(connector);
server.post('/api/messages', connector.listen());
var intents = new builder.IntentDialog();
bot.dialog('/', intents);
intents.matches(/^change name/i, [
function (session) {
session.beginDialog('/profile');
},
function (session,results) {
session.send('Ok...Changed your name to %s', session.userData.name);
}
]);
intents.onDefault([
function (session, args, next) {
if(!session.userData.name) {
session.beginDialog('/profile');
} else {
next();
}
},
function (session, results) {
session.send('Hello %s!', session.userData.name);
}
]);
bot.dialog('/profile', [
function (session) {
builder.Prompts.text(session, 'Hi! What is your name?');
},
function (sessions, results) {
sessions.userData.name = results.response;
sessions.endDialog();
}
]);
As I said, I just followed the Guide of this site https://docs.botframework.com/en-us/node/builder/guides/core-concepts/#publishing-to-the-bot-framework-service
so I just ran this exact example without any issue. You should see a trace dump in the console log. Can you send that to me?
Everything I see in my console is the above exception which I've posted initially.
Then you're not running in the emulator. How are you running this sample?
I am trying to run this with Node.
Can you try v3.2.3 of the SDK
@PkuOndamedia, I'm closing this issue since it's been inactive for more than two weeks. If you're still experiencing this issuem please open new issue, or mention me in a comment to this one asking me to re-open it. thanks!
is there any way to send a Hero Card without session variable?
bot.send is not working. struck and then tried this idea of using bot.beginDialog which also ended p here in this post.
@alokraj68 Please either open a new issue or post your question on Stack Overflow, good luck.
Most helpful comment
Can you share your code? I think you actually
bot.beginDialog()somewhere that you should have calledsession.beginDialog()