-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TeamsInfo.GetMemberAsync(...) doesn't work properly in Skill Bot scenario, it returns http 405 error. #6432
Labels
bug
Indicates an unexpected problem or an unintended behavior.
customer-reported
Issue is created by anyone that is not a collaborator in the repository.
Comments
ramfattah
added
bug
Indicates an unexpected problem or an unintended behavior.
needs-triage
The issue has just been created and it has not been reviewed by the team.
labels
Aug 5, 2022
Hey @JuanAr I'm able to reproduce this issue where if we call the method Sharing the steps I took:
protected override async Task OnMessageActivityAsync(ITurnContext<IMessageActivity> turnContext, CancellationToken cancellationToken)
{
if (turnContext.Activity.Text.Contains("end") || turnContext.Activity.Text.Contains("stop"))
{
// Send End of conversation at the end.
var messageText = $"ending conversation from the skill...";
await turnContext.SendActivityAsync(MessageFactory.Text(messageText, messageText, InputHints.IgnoringInput), cancellationToken);
var endOfConversation = Activity.CreateEndOfConversationActivity();
endOfConversation.Code = EndOfConversationCodes.CompletedSuccessfully;
await turnContext.SendActivityAsync(endOfConversation, cancellationToken);
}
else if (turnContext.Activity.Text.Contains("test"))
{
try
{
var activity = turnContext.Activity;
var member = new TeamsChannelAccount();
if (activity.ChannelId == Channels.Msteams)
{
member = await TeamsInfo.GetMemberAsync(turnContext, activity.From.Id, cancellationToken);
if (member.Name != null)
{
await turnContext.SendActivityAsync(MessageFactory.Text(member.Name), cancellationToken);
}
else
{
await turnContext.SendActivityAsync(MessageFactory.Text("member.Name is null"), cancellationToken);
}
}
else
{
await turnContext.SendActivityAsync(MessageFactory.Text("ChannelID is not msTeams"), cancellationToken);
}
}
catch (System.Exception ex)
{
logger.LogInformation(ex.Message);
throw;
}
}
else
{
var messageText = $"Echo: {turnContext.Activity.Text}";
await turnContext.SendActivityAsync(MessageFactory.Text(messageText, messageText, InputHints.IgnoringInput), cancellationToken);
messageText = "Say \"end\" or \"stop\" and I'll end the conversation and back to the parent.";
await turnContext.SendActivityAsync(MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput), cancellationToken);
}
} |
tracyboehrer
added
customer-reported
Issue is created by anyone that is not a collaborator in the repository.
and removed
needs-triage
The issue has just been created and it has not been reviewed by the team.
labels
Aug 9, 2022
tracyboehrer
pushed a commit
that referenced
this issue
Aug 30, 2022
…Bot scenario, it returns http 405 error (#6443) * Implement GetMemberAsync for skills * Add unit test
tracyboehrer
pushed a commit
that referenced
this issue
Sep 1, 2022
…Bot scenario, it returns http 405 error (#6443) * Implement GetMemberAsync for skills * Add unit test
tracyboehrer
added a commit
that referenced
this issue
Sep 1, 2022
* README version to 4.18 (#6425) Co-authored-by: Tracy Boehrer <[email protected]> * [#6434] Priority broken for RegexRecognizer (#6435) * Consider priority in OnRecognizeAsync method * Add unit test * Update Bool function to use Convert.ToBoolean (#6431) * Update IsMatch empty string values (#6426) * [#6428] Adaptive ForEachElement loop's incorrectly when changes cause ContinueDialogAsync to be recalled (#6448) * Reacquire childDialogState after ContinueDialogAsync * Add unit test * Support passing sas token url's for token service (#6449) Co-authored-by: Swagat Mishra <[email protected]> * Bump @actions/core from 1.6.0 to 1.9.1 in /actions/verify-pr-labels (#6445) Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.6.0 to 1.9.1. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) --- updated-dependencies: - dependency-name: "@actions/core" dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Support passing sas token url's for token service (#6449) Co-authored-by: Swagat Mishra <[email protected]> * [#6428] Adaptive ForEachElement loop's incorrectly when changes cause ContinueDialogAsync to be recalled (#6448) * Reacquire childDialogState after ContinueDialogAsync * Add unit test * Delete vnext code which is dead (#6440) * Fix PublishToCoveralls.ps1 (#6439) * Remove failing Powershell patch download * Upgrade coveralls.net to 4.0.1 * [#6430] Adaptive ForEachElement does not exit when child action CancelAllDialogs is called (#6452) * Consider canceled status to end the dialog * Add unit test * [#6432] TeamsInfo.GetMemberAsync(...) doesn't work properly in Skill Bot scenario, it returns http 405 error (#6443) * Implement GetMemberAsync for skills * Add unit test * [#6433] Error in AdaptiveDialog.ContinueActionAsync with native dialog SDK (#6444) * Add condition before loading the resource * Add unit tests * Load AdaptiveDialogs dynamically on DialogContext Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Tracy Boehrer <[email protected]> Co-authored-by: Cecilia Avila <[email protected]> Co-authored-by: Joel Mut <[email protected]> Co-authored-by: swagat mishra <[email protected]> Co-authored-by: Swagat Mishra <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: BruceHaley <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Indicates an unexpected problem or an unintended behavior.
customer-reported
Issue is created by anyone that is not a collaborator in the repository.
[Summary]
Severity 3 = Urgent or High business impact, no SLA impact
[GENERAL INFO]
The TeamsInfo.GetMemberAsync() doesn't work properly in the Skill Bot scenario, it returns http 405 error. I can replicate the same issue on my lab,
[PROBLEM DESCRIPTION]
I used 80.skills-simple-bot-to-bot to reproduce this issue,
https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore/80.skills-simple-bot-to-bot
There are bot projects in the sample, one is root bot (SimpleRootBot) and another one is skill bot (EchoSkillBot). I use TeamsInfo.GetMemberAsync() in the EchoSkillBot.
Noted,
weyao-SkillBot is SimpleRootBot
weyao-EchoBot is EchoSkillBot
I can see the 405 error in the application's trace log
. I replicated the same issue on a simple SkillBot.
[TROUBLESHOOTING STEPS]
I added the code snippet in the EchoSkillBot for testing TeamsInfo.GetMemberAsync(...)
Here is the source code of TeamsInfo.GetMemberAsync(...),
As I investigated,
Based on the source code, it will create a HTTP GET request to “https://{rootbot}/api/skills/v3/conversations/{conversationId}/members/{userId}”. This request was sent to SimpleRootBot and routed to GetConversationMembersAsync(…) of SkillController. But the HTTP attribute doesn't have {UserID} in the URL rule.
I think that's the root cause of this issue.
[BUSINESS IMPACT]
One Premire customer used TeamsInfo.GetMemberAsync(...) in their Skill Bot. They experienced error and raised a ticket to CSS team. Customer uses Graph API relace of this method now.
[ASK FOR PG]
Need to check and confirm whether it's a bug or not. If it's a SDK bug, please help to fix it.
The text was updated successfully, but these errors were encountered: