Prompts Choice, Confirm, Attachment Not Behaving Correctly on Facebook
With Prompts.choice|confirm|attachment, if you type an unexpected input, the bot automatically replies with the message 'default_choice', 'default_confirm' and 'default_file'.
Here's an example with the demo-facebook app included in BotBuilder.

Prompts.confirm performs even worse since selecting "confirm_yes" or "confirm_no" will cause the bot to re-prompt indefinitely until you type "yes" or "no".

Perhaps something underlying in the FB API changed and thus is messing things up? It used to work fine. I am using BotBuilder 3.2.3
[UPDATE] So it turns out I made a mistake and am not using 3.2.3 but the latest changes on master. I did find that commit b462d90 introduced some changes that is causing these issues not seen in BotBuilder 3.2.3
Thanks @oztheozoz. @Stevenic, any thoughts?
Thanks @oztheozoz for pointing this out. We haven't published those updates to the SDK yet so let me verify that everything is still working as expected before we do.
I also got this issue. The problem is in the local dev env (on Windows 10) i got the right message (default_file is parsed to the default in locale/en/BotBuilder.json", but when I deployed to Heroku it just shows "default_file"... Still debugging...
I opened the node_debug and found that at least on Heroku, the DefaultLocalizer didn't load the data.
2016-10-26T09:12:22.523354+00:00 app[web.1]: ChatConnector: message received.
2016-10-26T09:12:23.089989+00:00 app[web.1]: localizer::load requested for: en
2016-10-26T09:12:23.091818+00:00 app[web.1]: localizer::in directory: /app/node_modules/botbuilder/lib/locale/en
2016-10-26T09:12:23.092013+00:00 app[web.1]: localizer::in file: BotBuilder.json
2016-10-26T09:12:23.092283+00:00 app[web.1]: localizer::parsing /app/node_modules/botbuilder/lib/locale/en/botbuilder.json
2016-10-26T09:12:23.092684+00:00 app[web.1]: localizer::in file: index.json
2016-10-26T09:12:23.092773+00:00 app[web.1]: localizer::parsing /app/node_modules/botbuilder/lib/locale/en/index.json
2016-10-26T09:12:23.094363+00:00 app[web.1]: localizer::directory complete: /app/node_modules/botbuilder/lib/locale/en
2016-10-26T09:12:23.094989+00:00 app[web.1]: localizer::in directory: /app/node_modules/botbuilder/lib/locale/en
2016-10-26T09:12:23.095060+00:00 app[web.1]: localizer::in file: BotBuilder.json
2016-10-26T09:12:23.095128+00:00 app[web.1]: localizer::parsing /app/node_modules/botbuilder/lib/locale/en/botbuilder.json
2016-10-26T09:12:23.095348+00:00 app[web.1]: localizer::in file: index.json
2016-10-26T09:12:23.095500+00:00 app[web.1]: localizer::parsing /app/node_modules/botbuilder/lib/locale/en/index.json
2016-10-26T09:12:23.096270+00:00 app[web.1]: localizer::directory complete: /app/node_modules/botbuilder/lib/locale/en
2016-10-26T09:12:23.096817+00:00 app[web.1]:
2016-10-26T09:12:23.097448+00:00 app[web.1]: localizer::loaded requested locale: en
2016-10-26T09:12:23.132477+00:00 app[web.1]: prompts::sendPrompt called
2016-10-26T09:12:23.132703+00:00 app[web.1]: prompts::sendPrompt setting ns to BotBuilder
2016-10-26T09:12:23.132889+00:00 app[web.1]: localizer::gettext locale:en msgid:default_file ns:BotBuilder
2016-10-26T09:12:23.133357+00:00 app[web.1]: localizer::trygettext locale:en msgid:default_file ns:botbuilder fb:en key:botbuilder:default_file
2016-10-26T09:12:23.133466+00:00 app[web.1]: localizer::trygettext returning: null
2016-10-26T09:12:23.133554+00:00 app[web.1]: localizer::gettext returning: default_file
While I can get the data on my local machine. I tried to dump info like this
let a = require('botbuilder/lib/DefaultLocalizer');
console.log(a['DefaultLocalizer'].map['en'])
And it is an empty object on live...
@Stevenic
I think I got the bug. The code in DefaultLocalizer.js uses toLowerCase() which is ok in Windows, but filepath in Linux is case sensitive.
var filePath = (localeDir + "/" + filename).toLowerCase();
if (DefaultLocalizer.filesParsedMap[filePath]) {
cb(null, DefaultLocalizer.filesParsedMap[filePath]);
}
else {
logger.debug("localizer::parsing %s", filePath);
fs.readFile(filePath, 'utf8', function (err, data) {
Could also be a problem here this.botLocalePath = settings.botLocalePath.toLowerCase();
Btw, @Stevenic the error from fs.readFile is not popped up or logged in the debug. Better to log somewhere.
@bobzsj87 I've removed the call to lowercase the path (I didn't actually write that code) and there should be a patch out today.