GithubHelp home page GithubHelp logo

microsoft / botbuilder-v3 Goto Github PK

View Code? Open in Web Editor NEW
51.0 44.0 62.0 215.58 MB

Microsoft Bot Builder V3 SDK for Microsoft Bot Framework

License: MIT License

C# 65.17% HTML 0.41% CSS 3.72% Batchfile 0.22% PowerShell 0.09% JavaScript 16.29% TypeScript 12.30% ASP.NET 0.07% Handlebars 1.70% Shell 0.01% Pug 0.02%

botbuilder-v3's Introduction

V3 Deprecation Notification

Microsoft Bot Framework SDK V4 was released in September 2018, and since then we have shipped a few dot-release improvements. As announced previously, the V3 SDK is being retired with final long-term support ending on December 31st, 2019. Accordingly, there will be no more development in this repo. Existing V3 bot workloads will continue to run without interruption. We have no plans to disrupt any running workloads.

We highly recommend that you start migrating your V3 bots to V4. In order to support this migration we have produced migration documentation and will provide extended support for migration initiatives (via standard channels such as Stack Overflow and Microsoft Customer Support).

For more information please refer to the following references:

Bot Builder SDK

If you are new to the Bot Builder SDK, we strongly encourage you to build your bot using the v4 SDK.

This repo contains version 3.

The Bot Builder SDK enables you to build bots that support different types of interactions with users. You can design conversations in your bot to be freeform. Your bot can also have more guided interactions where it provides the user choices or actions. The conversation can use simple text or more complex rich cards that contain text, images, and action buttons. You can add natural language interactions and questions and answers, which let your users interact with your bots in a natural way.

Bot Framework

The Bot Builder includes a set of command line tools to streamline end-to-end conversation centric development experience, and an emulator for debugging your bot locally or in the cloud.

You can create a bot with Bot Builder v3 SDK using your favorite language:

Documentation

Visit azure.com for the primary Azure Bot Service documentation page to learn about building bots using Bot Builder. There is additional documentation on the SDK, oriented towards contributors. The v3 SDK currently supports two programing language:

Samples

Bot builder SDK v3 includes samples for all supported languages:

Questions and Help

If you have questions about Bot Builder SDK v3 or using Azure Bot Service, we encourage you to reach out to the community and Azure Bot Service dev team for help.

While we do our best to help out on a timely basis, we don't have any promise around the above resources. If you need an SLA on support from us, it's recommended you invest in an Azure Support plan.

Issues and feature requests

We track functional issues and features asks for and Bot Builder and Azure Bot Service in a variety of locations. If you have found an issue or have a feature request, please submit an issue to the below repositories.

Item Description Link
SDK v3 (.NET and JS) core bot runtime, abstractions, prompts, dialogs, FormFlow, etc. File an issue
Documentation Docs for Bot Builder and Azure Bot Service File an issue
CLI tools MSBot, chatdown, ludown, LUIS, LUISGen, QnA Maker, dispatch File an issue
Emulator view transcripts, connect to services, debug your bot File an issue

Helpful links

GitHub repositories

Documentation

Adding intelligence to your bot

Your bot can provide a great conversational experience without using any Azure Cognitive Services. You can increase your customers' delight with adding a more natural interaction using one or multiple Azure Cognitive Services. The following are common services integrated to bots:

Get started quickly with our samples:

Join the conversation on Gitter.

See all the support options here.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

botbuilder-v3's People

Contributors

andrea-orimoto avatar asfyra avatar brandonh-msft avatar carlosscastro avatar chrimc62 avatar cleemullins avatar crjens avatar dandriscoll avatar dependabot[bot] avatar ericdahlvang avatar franciscoponcegomez avatar huan avatar jameslew avatar jasonsowers avatar jeffders avatar joshgummersall avatar msft-shahins avatar mulyoved avatar muzahmed avatar nwhitmont avatar pablocastro avatar pcostantini avatar pshelton-skype avatar santiagodoldan avatar scheyal avatar sgellock avatar stevengum avatar stevenic avatar tomlm avatar willportnoy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

botbuilder-v3's Issues

"Operation returned an invalid status code MethodNotAllowed" When deployed on azure

Version

V3.16.1.38846

Describe the bug

I created a bot (MicrosoftAppId: b83eb276-df6d-4ce1-a326-3b69aec65bdb) and deployed it on azure.
The deploy works but I get the message: "Sorry, my bot code is having an issue" Whenever I write to the bot.
The error is: Operation returned an invalid status code MethodNotAllowed

Few things to keep in mind:

  1. The bot works perfectly on localhost with the Emulator
  2. The bot is using BotBuilder.Instrumentation library. I've cloned the repo and used it as a reference because adding the Nuget reference wasn't compatible with V3.16 of BotBuilder.
  3. The bot is using Micosoft.Bot.Builder.Azure (v3.16.1.38889)
  4. The bot is using LUIS and QnAmaker
  5. I've already implemented the state handling in Global.asax with the following code:
protected void Application_Start()
        {
            var store = new InMemoryDataStore();

            Conversation.UpdateContainer(
                       builder =>
                       {
                           builder.Register(c => store)
                                     .Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore)
                                     .AsSelf()
                                     .SingleInstance();

                           builder.Register(c => new CachingBotDataStore(store,
                                      CachingBotDataStoreConsistencyPolicy
                                      .ETagBasedConsistency))
                                      .As<IBotDataStore<BotData>>()
                                      .AsSelf()
                                      .InstancePerLifetimeScope();


                       });
            GlobalConfiguration.Configure(WebApiConfig.Register);
        }

What could be causing the problem?

Thanks :)

[bug]
[dotnet]

Include SDK version identifier in User-Agent header on all calls to LUIS APIs

Is your feature request related to a problem? Please describe.
Today, we do not have any view into LUIS traffic that are driven by botbuilder. LUIS service instruments all calls to the service and can report on User-Agent to identify the specific client.

Describe the solution you'd like
On all calls to LUIS service, include User-Agent header with the following value -
botbuilder/v3-sdk/csharp/major.minor.patch.build
botbuilder/v3-sdk/js/major.minor.patch.build

[enhancement]
[dotnet]

Tracking Status

Dotnet SDK

  • PR
  • Merged

Javascript SDK

  • PR
  • Merged

MicrosoftAppCredentials returns expired token

Not sure if this is a known issue since the v3 issues disappeared when the repo was moved...

Version

latest v3 (reproduced it in 3.15.3 and 3.16.1) and latest v4 (reproduced in 4.0.7)

Describe the bug

Our bots fail to respond to the first message every morning. What we see in AppInsights is that the botframework token endpoint is successfully called, but the call to the conversations endpoint (triggered by context.PostAsync) fails with 401 Unauthorized.
After some investigation we think we have found a bug in the MicrosoftAppCredentials class.

The bot has to be talked to at least twice. First to get an initial token and 10 minutes later to kick off an auto refresh task. Then it needs to be completely idle for 60 more minutes so the cached token and the token retrieved by the auto refresh task have expired.

In that scenario the code in MicrosoftAppCredentials.GetTokenAsync (line 197) assumes that the last cached task will return a valid token (since it completed but with a different token than the cached one) and it will use that expired token in the request (ProcessHttpRequestAsync).

To Reproduce

Easiest way to reproduce is with a simple ConsoleApp (with the Microsoft.Bot.Builder nuget) calling MicrosoftAppCredentials.GetTokenAsync and verifying the token expiration locally.

class Program
{
    private const string AppId = "valid app id";
    private const string AppSecret = "valid app secret";
    private static readonly MicrosoftAppCredentials Credentials = new MicrosoftAppCredentials(AppId, AppSecret);

    static void Main()
    {
        GetAndVerifyToken();
        while (true)
        {
            if (Console.ReadLine() == "q")
                break;

            GetAndVerifyToken();
        }
    }

    private static async Task GetAndVerifyToken()
    {
        var tokenString = await Credentials.GetTokenAsync().ConfigureAwait(false);
        var token = new System.IdentityModel.Tokens.Jwt.JwtSecurityToken(tokenString);
        Console.WriteLine($"[{DateTime.Now}] {(DateTime.UtcNow > token.ValidTo ? "ERROR: Token expired at: " : "Token valid until: ")} {token.ValidTo.ToLocalTime()}");
    }
}
  1. start the console app -> gets a new Token that expires in 60 minutes
  2. 10 minutes later hit Enter -> initiates an auto refresh token task, that gets a token that expires in 60 minutes (note: that new token is never put in the tokenCache, just the task is cached in the tokenTaskCache)
  3. another 60 minutes later it Enter again -> GetTokenAsync returns an expired token

