microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.49k stars 2.44k forks source link

[Bug] Bot has no response in chat after deploying to non-Testing environment and uploading to Teams #6637

Closed dylanw-oss closed 6 months ago

dylanw-oss commented 6 months ago

Version

"botbuilder": "^4.22.1", "@microsoft/teams-ai": "~1.1.1",

Describe the bug

After testing my bot on local with my Microsoft 365 Testing Tenant, tried to deploy bot to Azure and upload it to Teams, it has no response to my questions in chat.

To Reproduce

  1. Followed LightBot sample and tested it working in local with my Microsoft 365 Testing Tenant; js/samples/04.ai.c.actionMapping.lightBot
  2. Trying to deploy it to Azure MSIT tenant and Teams by following below steps. (based on https://github.com/microsoft/teams-ai/tree/main/js/samples#deploy-the-bot-to-azure)
  3. In VS code Teams toolkit, log out Microsoft 365 testing tenant, and login M365 and Azure with my Microsoft account;
  4. Delete "openAIKey": { "value": "${{SECRET_OPENAI_KEY}}"} from infra/azure.parameters.json, and added "AZURE_OPENAI_KEY=<>" and "AZURE_OPENAI_ENDPOINT=<>" to env/.env.staging
  5. Click "Provision" and select a resource group from a MSIT subscription;
  6. Click "Deploy",
  7. Click "Publish", it completed but I can't find the application in Teams,
  8. Try another way, click utility "Zip Teams App Package", and then in Teams -> Apps -> Manage your Apps -> Upload an App, select the package, now I can add the bot to my Teams.
  9. Chat with the bot in Teams, but it has no response to me.
  10. I also Validate the app package, no errors.
  11. I also checked Azure bot, there is a "Test in Web chat" function, I tried it and has no response, in channels blade I found there're some errors in Teams channel with message "Error occurred while communicating with bot", and I also queried logs in Azure portal, got empty records for "Activities Sent from Clients to Direct Line", "Bot To Channels", "Channel to Bot", "Clients To Direct Line Channel", "Failed Requests", etc. image

Expected behavior

The bot should give response to my questions.

Screenshots

Additional context

The bot working fine on my local debug with Microsoft 365 Testing Tenant.

Tracking Status

Dotnet SDK [TODO]()

Javascript SDK [TODO]()

Python SDK [TODO]()

Java SDK [TODO]()

Samples [TODO]()

Docs [TODO]()

Tools [TODO]()

tracyboehrer commented 6 months ago

@dylanw-oss This should likely be in the Teams AI repo.

dylanw-oss commented 6 months ago

@tracyboehrer , I opened the bug in Teams AI, and @corinagum told me this should be in Teams Toolkit team.

tracyboehrer commented 6 months ago

@dylanw-oss This also is Team Tookit. Sorry for the confusion. @corinagum What is Teams Tookit?

dylanw-oss commented 6 months ago

@tracyboehrer, do you know where I can find more information to investigate the issue? What I have now is only the error in Azure portal, bot's Teams channels, "Error occurred while communicating with bot". Is there a Teams log on local (event viewer?), when I chat with Bot but it has no repsonse, is there an error logged somewhere on my local machine?

tracyboehrer commented 6 months ago

@dylanw-oss I'll ping some folks. I talk with corinagum somewhat regularly, and others on her team.

dylanw-oss commented 6 months ago

@tracyboehrer , this issue can be closed, there is a bug in Teams-AI samples, https://github.com/microsoft/teams-ai/issues/1439