It is also possible to reproduce this issue with sending real messages via ConnectorClient.Conversations.SendToConversationWithHttpMessagesAsync, but that requires a bit more setup (activity with valid channel and conversation accounts, etc)

   private static async Task SendMessage()
    {
        var message = CreateMessage();
        MicrosoftAppCredentials.TrustServiceUrl(message.ServiceUrl);
        var client = new ConnectorClient(new Uri(message.ServiceUrl), Credentials);
        var response = await client.Conversations.SendToConversationWithHttpMessagesAsync(message.Conversation.Id, message).ConfigureAwait(false);
    }

Expected behavior

MicrosoftAppCredentials.GetTokenAsync should not return expired tokens.
A simple fix would be to check TokenExpired(oAuthTokenTask.Result.access_token) instead of comparing to the cached token in line 197.

Screenshots

The output of the console app
image

Additional context

I guess for a lot of bots out there this issue does not surface because most will try to send a "Typing" activity to the user before sending the actual message and no one really notices a missing "typing.."

We have a distributed bot network where a central bot delegates intents to other completely independent bots (running in separate web apps). The central bot sends the typing, but the actual response to the user is sent by one of the "sub bots".

[bug]
[dotnet]

Getting Dependency failures related to table storage in app insights while loading botstate

From @aniketk1264 on October 18, 2018 18:9

Bot Info

  • SDK Platform: .NET
  • SDK Version: Version=3.15.3.0
  • Active Channels: WebChat
  • Deployment Environment: Azure App Service

Issue Description

We are using azure table storage for maintaining botstate. When user tries to login in our application and tries to initiate dialog with bot for 1st time, we only had userData in table storage at that point of time. Before initiating dialog, we are loading the botstate(userData/ConversationData/PrivateConversationData). Since we don't have conversation data/PrivateConversationData in table storage at that point of time, dependency failures for table storage with response code : 404 are getting logged in Application Insights.

Initially we were using BotBuilder V3.11 and had our own custom implementation for maintaining botstate. So we were handling it by verifying if that botdata exists in table storage and then only used to load it.

Recently we have upgraded the Bot Builder version to 3.15.3 and we are overriding the Microsoft implementation instead of having the custom implementation. With this implementation, when we try to load botstate for user when he initiates dialog with bot for 1st time, dependency failures for conversation data/private Conversation Data are getting logged in Application Insights.

Below are the requests for which 404 dependency failures are getting logged
https://sa7364dipaprd.table.core.windows.net:443/botdata(PartitionKey='webchat:conversation',RowKey=)
https://sa7364dipaprd.table.core.windows.net:443/botdata(PartitionKey='webchat:private',RowKey=conversationId:UserId)

Please find below the code change we applied for handling the 404 failures when we were using Bot Builder v3.11

Code Example

async Task<BotData> IBotDataStore<BotData>.LoadAsync(IAddress key, BotStoreType botStoreType, CancellationToken cancellationToken)
        {
            //await WriteTraceFileLogsInfo("Entered LoadAsync in Bot.Builder.Azure");
            var entityKey = BotDataEntity.GetEntityKey(key, botStoreType);
            
            
            try
            {
                bool isExists = await EntityExists(entityKey.PartitionKey, entityKey.RowKey);

                if (isExists)
                {
                    var result = await this.Table.ExecuteAsync(TableOperation.Retrieve<BotDataEntity>(entityKey.PartitionKey, entityKey.RowKey));
                    BotDataEntity entity = (BotDataEntity)result.Result;

                    //await WriteTraceFileLogsInfo(string.Format("Data in storage for UserId : {0}", key.UserId));

                    if (entity == null)
                        // empty record ready to be saved
                        return new BotData(eTag: String.Empty, data: null);

                    //await WriteTraceFileLogsInfo("Exit LoadAsync in Bot.Builder.Azure");
                    // return botdata 
                    return new BotData(entity.ETag, entity.GetData());
                }
                else
                {
                    return new BotData(eTag: String.Empty, data: null);
                }
            }
            catch (StorageException err)
            {
                //await WriteTraceFileLogsInfo("Error in LoadAsync in Bot.Builder.Azure :" + err);
                throw new HttpException(err.RequestInformation.HttpStatusCode, err.RequestInformation.HttpStatusMessage);
            }
        }

 /// <summary>
        /// 
        /// </summary>
        /// <param name="partitionKey"></param>
        /// <param name="rowKey"></param>
        /// <returns></returns>
        public async Task<bool> EntityExists(string partitionKey, string rowKey)
        {
            bool isExists = false;
            TableQuery<BotDataEntity> tableQuery = new TableQuery<BotDataEntity>().Where(TableQuery.CombineFilters(
                    TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, partitionKey),
                    TableOperators.And,
                    TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.Equal, rowKey)));


            TableContinuationToken token = null;
            do
            {
               
                    TableQuerySegment<BotDataEntity> result = await this.Table.ExecuteQuerySegmentedAsync(tableQuery, token);
                    token = result.ContinuationToken;
                    if (result.Results.Any())
                        isExists = true;
               
            }
            while (token != null);

            return isExists;
        }

In the above code, we used to check if botdata exists in table storage using EntityExists() before retrieving it from azure table storage and we have handled 404 dependency failures

Below is the State implementation when we upgraded Bot Builder to V3.15.3 for loading botState.

public static async Task<BotData> GetBotDataAsync(string channelId, string userId)
        {
            BotData botData = new BotData();
            using (var scope = Conversation.Container.BeginLifetimeScope())
            {
                IBotDataStore<BotData> botDataStore = scope.ResolveKeyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore);
                var key = new AddressKey()
                {
                    BotId = "",
                    ChannelId = channelId,
                    UserId = userId,
                    ConversationId = "",
                    ServiceUrl = ""
                };
                botData = await botDataStore.LoadAsync(key, BotStoreType.BotUserData, CancellationToken.None);
                await botDataStore.FlushAsync(key, CancellationToken.None);
            }
            return botData;
        }

In the above code could you please suggest how to check if botData exists in table storage before retrieving it using loadAsync() so that we can handle 404 failures related to conversationData/PrivateConversationData which are getting logged in application insights.

Steps to Reproduce Failure

  • Login to our application
  • Load BotState and Initiate Dialog with bot for 1st time

Actual Result

Since conversationData/PrivateConversationData is not maintained in storage at that point of time and only userData is maintained in it, 404 dependency failures are getting logged in application insights

Expected Result,

We need to handle these failures before loading botstate when user initiates dialog with bot for 1st time

Copied from original issue: microsoft/botframework-sdk#5111

LUIS not recognizing dialogs stored in subfolders

Microsoft BotbuilderSDK: 3.15.0
Language: NodeJs

I am trying to initialize my dialogs with LUIS but it's not working.

I have each dialog in different subfolders. I am using bot.library and require to call the subfolders in app.js. The dialogs work when I use session.beginDialog to trigger them as in the example below.

var bot = new builder.UniversalBot(connector, function (session) {
session.beginDialog('hello:Hello')
}).set('storage', cosmosStorage);

But the conversations are not initiated when Luis is included. Each conversation has the correct LUIS calls/integrations.

Here is the full source code:

require('dotenv').config();
const restify = require('restify');

const builder = require('botbuilder');

var fs = require('fs');

var clients = require('restify-clients');

var azure = require('botbuilder-azure');

var listenPort = process.env.port || process.env.PORT || 3978;

var server = restify.createServer()

server.listen(listenPort, '::', () => {
  console.log(`ssssTestt`)
});


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


var bot = new builder.UniversalBot(connector, function (session) {
    session.endDialog(`I'm sorry, I did not understand '${session.message.text}'.\nType 'help' to know more about me :)`)
}).set('storage', cosmosStorage);


var luisRL = new builder.LuisRecognizer(process.env.LUIS_MODEL_URL).onEnabled(function (context, callback) {
  var enabled = context.dialogStack().length === 0
  callback(null, enabled)
});


var intents = new builder.IntentDialog({ recognizers: [luisRL] });
bot.recognizer(intents);


server.post('/api/messages', connector.listen());

bot.on('conversationUpdate', function (message) {
  if (message.membersAdded) {

    greetings = 'welcome to Joey's Pizza?'

    message.membersAdded.forEach(function (identity) {
      if (identity.id === message.address.bot.id) {
        bot.send(new builder.Message()
          .address(message.address)
          .text(greetings)
        )
      }
    })
  }
});

bot.library(require('./dialogs/reservations').createLibrary());
bot.library(require('./dialogs/order').createLibrary());
bot.library(require('./dialogs/cancellations').createLibrary());

Bot Framework Context.Wait does not wait for input

I have three dialog that works as explained below

I have a Receipt Dialog, but when the dialog is called it first goes to Onboarding dialog to check if the user has onboarded if the user has to onboarded it start the onboarding process, and then calls an OTP Dialog to complete the transcation. But when it gets to the OTP Dialog it does not wait for the user to enter the generated token.

Below is the code

OnBoarding Dialog

`private async Task AccountNumberEnteredAsync(IDialogContext context, IAwaitable result)
{
try
{
if (await result is IMessageActivity resp)
{
var userID = context.Activity.From.Id;
var channelID = context.Activity.ChannelId;

                var customerEnquiry = DialogFactory.Create<ICustomerEnquiry>();
                string phoneNum = await customerEnquiry.GetCustomerPhoneNumberAsync(resp.Text);

                context.PrivateConversationData.SetValue(StringConstants.TEMP_ACCOUNT_NUMBER, resp.Text);
                context.PrivateConversationData.SetValue(StringConstants.PHONE_NUMBER, phoneNum);
                context.Call(DialogFactory.Create<OTPDialog>(), ResumeAfterOTPAsync);
            }
        }
        catch (Exception ex)
        {
            Telemetry.TrackException(ex);
            await context.PostAsync(L("FORM_ERROR"));
            context.Done(false);
        }
    }

`
OTP Dialog

    `private async Task InitiateOTP(IDialogContext context)
    {
        try
        {
            if (!context.UserData.TryGetValue(StringConstants.USER_OTP_KEY, out this.secret))
            {
                var username = context.UserData.GetValueOrDefault<string>(StringConstants.ACCESS_MOBILE_USERNAME);
                context.Fail(new AppException(L("OTPGENERATIONERROR", new object[] { username })));
            }
            else
            {
                context.PrivateConversationData.TryGetValue(StringConstants.PHONE_NUMBER, out string phoneNum);
                var otp = await TwoFactorAuth.GetOTPAsync(this.secret);
                await SendTokenSMSAsync(otp, new List<string>() { phoneNum });
                await context.PostAsync(L("OTP_SENT_MESSAGE") + " " + otp);
                context.Wait(this.OTPEnteredAsync);
            }
        }
        catch (TooManyAttemptsException ex)
        {
            Telemetry.TrackException(ex);
            await context.PostAsync(L("HERO_CARD_TRIALS_EXCEEDED"));
            context.Done(false);
        }
        catch (InvalidOperationException ex)
        {
            Telemetry.TrackException(ex);
            await context.PostAsync(L("FORM_ERROR"));
            context.Done(false);
        }
        finally
        {
            Telemetry.TrackTrace(nameof(StartAsync));
        }
    }`

Resumed after OTP has been entered (but it does not wait for the user to enter OTP)

     `private async Task OTPEnteredAsync(IDialogContext context, IAwaitable<object> result)
    {
        try
        {
            var response = await result as Activity;
            var yesy = await result;

            if (response != null && !string.IsNullOrEmpty(response.Text) && response.Text.Equals(RESEND, StringComparison.InvariantCultureIgnoreCase))
            {
                context.PrivateConversationData.TryGetValue(StringConstants.PHONE_NUMBER, out string phoneNum);
                var otp = await TwoFactorAuth.GetOTPAsync(this.secret);
                await SendTokenSMSAsync(otp, new List<string>() { phoneNum });
                await context.PostAsync(L("OTP_SENT_MESSAGE"));
                context.Wait(OTPEnteredAsync);
            }
            else
            {
                if (response != null &&  !response.Text.IsNullOrEmpty())
                {
                    var isValidated = await TwoFactorAuth.ValidateOTPAsync(this.secret, response.Text);

                    if (!isValidated && authTrialCount++ < int.Parse(await SettingManager.GetSettingValueAsync(BotEngineConsts.SettingNames.AuthTrialLimit)))
                    {
                        await context.PostAsync(L("OTP_INVALID"));
                        context.Wait(OTPEnteredAsync);
                    }
                    else
                    {
                        context.Done(isValidated);
                    } 
                }
                else
                {
                    context.Wait(OTPEnteredAsync);
                }
            }
        }
        catch (Exception ex)
        {

            throw;
        }

        context.Wait(OTPEnteredAsync);
    }`

How do i make it wait for the user to enter OTP before continuing. Am Makeing use of Autofac for DI

Is it possible to send a message to a specific Skype Account using nodejs?

Is it possible to send a message to a specific Skype Account using nodejs?

Example: I'm trying to send a message to a specific Skype account (Person 2) if my bot does not have the answer. Then, catch again the answer to resend to the first user (Person 1).

I'm using NodeJs v8.12, and BotBuilder v4
Thanks

Bot not sending Welcome Message first time

Version

V3

Describe the bug

I'm using the ActivityType Conversation Update to send a welcome message to the user.
This was working fine until now, where the bot doesn't send the message the first time anymore. (Neither on the Emulator or in the Web Chat)

This is the code

            else if (messageType == ActivityTypes.ConversationUpdate)
            {
                // Handle conversation state changes, like members being added and removed
                // Use Activity.MembersAdded and Activity.MembersRemoved and Activity.Action for info
                // Not available in all channels
                IConversationUpdateActivity iConversationUpdated = message as IConversationUpdateActivity;
                if (iConversationUpdated != null)
                {
                    ConnectorClient connector = new ConnectorClient(new System.Uri(message.ServiceUrl));

                    foreach (var member in iConversationUpdated.MembersAdded ?? System.Array.Empty<ChannelAccount>())
                    {
                        // if the bot is added, then 
                        if (member.Id == iConversationUpdated.Recipient.Id)
                        {
                            var reply = ((Activity)iConversationUpdated).CreateReply(Properties.Messages.welcome_message);
                            await connector.Conversations.ReplyToActivityAsync(reply);
                        }
                    }
                }
            }

When I run the bot on the Emulator and debug the code, it looks like it works fine but no message is sent on the emulator.
When I reload the bot on the emulator (not restarting the app, just clicking on the reload button), the message is sent correctly.

The same behavior happens on the DirectLine (when loading the page the first time, nothing happens, but after reloading, the message is sent correctly.)

How can I fix this?

Thanks!

[bug]
[dotnet]

Operation returned an invalid status code 'Unauthorized'

Version

3.17.0.42969

Describe the bug

Microsoft.Bot.Connector.ErrorResponseException
operation returned an invalid status code 'Unauthorized'

To Reproduce

If the application hasn't been used for an hour or more there is an authorization error at the start of a conversation with the app. If the error is ignore the conversation continues normally.

Expected behavior

Expect the conversation to start without an error.

Error Details:

[{"parsedStack":[{"assembly":"Microsoft.Bot.Connector, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Connector.BotState+d__11.MoveNext","level":0,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":1,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":2,"line":0},{"assembly":"Microsoft.Bot.Connector, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Connector.BotStateExtensions+d__13.MoveNext","level":3,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":4,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":5,"line":0},{"assembly":"Microsoft.Bot.Builder, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Builder.Dialogs.Internals.ConnectorStore+<Microsoft-Bot-Builder-Dialogs-Internals-IBotDataStore-SaveAsync>d__3.MoveNext","level":6,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":7,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":8,"line":0},{"assembly":"Microsoft.Bot.Builder, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Builder.Dialogs.Internals.CachingBotDataStore+d__10.MoveNext","level":9,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":10,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":11,"line":0},{"assembly":"Microsoft.Bot.Builder, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Builder.Dialogs.Internals.CachingBotDataStore+<Microsoft-Bot-Builder-Dialogs-Internals-IBotDataStore-FlushAsync>d__5.MoveNext","level":12,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":13,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":14,"line":0},{"assembly":"Microsoft.Bot.Builder, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Builder.Dialogs.Internals.BotDataBase1+<FlushAsync>d__9.MoveNext","level":15,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":16,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":17,"line":0},{"assembly":"Microsoft.Bot.Builder, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Builder.Dialogs.Internals.DialogTaskManagerBotDataLoader+<FlushAsync>d__12.MoveNext","level":18,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":19,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":20,"line":0},{"assembly":"Microsoft.Bot.Builder, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Builder.Dialogs.Internals.PersistentDialogTask+<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__3.MoveNext","level":21,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":22,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":23,"line":0},{"assembly":"Microsoft.Bot.Builder, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Builder.Dialogs.Internals.ExceptionTranslationDialogTask+<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__2.MoveNext","level":24,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":25,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":26,"line":0},{"assembly":"Microsoft.Bot.Builder, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Builder.Dialogs.Internals.SerializeByConversation+<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__4.MoveNext","level":27,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":28,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":29,"line":0},{"assembly":"Microsoft.Bot.Builder, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Builder.Dialogs.Internals.PostUnhandledExceptionToUser+<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__5.MoveNext","level":30,"line":0},{"assembly":"Microsoft.Bot.Builder, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Builder.Dialogs.Internals.PostUnhandledExceptionToUser+<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__5.MoveNext","level":31,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":32,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":33,"line":0},{"assembly":"Microsoft.Bot.Builder, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Builder.Dialogs.Internals.LogPostToBot+<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__3.MoveNext","level":34,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":35,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":36,"line":0},{"assembly":"Microsoft.Bot.Builder.Autofac, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Builder.Dialogs.Conversation+<SendAsync>d__11.MoveNext","level":37,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":38,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":39,"line":0},{"assembly":"Microsoft.Bot.Builder.Autofac, Version=3.17.0.42969, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"Microsoft.Bot.Builder.Dialogs.Conversation+<SendAsync>d__6.MoveNext","level":40,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":41,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":42,"line":0},{"assembly":"Bot Application1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","method":"RiBot.MessagesController+<Post>d__3.MoveNext","level":43,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":44,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":45,"line":0},{"assembly":"System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"System.Threading.Tasks.TaskHelpersExtensions+<CastToObject>d__31.MoveNext","level":46,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":47,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":48,"line":0},{"assembly":"System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"System.Web.Http.Controllers.ApiControllerActionInvoker+d__0.MoveNext","level":49,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":50,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":51,"line":0},{"assembly":"System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"System.Web.Http.Filters.ActionFilterAttribute+d__5.MoveNext","level":52,"line":0},{"assembly":"System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"System.Web.Http.Filters.ActionFilterAttribute+d__5.MoveNext","level":53,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":54,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":55,"line":0},{"assembly":"System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"System.Web.Http.Filters.ActionFilterAttribute+d__0.MoveNext","level":56,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":57,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":58,"line":0},{"assembly":"System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"System.Web.Http.Controllers.ActionFilterResult+d__2.MoveNext","level":59,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","level":60,"line":0},{"assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","level":61,"line":0},{"assembly":"System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","method":"System.Web.Http.Dispatcher.HttpControllerDispatcher+d__1.MoveNext","level":62,"line":0}],"outerId":"0","message":"Operation returned an invalid status code '0'","type":"Microsoft.Bot.Connector.ErrorResponseException","id":"138365"}]

[bug]
[dotnet]

I am getting below error message very frequently on DirectLine Channel : There was an error sending this message to your bot: HTTP status code GatewayTimeout

I am getting below error in my Bot very frequently, There was an error sending this message to your bot: HTTP status code GatewayTimeout.

Mainly I see this issue with Direct Line (WebChat) it works fine for other channels.

Bot Framework Version: 3.16.1.38846

My Bot is deployed in Staging environment, we are planning to move the Bot to Production very soon, but this issue seems to be blocker as it counts under performance issue.

I am using Azure Cosmos DB as state storage.

image

Please let me know if more information is required.

Node localization tests are failing

Version

Clean pull of the respository

Describe the bug

Tests in Node\core\tests\localization.js are failing

To Reproduce

Steps to reproduce the behavior:

  1. download the source
  2. npm install in core folder
  3. npm run test
  4. See errors

Expected behavior

Tests all pass

Additional context

55 passing (2m)
23 failing

  1. localization
    should return localized prompt when found:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  2. localization
    should return random prompt for arrays:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  3. localization
    should return prompt in users preferred local:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  4. localization
    should return prompt in bots default local:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  5. localization
    should return prompt in sub-local:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  6. localization
    should fallback to bots locale:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  7. localization
    should fallback to bots locale for invalid preferredLocale:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  8. localization
    should fallback to "en" for missing bot locale:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  9. localization
    library should return libraries prompt:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  10. localization
    library should return bots overriden prompt:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  11. localization
    library should return bots prompt for missing locale:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  12. localization
    should use bots namespace for prompt:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  13. localization
    should use bots namespace for retryPrompt:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  14. localization
    should use libraries namespace for prompt:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  15. localization
    should use libraries namespace for retryPrompt:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  16. localization
    should use bots namespace for cancelAction:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  17. localization
    should use bots namespace for reloadAction:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  18. localization
    should use bots namespace for endConversationAction:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\localization.js)

  19. promptRecognizers
    should recognize a localized RegExp:

    Uncaught AssertionError [ERR_ASSERTION]: false == true

    • expected - actual

    -false
    +true

    at botbuilder (tests\promptRecognizers.js:13:17)
    at next (lib\Session.js:86:17)
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\lib\Session.js:110:17
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\lib\DefaultLocalizer.js:64:17
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\node_modules\async\lib\async.js:52:16
    at done (node_modules\async\lib\async.js:246:17)
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\node_modules\async\lib\async.js:44:16
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\lib\DefaultLocalizer.js:61:64
    at tryCallOne (node_modules\promise\lib\core.js:37:12)
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\node_modules\promise\lib\core.js:123:15
    at flush (node_modules\asap\raw.js:50:29)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

  20. promptRecognizers
    should recognize localized choices:

    Uncaught AssertionError [ERR_ASSERTION]: false == true

    • expected - actual

    -false
    +true

    at botbuilder (tests\promptRecognizers.js:42:17)
    at next (lib\Session.js:86:17)
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\lib\Session.js:110:17
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\lib\DefaultLocalizer.js:64:17
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\node_modules\async\lib\async.js:52:16
    at done (node_modules\async\lib\async.js:246:17)
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\node_modules\async\lib\async.js:44:16
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\lib\DefaultLocalizer.js:61:64
    at tryCallOne (node_modules\promise\lib\core.js:37:12)
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\node_modules\promise\lib\core.js:123:15
    at flush (node_modules\asap\raw.js:50:29)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

  21. promptRecognizers
    should recognize a localized choice using a synonym:

    Uncaught AssertionError [ERR_ASSERTION]: false == true

    • expected - actual

    -false
    +true

    at botbuilder (tests\promptRecognizers.js:59:17)
    at next (lib\Session.js:86:17)
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\lib\Session.js:110:17
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\lib\DefaultLocalizer.js:64:17
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\node_modules\async\lib\async.js:52:16
    at done (node_modules\async\lib\async.js:246:17)
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\node_modules\async\lib\async.js:44:16
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\lib\DefaultLocalizer.js:61:64
    at tryCallOne (node_modules\promise\lib\core.js:37:12)
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\node_modules\promise\lib\core.js:123:15
    at flush (node_modules\asap\raw.js:50:29)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

  22. promptRecognizers
    should recognize a localized choice without any synonyms:

    Uncaught AssertionError [ERR_ASSERTION]: false == true

    • expected - actual

    -false
    +true

    at botbuilder (tests\promptRecognizers.js:75:17)
    at next (lib\Session.js:86:17)
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\lib\Session.js:110:17
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\lib\DefaultLocalizer.js:64:17
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\node_modules\async\lib\async.js:52:16
    at done (node_modules\async\lib\async.js:246:17)
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\node_modules\async\lib\async.js:44:16
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\lib\DefaultLocalizer.js:61:64
    at tryCallOne (node_modules\promise\lib\core.js:37:12)
    at C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\node_modules\promise\lib\core.js:123:15
    at flush (node_modules\asap\raw.js:50:29)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

  23. recognizers
    should match a LocalizedRegExpRecognizer:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\work\v3\clean10.30.2018\BotBuilder-V3\Node\core\tests\recognizers.js)

[bug]
[javascript]

First prompt of proactive localised formflow in wrong language in bot framework

Version

3.16.1.38846

Describe the bug

I'm trying to create a localised formflow that can be proactively triggered. I'm able to create the form and trigger it through an API call using the proactive dialog trigger. However, the first question is always in English, despite the locale not being English. Nonetheless, it expects an answer in the locale in play (Mandarin in this case, (zh-SG)).

If I were to not trigger it through my API, all my questions are localised based on whatever locale I send in through the bot framework emulator. I tested this by setting up a keyword check in the root dialog, and I'm able to get all my formflow questions asked in the language specified. I've attached screenshots of how this seems to play out too.

To Reproduce

Steps to reproduce the behavior:

  1. Create a simple form
  2. Localise the form using the guide in the documentation
  3. Call the form using the bot framework emulator using a simple keyword check in the root dialog. Use the default locale of en-US
if (activity.Text.Equals("Trigger"))
{
    var form = new FormDialog<Form1>(new Form1(), Form1.BuildForm, FormOptions.PromptInStart, null);
    context.Call(form, formCompleteAsync);
}
  1. Call the form using the bot framework emulator using a simple keyword check in the root dialog. Use the other language's locale (in this case, zh-SG)
  2. Call the form using a proactive dialog trigger through a WebAPI. Method looks like this. Parameters such as the activity object have been previously seralised to a database. I've obscured certain parameters to protect some confidential information
public IHttpActionResult Post([FromBody]Model Model)
{
  if (ModelState.IsValid)
  {
      try
      {
          StartProactiveDialogAsync(model.someId, model.anotherId)
          return Ok();
      }
      catch (Exception ex)
      { 
          return BadRequest(ex.Message);
      }
  }
  else
  {
      return BadRequest(ModelState);
  }
}

StartProactiveDialogAsync

public async Task StartProactiveDialogAsync(someId, anotherId )
{
    try
    {
        // Recreate the message from the conversation reference that was saved previously.
        Activity activity = JsonConvert.DeserializeObject<Activity>(BotUserData.ConversationReference);

        MicrosoftAppCredentials.TrustServiceUrl(activity.ServiceUrl);
        var client = new ConnectorClient(new Uri(activity.ServiceUrl));

        // Create a scope that can be used to work with state from bot framework.
        using (var scope = DialogModule.BeginLifetimeScope(Conversation.Container, activity))
        {
            var botData = scope.Resolve<IBotData>();
            await botData.LoadAsync(CancellationToken.None);

            // This is the dialog stack.
            var stack = scope.Resolve<IDialogTask>();

            // Create the new dialog and add it to the stack.
            var dialog = new CallDialog(parameter1, parameter2);
            stack.Call(dialog.Void<object, IMessageActivity>(), null);
            await stack.PollAsync(CancellationToken.None);

            // Flush the dialog stack back to its state store.
            await botData.FlushAsync(CancellationToken.None);
        }
    }
    catch (Exception e)
    {
        await ProprietaryDiagnosticsTool.SendDiagnostic(e);
    }
}

CallDialog

public class CallDialog : IDialog<object>
{
    Parameter1 param1;
    Parameter2 param2;
    public CallDialog(Parameter1 param1, Parameter2 param2)
    {
        this.param1 = param1;
        this.param2 = param2;
    }
    public async Task StartAsync(IDialogContext context)
    {
        switch (param1.Id)
        {
            case 1:
                {
                    var form = new FormDialog<Form1>(new Form1(), Form1.BuildForm, FormOptions.PromptInStart, null);
                    context.Call(form, formComplete);
                    break;
                }
            case 2:
                {
                    var form = new FormDialog<Form2>(new Form2(), Form2.BuildForm, FormOptions.PromptInStart, null);
                    context.Call(form, formComplete);
                    break;
                }
            case 3:
                {
                    var form = new FormDialog<Form3>(new Form3(), Form3.BuildForm, FormOptions.PromptInStart, null);
                    context.Call(form, formComplete);
                    break;
                }
        }

    }

    private async Task formComplete(IDialogContext context, IAwaitable<FormParent> result)
    {
        var ans = await result;
        await context.PostAsync("Result received");
        context.Done(this);
    }
}

Expected behavior

When calling the proactive dialog which calls the form in a different locale, the form should be presented in the locale specified

Screenshots

English formflow triggered through keyword - correct
English formflow triggered through keyword

English formflow triggered through API - correct
English formflow triggered through API

Mandarin formflow triggered through keyword - correct
Mandarin formflow triggered through keyword

Mandarin formflow triggered through API - incorrect
Mandarin formflow triggered through API

The error message says

"Yes" is not an option for question 1.

Additional information

I've traced the context.activity object through the various methods, from StartProactiveDialogAsync to CallDialog all the way till the formComplete method. The locale does tend to be correct, its simply the display of the first question of the proactive dialog calling the formflow that happens to be in the wrong language.

[bug]

conversationId is private

From @huajunzhao on September 13, 2018 2:53

The Microsoft Bot Framework team prefers that "How To" questions be submitted on Stack Overflow. The official Bot Framework GitHub repository  is the preferred platform for submitting bug fixes and feature requests.

Bot Info

  • SDK Platform:
  • SDK Version:
  • Active Channels:
  • Deployment Environment:

Issue Description

We're trying to add the below code in Chat.tsx to resume the conversation history in webchat.

const botConnection = new BotChat.DirectLine({
secret: 'XXXXXXXXXXXXXXXXXXXXXX',
conversationId: localStorage.conversationId,
watermark: "01",
webSocket: false,
pollingInterval: 5000
});

BotChat.App({
botConnection: botConnection
,user: { id: 'USER_ID', name: 'User' },
resize: 'detect'
}, document.getElementById("chatdiv"));

botConnection.connectionStatus$.subscribe(function (status) {
if (status == 2) { // wait for connection is 'OnLine' to send data to bot
var convId = botConnection.conversationId;
if (convId !== localStorage.conversationId) {
localStorage.setItem('conversationId', convId);
}
}
});

Code Example

Reproduction Steps

Expected Behavior

Be able to get the conversation after botconnection is created. Any suggestions?

Actual Results

Getting the build error Property 'conversationId' does not exist on type 'IBotConnection'

Copied from original issue: microsoft/botframework-sdk#5055

[Skype] Botframework publishing review ping test failed

Version

  • SDK: .Net Core 2.1
  • Deployment Environment: Azure Bot Service
  • Microsoft.Bot.Connector Version: 3.15.3

Issue description

I'am trying to publish my bot. During test ping request I get InternalServerError. The connector client makes POST request on https://dev.botframework.com/v3/conversations/test/activities but instead of json it gets some html.
So app throws Newtonsoft.Json.JsonReaderException:

Unable to deserialize the response. Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

Bot works properly in unpublished Skype and Web Chat channels.

Here's call stack:

Microsoft.Rest.SerializationException:
   at Microsoft.Bot.Connector.Conversations+<SendToConversationWithHttpMessagesAsync>d__7.MoveNext (Microsoft.Bot.Connector, Version=3.15.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.Bot.Connector.ConversationsExtensions+<SendToConversationAsync>d__5.MoveNext (Microsoft.Bot.Connector, Version=3.15.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at SoftServe.ThinkIterateDeliver.BotServiceApp.BL.Implementation.ActivityDispatcher+<ProcessActivity>d__4.MoveNext (SoftServe.ThinkIterateDeliver.BotServiceApp.BL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullSoftServe.ThinkIterateDeliver.BotServiceApp.BL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: C:\Build\Agent_06\11\s\SoftServe.ThinkIterateDeliver.BotServiceApp.BL\Implementation\ActivityDispatcher.csSoftServe.ThinkIterateDeliver.BotServiceApp.BL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 54)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at SoftServe.ThinkIterateDeliver.BotServiceApp.Web.Controllers.Api.InteractionController+<ProcessMessage>d__2.MoveNext (SoftServe.ThinkIterateDeliver.BotServiceApp.Web, Version=1.0.0.1, Culture=neutral, PublicKeyToken=nullSoftServe.ThinkIterateDeliver.BotServiceApp.Web, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null: C:\Build\Agent_06\11\s\SoftServe.ThinkIterateDeliver.BotServiceApp.Web\Controllers\Api\InteractionController.csSoftServe.ThinkIterateDeliver.BotServiceApp.Web, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null: 35)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor+TaskOfIActionResultExecutor+<Execute>d__0.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Threading.Tasks.ValueTask1.get_Result (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.ValueTaskAwaiter1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+<InvokeActionMethodAsync>d__12.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+<InvokeNextActionFilterAsync>d__10.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow (Microsoft.AspNetCore.Mvc.Core, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next (Microsoft.AspNetCore.Mvc.Core, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+<InvokeInnerFilterAsync>d__13.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextExceptionFilterAsync>d__24.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
Inner exception Newtonsoft.Json.JsonReaderException handled at Microsoft.Bot.Connector.Conversations+<SendToConversationWithHttpMessagesAsync>d__7.MoveNext:
   at Newtonsoft.Json.JsonTextReader.ParseValue (Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed)
   at Newtonsoft.Json.JsonTextReader.Read (Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed)
   at Newtonsoft.Json.JsonReader.ReadForType (Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed)
   at Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject (Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at Microsoft.Bot.Connector.Conversations+<SendToConversationWithHttpMessagesAsync>d__7.MoveNext (Microsoft.Bot.Connector, Version=3.15.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)

Update dependency versions to clear npm audit warnings

Version

What package version of the SDK are you using.

3.15

Describe the bug

Give a clear and concise description of what the bug is.

Versions of jsonwebtoken and base64url are out of date and cause "moderate" security warnings when running npm audit

To Reproduce

Clone the repo
npm i
npm audit

You will see moderate warnings about these packages.

Expected behavior

No warnings should be shown.

Screenshots

screen shot 2018-10-25 at 4 52 36 pm

Additional context

Add any other context about the problem here.

[bug]
[javascript]

WhatsApp

Hi

Will the new BotFramework V3 support WhatsApp too?

Thank you!

Can't loadSession from bot.on('event', event => {})

Version

Botbuilder: 3.15.0,
Node.js: 8.9.0
Running on my local machine

Description

The call for builder.UniversalBot.loadSession fails silently while called in the builder.UniversalBot.on handler.

To Reproduce

Steps to reproduce the behavior:

  1. A Directline postActivity is created on the client. A 'event' type message with text 'connect' is sent to the bot.
  botConnection
    .postActivity({
      from: user,
      type: 'event',
      text: 'connect'
    })
    .subscribe(
      id => console.log('Posted activity, assigned ID ', id),
      error => console.log('Error posting activity', error)
    );
  1. A handler is created in the bot. It's suppose to call loadSession with the provided address recieved from the event but it never enters the callback.
bot.on('event', data => {
  bot.loadSession(data.address, (error, session) => {
    if (error) {
      console.error(error);
    }
    ...
  });
});
  1. If I promisify the loadSession:
bot.on('event', data => {
  const promisifyLoadSession = promisify(bot.loadSession);
  promisifyLoadSession(data.address)
    .then(_ => {
      console.log(_);
    })
    .catch(err => {
      console.error(err);
    });
});

I get the following catched error message and stack trace:

{
message: "Cannot read property 'loadSessionWithOptionalDispatch' of undefined",
stack: "TypeError: Cannot read property 'loadSessionWithOptionalDispatch' of undefined
    at UniversalBot.loadSession (/home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:253:14)
    at internal/util.js:227:26
    at UniversalBot.bot.on.data (/home/fbulic/Bots/Bot-HandOff/app.ts:75:5)
    at emitOne (events.js:116:13)
    at UniversalBot.emit (events.js:211:7)
    at /home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:156:31
    at /home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:427:53
    at UniversalBot.tryCatch (/home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:516:13)
    at next (/home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:427:23)
    at UniversalBot.eventMiddleware (/home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:430:9)
    at /home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:141:23
    at /home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:472:53
    at UniversalBot.tryCatch (/home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:516:13)
    at /home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:472:23
    at UniversalBot.tryCatch (/home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:516:13)
    at UniversalBot.lookupUser (/home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:459:14)
    at /home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:136:19
    at /home/fbulic/Bots/Bot-HandOff/node_modules/async/lib/async.js:181:20
    at replenish (/home/fbulic/Bots/Bot-HandOff/node_modules/async/lib/async.js:319:21)
    at /home/fbulic/Bots/Bot-HandOff/node_modules/async/lib/async.js:330:15
    at Object.async.forEachLimit.async.eachLimit (/home/fbulic/Bots/Bot-HandOff/node_modules/async/lib/async.js:220:35)
    at UniversalBot.receive (/home/fbulic/Bots/Bot-HandOff/node_modules/botbuilder/lib/bots/UniversalBot.js:133:15)"
}

Expected behavior

Should loadSession without failing silently.

[bug]
[javascript]

Directline channel closing connections when using context.PostAsync. Resulting in 502 on client.

Version

3.19.1.44133

Describe the bug

The Directline channel seems to be offline. The channel closes any connection when trying to send response messages, resulting in exceptions.
Other channels such as FB Messenger and Emulator still works with the same code.

To Reproduce

Steps to reproduce the behavior:

  1. Receive a message from a Directline channel
  2. Start a new dialog
  3. Send a response message to the context
  4. See exception
public async Task StartAsync(IDialogContext context)
{
  var msg = context.MakeMessage();
  msg.Text = "Hello";
  try
  {
    await context.PostAsync(msg);
  } catch (Exception exception)
  {                
    throw;
  }
}

Expected behavior

Should send response message to the connection and not throw and exception.

Additional context

Stack trace of the caught exception

System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
   at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
   --- End of inner exception stack trace ---
   at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
   at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult)
   at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
   at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Rest.RetryDelegatingHandler.<>c__DisplayClass11_0.<<SendAsync>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Rest.RetryDelegatingHandler.<SendAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.Bot.Connector.Conversations.<ReplyToActivityWithHttpMessagesAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Bot.Connector.ConversationsExtensions.<ReplyToActivityAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Bot.Builder.Dialogs.Internals.AlwaysSendDirect_BotToUser.<Microsoft-Bot-Builder-Dialogs-Internals-IBotToUser-PostAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Bot.Builder.Dialogs.Internals.InputHintQueue.<Microsoft-Bot-Builder-Dialogs-Internals-IMessageQueue-QueueMessageAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Bot.Builder.Dialogs.Internals.AutoInputHint_BotToUser.<Microsoft-Bot-Builder-Dialogs-Internals-IBotToUser-PostAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Bot.Builder.Dialogs.Internals.MapToChannelData_BotToUser.<PostAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Bot.Builder.Dialogs.Internals.LogBotToUser.<Microsoft-Bot-Builder-Dialogs-Internals-IBotToUser-PostAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Bot.Builder.Dialogs.Internals.DialogContext.<Microsoft-Bot-Builder-Dialogs-Internals-IBotToUser-PostAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IKEA.ChatBot.Dialogs.RootDialog.<StartAsync>d__0.MoveNext() in C:\...\Dialogs\RootDialog.cs:line 21

[bug]
[dotnet]

Failed to load resource: the server responded with a status of 502 (Bad Gateway)

Version

3.15.3
Web Chat
deployed to Canada Central resource

Describe the bug

response is very slow
In webchat we got below error
Failed to load resource: the server responded with a status of 502 (Bad Gateway)
https://directline.botframework.com/v3/directline/conversations/JZkwqPEo6Ev703cWNzLdeB/activities

To Reproduce

we created simple hello asp.net application
it is take 5-7 sec to post back to webchat event from test environment

Expected behavior

Give a clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

similar to issue microsoft/botframework-sdk#4559
[bug]
[dotnet]

[Skype for Business] doesn't render buttons or HTML

System Information

SDK Version: 3.13.1

Issue Description

No way to send HTML content to a Skype for business client. According to https://msdn.microsoft.com/en-us/skype/skype-for-business-bot-framework/docs/overview it should be possible.
The messages are always sent as plain text and not HTML.

Example Code

builder.Prompts.choice(session, "What's your preferred language?", "English|Spanish|Arabic", { listStyle: builder.ListStyle.button });

Expected behavior

The message should appear with three buttons.

Actual Results

The output is like this: https://www.screencast.com/t/awcds8Et1
Either no buttons or numbered list of three options.

Question

Doesn't Skype for business support HTML content? Or is it some particular Skype for business client?

[bug]
[javascript]
[nodejs]
[node.js SDK]
[skypeforbusiness]
[botbuilder]

Dialogue.choice can not display more than 3 selections in facebook messenger

Version

3.15.22

Describe the bug

I used the Dialogue.choice to display selections.
In the Web Chat, it look like this
image

But in the facebook messenger it look like this
image
image

To Reproduce

I also tried the hero card and channeldata, the facebook layout is always same.

Expected behavior

It seems a issue in botframework, and I want to know how to display long line selection which have more than 3 selections.

[bug]
[dotnet]

Bot takes > 10 seconds for the first response and At very First load bot gives error "Bot Code is having an issue"

From @PrernaGupta1 on October 23, 2018 3:55

Bot Info
•SDK Platform: .NET
•SDK Version: 3.8.1.0
•Active Channels: Direct Line
•Deployment Environment: Azure App Service deployed version

Issue Description

  1. Bot takes > 10 seconds for the first response
  2. At very First load bot gives error "Bot Code is having an issue" and to resolve the issue we need to start app service

Expected Behavior

Response time should remain similar around 500ms.
Bot should be up and running without restarting an app service

Copied from original issue: microsoft/botframework-sdk#5115

AdalAuthenticator does not accept empty MicrosoftAppId and MicrosoftAppPassword

Version

Clean pull of the repository.

Describe the bug

ArgumentNullException when messaging a bot without MicrosoftAppId and MicrosoftAppPassword

To Reproduce

Steps to reproduce the behavior:

  1. download the source
  2. set EchoBot as the startup project
  3. remove the MicrosoftAppId and MicrosoftAppPassword from web.config
  4. run the bot
  5. connect to the local bot from the emulator without appid and password
  6. send the bot a message and observe exception

System.ArgumentNullException: 'Value cannot be null.
Parameter name: clientId'

Stack Trace:

at Microsoft.IdentityModel.Clients.ActiveDirectory.ClientCredential..ctor(String clientId, String clientSecret)
at Microsoft.Bot.Connector.MicrosoftAppCredentials..ctor(String appId, String password) in C:\work\v3\clean11.16.2018\BotBuilder-V3\CSharp\Library\Microsoft.Bot.Connector.Shared\MicrosoftAppCredentials.cs:line 65
at lambda_method(Closure , Object[] )
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()

Expected behavior

Communicating with a bot from the emulator without an appid and password in bot or emulator should work

Screenshots

image

Additional context

Introduced with #53

[bug]
[dotnet]

Bot takes > 10 seconds for the first response and At very First load bot gives error "Bot Code is having an issue"

From @PrernaGupta1 on October 23, 2018 3:55

Bot Info
•SDK Platform: .NET
•SDK Version: 3.8.1.0
•Active Channels: Direct Line
•Deployment Environment: Azure App Service deployed version

Issue Description

  1. Bot takes > 10 seconds for the first response
  2. At very First load bot gives error "Bot Code is having an issue" and to resolve the issue we need to start app service

Expected Behavior

Response time should remain similar around 500ms.
Bot should be up and running without restarting an app service

Copied from original issue: microsoft/botframework-sdk#5115

Microsoft.Bot.Connector.ErrorResponseException: Operation returned an invalid status code 'Unauthorized

Version

SDK Platform: .NET
Microsoft.Bot.Builder 3.16.1.38846
Microsoft.Bot.Connector 3.16.1.38846

Describe the bug

Getting 'Microsoft.Bot.Connector.ErrorResponseException: Operation returned an invalid status code 'Unauthorized' exception while calling context.PostAsync() from today. our all production bots have this issue. yesterday bots are working fine. From today only we have this issue.

To Reproduce

When ever Interact with bot throwing exception

Expected behavior

bot should return proper response

Additional Info

  1. Using Table Storage For Bot State.
  2. Webchat working fine. On Facebook Messenger Getting this issue.
  3. Tried Re-Deploying and Restarting the server.

High memory usage when using FormFlow JSON schema.

Version

Microsoft.Bot.Builder.FormFlow.Json

3.15.2 Not repro
3.15.2.3 Not repro
3.15.3 Repro
...
3.17.0.42969 Repro

Describe the bug

High memory usage occurs in the sample of Annotated Sandwich Bot when using FormFlow JSON schema.
Every time I answer the question written in JSON, the memory usage increases about 100 MB. OutOfMemoryException occurred in my customer's environment.

To Reproduce

Steps to reproduce the behavior:

  1. Open this sample in Visual Studio 2017.
    AnnotatedSandwichBot
    https://github.com/Microsoft/BotBuilder-V3/tree/master/CSharp/Samples/AnnotatedSandwichBot

  2. Change the code.
    code

  3. Click 'Start Debugging'

  4. Talk with bot using emulator and see memory window

Expected behavior

Stable memory usage
memory

Additional context

Compare of [email protected] and [email protected]
https://github.com/Microsoft/BotBuilder-V3/compare/[email protected]@3.15.3.0

I think this change is the cause of this issue.
4fbea59

Since OrderBy method has poor memory efficiency, I think that high memory usage is occurring as the following discussion.

How to avoid OrderBy - memory usage problems
https://stackoverflow.com/questions/3329985/how-to-avoid-orderby-memory-usage-problems

[bug]
[dotnet]

Microsoft Teams channel: Malformed Video card - Invalid aspect value

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Version

What package version of the SDK are you using.
3.15.0

Describe the bug

Video Card and Animation Card are not shown in Microsoft Teams channel. In emulator or other channel - no problems.

To Reproduce

Steps to reproduce the behavior:

  1. Create bot that produces Video Card or Animation Card
  2. Add MS Teams channel
  3. See error in https://portal.azure.com

Expected behavior

Normal view of Video Card, Animation card

Screenshots

When I got to Azure portal to MS Teams channel I see this:

We have searched across all v3 code base - there is no aspect property or anything. It exists only from v4 in C#

[bug]
[javascript]

Send List Template with ChannelData to Facebook Messenger returned 'Bad Request'

Version

bot builder V3.15.2.2

Describe the bug

Using the bot framework V3.15.2.2, I send a List Template to Face book by ChannelData, but it is failed, and I get the exception of [Operation returned an invalid status code 'BadRequest'] .
But I send the Json by curl, it was successful.

To Reproduce

`
RootDialog.cs

public virtual async Task ChoiceReceivedAsync(IDialogContext context, IAwaitable<Object> activity)
    {
            var message = context.MakeMessage();
            message.ChannelData = getListTemplate();
            await context.PostAsync(message);
   }

private object getListTemplate()
    {
        ListMessenger fbmsg = new ListMessenger();
        fbmsg.ChannelData = 
            new ListMessengerChannelData
            {
                notification_type = "NO_PUSH",
                attachment = new ListMessengerAttachment { payload = new ListMessengerPayload()}
            };
        fbmsg.ChannelData.attachment.type = "template";
        fbmsg.ChannelData.attachment.payload.template_type = "list";
        fbmsg.ChannelData.attachment.payload.top_element_style = "compact";
        List<ListMessengerElement> e = new List<ListMessengerElement>();
        e.Add(new ListMessengerElement
        {
            title = "Classic T  Shirt Collection",
            subtitle = "See all our colors",
            image_url = "https://peterssendreceiveapp.ngrok.io/view?item=101",
            buttons = new ListPostbackButton[] { new ListPostbackButton { title ="select", type = "postback", payload = "Collection" } },
        });
        e.Add(new ListMessengerElement
        {
            title = "Classic White T Shirt",
            subtitle = "See all our colors",
            default_action = new ListMessengerAction { type = "web_url", url= "https://peterssendreceiveapp.ngrok.io/view?item=101", messenger_extensions = false, webview_height_ratio ="tall"}
        });
        e.Add(new ListMessengerElement
        {
            title = "Classic Blue T Shirt",
            subtitle = "100 Comfortable",
            image_url = "https://peterssendreceiveapp.ngrok.io/view?item=101",
            default_action = new ListMessengerAction { type = "web_url", url = "https://peterssendreceiveapp.ngrok.io/view?item=101", messenger_extensions = true, webview_height_ratio = "tall", fallback_url= "https://peterssendreceiveapp.ngrok.io/" },
            buttons = new ListPostbackButton[] { new ListPostbackButton { title = "select", type = "postback", payload= "Blue" } },
        });
        List<ListPostbackButton> bs = new List<ListPostbackButton>();
        bs.Add(new ListPostbackButton { type = "postback", title = "View More", payload = "View More" });
        fbmsg.ChannelData.attachment.payload.elements = e.ToArray();
        fbmsg.ChannelData.attachment.payload.buttons = bs.ToArray();
        return fbmsg.ChannelData;
    }`

`
ListTemplate.cs

public class ListMessenger
{
    public ListMessengerChannelData ChannelData { get; set; }
}

public class ListMessengerChannelData
{
    public string notification_type { get; set; }
    public ListMessengerAttachment attachment { get; set; }
}

public class ListMessengerAttachment
{
    public string type { get; set; }
    public ListMessengerPayload payload { get; set; }
}

public class ListMessengerPayload
{
    public string template_type { get; set; }
    public ListMessengerElement[] elements { get; set; }
    // for list only
    public string top_element_style { get; set; }
    // for list only
    public ListPostbackButton[] buttons { get; set; }
}

public class ListMessengerElement
{
    public string title { get; set; }
    public string subtitle { get; set; }
    public string item_url { get; set; }
    public string image_url { get; set; }
    public ListPostbackButton[] buttons { get; set; }
    public ListMessengerAction default_action { get; set; }
}

public class ListUrlButton : ListMessengerAction
{
    public string title { get; set; }
}

public class ListPostbackButton
{
    public string type { get; set; }
    public string title { get; set; }
    public string payload { get; set; }
}
public class ListMessengerAction
{
    public string type { get; set; }
    public string url { get; set; }
    public Boolean messenger_extensions { get; set; }
    public string webview_height_ratio { get; set; }
    public string fallback_url { get; set; }
}

}`

`
the Json generated by Bot Framework Emulator

"channelData": {
"notification_type": "NO_PUSH",
"attachment": {
  "type": "template",
  "payload": {
    "template_type": "list",
    "elements": [
      {
        "title": "Classic T  Shirt Collection",
        "subtitle": "See all our colors",
        "image_url": "https://peterssendreceiveapp.ngrok.io/view?item=101",
        "buttons": [
          {
            "type": "postback",
            "title": "select",
            "payload": "Collection"
          }
        ]
      },
      {
        "title": "Classic White T Shirt",
        "subtitle": "See all our colors",
        "default_action": {
          "type": "web_url",
          "url": "https://peterssendreceiveapp.ngrok.io/view?item=101",
          "messenger_extensions": false,
          "webview_height_ratio": "tall"
        }
      },
      {
        "title": "Classic Blue T Shirt",
        "subtitle": "100 Comfortable",
        "image_url": "https://peterssendreceiveapp.ngrok.io/view?item=101",
        "buttons": [
          {
            "type": "postback",
            "title": "select",
            "payload": "Blue"
          }
        ],
        "default_action": {
          "type": "web_url",
          "url": "https://peterssendreceiveapp.ngrok.io/view?item=101",
          "messenger_extensions": true,
          "webview_height_ratio": "tall",
          "fallback_url": "https://peterssendreceiveapp.ngrok.io/"
        }
      }
    ],
    "top_element_style": "compact",
    "buttons": [
      {
        "type": "postback",
        "title": "View More",
        "payload": "View More"
      }
    ]
  }
}

}

`

Expected behavior

I hope you can help me find the problem and give me the solution if possible.

Screenshots

image

Additional context

Add any other context about the problem here.

[bug]
[dotnet]

IMPLEMENTING LUIS WITH OPTIONS

Im using Azure to develop my bot. Im trying to create a bot using LUIS where if i ask it for a scan, it should give me back four types of analysis for a scan for eg: metrology, porosity, reverse engineering and wall thickness. Then i can choose an option form it.I feel like this is a very easy thing to do but im very new to computer programming, node.js. and bots.

This is how far ive gotten, i dont know how to progress from here,
code:

bot.dialog('CT scan',
    (session) => {
        session.send('You asked for a CT scan', session.message.text);
        session.endDIalog();
    }   
).triggerAction({
    matches: 'CT scan'
})

I also found this on another page in this forum. Can i implement this code in my code to get the result i want and how do i do it?
code:

===================================================================

var DialogLabels = {
    Hotels: 'Hotels',
    Flights: 'Flights',
    Support: 'Support'
};

var bot = new builder.UniversalBot(connector, [
    function (session) {
        // prompt for search option
        builder.Prompts.choice(
            session,
            'Are you looking for a flight or a hotel?',
            [DialogLabels.Flights, DialogLabels.Hotels],
            {
                maxRetries: 3,
                retryPrompt: 'Not a valid option'
            });
    },
    function (session, result) {
        if (!result.response) {
            // exhausted attemps and no selection, start over
            session.send('Ooops! Too many attemps :( But don\'t worry, I\'m handling that exception and you can try again!');
            return session.endDialog();
        }

        // on error, start over
        session.on('error', function (err) {
            session.send('Failed with message: %s', err.message);
            session.endDialog();
        });

        // continue on proper dialog
        var selection = result.response.entity;
        switch (selection) {
            case DialogLabels.Flights:
                return session.beginDialog('flights');
            case DialogLabels.Hotels:
                return session.beginDialog('hotels');
        }
    }
]);

Bug: Multiple responses per request

From @rwmb on August 28, 2018 13:21

Botbuilder is sending multiple responses from the same request. When we send a message to the handler, it first sends a 202 (accepted) and then tries to send the response that the user requested (the handled message). This breaks the HTTP standard and prevents me from using botbuilder with Google Cloud Functions, because the first response stops the execution of the function (expected behavior). I've already created issues on firebase, google cloud platform, botframework and stack overflow, but as I imagined and as everyone suggested, the problem is the non-standard and unexpected behavior of the package.

Copied from original issue: microsoft/botbuilder-js#379

DirectLine not responding to client

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Version

Version 3
Direct Line

Describe the bug

Send Hello to bot, activities are not sent back

To Reproduce

Steps to reproduce the behavior:
On a bot with directline interface, if you send a Hi to a bot, you get no response back

Expected behavior

Give a clear and concise description of what you expected to happen.
Bot is not answering to client

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

[bug]
[javascript]

Unable to save Kik channel configuration

  • SDK Platform: Node.js
  • SDK Version: 3.x.x
  • Deployment Environment: Bot Channel Registeration Service
  • Issue Description
  • Cannot Save Kik Channel Configuration

Reproduction Steps

1-Goto Azure Portal
2-Select Bot App
3-Channels
4- Kik
5- Add Credentials (Display Name and Token)
6- Save

Expected Behavior

Save and Enable Kik Channel

Actual Results

Unable to save. Failed to register with: BadRequest ID:

Screenshot

sketch1543672334363

Other

Messenger and Telegram are working but Kik configuration page is throwing an error. I've tried to connect bot with kik through a different Bot Service in Azure but getting the same error.

GetConversations MethodNotAllowed

Version

3.15.2.0

Describe the bug

GetConversations returns MethodNotAllowed

To Reproduce

Steps to reproduce the behavior:

var connector = new ConnectorClient(new Uri(context.Activity.ServiceUrl));
Conversations c = new Conversations(connector);
var conversations = c.GetConversations();

Expected behavior

GetConversations returns a list of conversations

[bug]
[dotnet]

[bug] [skype] [slack] GetConversationsAsync returns MethodNotAllowed

Version

3.16.1.38846

Describe the bug

GetConversationsAsync returns MethodNotAllowed

To Reproduce

try
{
                var connector = new ConnectorClient(new Uri(activity.ServiceUrl)); 
                var conversationsResponse = await connector.Conversations.GetConversationsAsync();
                await context.PostAsync(conversationsResponse.Conversations.Count.ToString());
}
catch (Exception ex)
{
                await context.PostAsync(ex.Message);
}

Expected behavior

GetConversationsAsync returns a list of conversations

Screenshots

[bug]
[dotnet]

bot not responding with Citrix Secure Web Mobile browser

Version

  • V3.
  • .NET framework
  • Directline Implementation

Describe the bug

Bot is totally not functional in Citrix secure web.
Where as bot is working fine Chrome mobile browser
We're are using in secure brower to secure with authentication.

To Reproduce

Steps to reproduce the behavior:

  1. Open the bot link in Citrix Secure browser in Mobile
  2. Say hi to bot
  3. You'll not see any message sent back by bot

Expected behavior

Bot should work the way it function in desktop browser

Additional context

Needed to respond in Citrix Secure web Mobile reason being user is authenticated and context of current user is set.
Link to app Citrix Secure web mobile

Operation returned an invalid status code 'Unauthorized'

From @LlewellynJones on October 25, 2018 17:53

Version

Microsoft.Bot.Builder {3.15.3}
Microsoft.Bot.Connector {3.15.3}

Describe the bug

I am not experiencing any issues on my localhost without authentication, but after the app has been uploaded to Azure user's experience the "sorry my bot code is having an issue" error when starting the app. The error is logged as follows:

Microsoft.Bot.Connector.ErrorResponseException Operation returned an invalid status code 'Unauthorized'

To Reproduce

Open Skype and start a conversation or restart a conversation with bot framework app. The error also happens using webchat.

Expected behavior

Start conversation without error

[bug]

Copied from original issue: microsoft/botbuilder-dotnet#1061

C# Daily Build needs to follow semver rules

The daily build is not properly following semver rules.

Attemping to build a "-preview" release incorrectly stamps the package version into the assemblyinfo files as the assembly versions. The build then fails, as assembly versions need to be 1.2.3.4 format.

Also, the build should allow the "Exact Version" semantics the C# v4 builds use.

I am wondering whether I can save some data into BotDataStorage before user send the first message to bot

SDK Platform

.Net BotBuilder 3.12.24

URL of Code Sample

No

Problem Description

I am wondering whether I can save some data into BotDataStorage before user send the initial message to bot.

what I have done and know:

  1. Enable the default BlobTable implementation to manage state data.

  2. Bot send proactive message to user and save some user-specific data by using StateClient.
    At this point, I know the bot framework actually did not save anything to BlobTable, I checked the
    BlobTable there was no ConversationId I create at proactive message.

    However I still can retrieve the data then I think at this point still using the memory to cache the
    BotData, I also knew in conversation object there has a ExpireIn property, I can imaging the data will
    be lost if user did not reply within certain amount of time. Also I want to know if I save as UserData
    whether it will be expired also.

  3. If user reply the message, then the BotData will be shown in the BlobTable.

So I want to know why the first proactive message will not persistent the data into BlobTable.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.