ProvisionError: Failed to provision Developer Portal bot registration pops up when trying to debug sample bot project locally - microsoft-teams

I'm following the guidelines to debug this TeamsFx-Samples/share-now at vscode, the provision & deploying process are all good, the bot has successfully been deployed on Azure.
However, the task 'set-up-bot' will fail and throw an error when i'm trying to debug the project locally:
[2022-12-11T02:55:29.879Z] [Info] - Finished 'Set up tab' Visual Studio Code task in 0.12 seconds.
[2022-12-11T02:55:29.917Z] [Info] - Running 'Set up bot' Visual Studio Code task.
(Totally 5 steps) Teams Toolkit is setting up bot for debugging.
(1/5) Registering the AAD app which is required to create the bot ...
(2/5) Registering the bot in Bot Framework Portal ...
Summary:
√ Skip registering AAD app but use the existing AAD app from args: c87d9e6d-5f17-4c76-abe3-5a1c1643e937
× ProvisionError: Failed to provision Developer Portal bot registration.
It looks like no documentation or issues about this error out there.
Would someone tell me what is this 'Registering the bot in Bot Framework Portal ' thing doing and how can I deal with this error?
What is this 'Registering the bot in Bot Framework Portal ' thing doing
how can I deal with this error.

Updates:
The server-side API issue was resolved around two hours ago.
I did a quick check, and the local debug experience of TTK was working good now.
Can you help verify this in your convenience and give some feedbacks here? Thanks.
after some investigations and verifications, It seems there's some live-site issues related to the underlying API of creating bot registration on bot framework portal. We're actively connecting with the corresponding team to handle this issue, please stay tunned, thanks.
Check this issue https://github.com/OfficeDev/TeamsFx/issues/7184 for latest updates, thanks.

Related

Bot is not responding in web chat after publishing it using visual studio

I have created one bot in composer. Created all required services (App service, QnA Maker, LUIS, Web App Bot). I have added LUIS Configuration value (key and endpoint). Added QnA Maker key also. My bot is working fine Remotely.
I have given Microsoft AppId & Password in Appsettings.JSON .
I published the bot using Visual Studio. It got published successfully.
When I tried to test it from azure portal using test in web chat, it is not responding.
I am getting the error "There was an error sending this message to your bot: HTTP status code InternalServerError".
How to check the internal error and how I can fix that?
Thanks in advance.
enter image description here
Composer performs several tasks to prepare and build your bot files when publishing it that VS might not do. If building and deploying the bot through Visual Studio is not working, you could try the command line method, or just stick with Composer's own publish utility.

Microsoft Bot Framework - bot missing from "Bot Framework" tenant. How to add?

Half a year ago we created a bot using the App Studio app from Teams. This worked well and the bot is running happily. Apparently starting 2022 App Studio "evolved":
So, this time using the new "evolved" Developer Portal, we registered a similar bot in another environment.
Just to end up with a bot that somehow is not registered in the Microsoft-internal bot framework tenant. I cannot say how we ended up in this state but there is a troubleshooting site that we can use to verify our failed state. The result of this simple call looks like this:
For googleability:
AADSTS700016: Application with identifier
'68dafaa0-5755-4433-8f47-3e174c5ed131' was not found in the directory
'Bot Framework'. This can happen if the application has not been
installed by the administrator of the tenant or consented to by any
user in the tenant. You may have sent your authentication request to
the wrong tenant.
Now the question: how can we add our bot to this "Bot Framework" tenant? And: which of the button clicks in the Dev Center and/or Bot Framework portal do the magic of adding the bot? The troubleshooting article unfortunately gives no advice on how to fix this situation.
We also tried removing the bot via the Bot Framework portal and re-created it with the same IDs and had the hope this fixes the situation. Unfortunately not.
Note: everything else is in place and looks like our other functioning bot. A teams app containing the bot, the Azure AD app registration with the bot ID, the bot in the bot portal, correct client secret. Everything seems correct except that the bot ID is missing from the Bot Framework tenant.
Just ran into the same issue. It looks like you have your bot registered into your tenant (and not the global bot framework). So you can get the access token by changing the URL to the following (replacing with your tenant id):
https://login.microsoftonline.com/YOUR-TENANT-ID/oauth2/v2.0/token
Just tested this and was able to get an access token. Now will that token actually work the same way using the scope is another matter. You may need to change the scope to:
https://graph.microsoft.com/.default
As of now I am getting a token either way
To generate a bot directly into the global tenant you can go to the following URL and click on "My Bots" and then "Create". Any existing bots you have should also appear here:
https://dev.botframework.com/

Chat Bot is not working - HTTPS internal server error

I have created a sample Echo bot for testing i've followed the given instructions in the MS tutorial site.
Created a web app service
Downloaded the MS bot framework v4 SDK - Echo Bot
Got the Publishing profile
Published the bot using visual studio
tested the chat bot When i test my bot in Test in Web Chat option in bot channels registration.
before that i tested in bot framework emulator, it was working fine as expected.
I checked the microsoft appid and password, it is all fine.
what am i missing to look on. can anyone please guide me.
Finally I've found the issue, though it a minor mistake. I wanted to update it here since many new Azure Bot users might do this mistake like me.
It was due to the option which i selected in while doing the app registration, After selecting the third option for Who can use this application or access this API?
It always good to select Multitenant option to make the bot to work for everyone.
If your requirement is restricted to one particular tenant then you should select the first option. But it is not in my case.
Accounts in any organizational directory (Any Azure AD directory -
Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)

LUIS ERROR: Sorry, my bot code is having an issue

I created new LUIS bot from azure portal, and tested in "Test in Web Chat", it was working fine.
I created new app in luis.ai portal, with few indents and entities, also trained and published. Now updated the application id and and app key under Application settings for Luis APPId and LUIS API Key respectively in Azure portal, after that if i type anything in "Test in web chat" I'm consistently getting this below message
"Sorry, my bot code is having an issue."
If anyone solved this plz let me know, I'm not sure what mistake am making here
I tried recreating the scenario and it worked for me.The error message which you are getting is the default bot notification of an unhandled exception. I would suggest you do the following steps:
1.Download the bot code and run it locally to check for errors.
2.Try debugging the bot using ngrok.
You can use the documentation here to troubleshoot the issue.

Azure Bot Service - "An internal Error occured at the server"

I have created a bot service app in Azure that works fine when I create it. I go through the Microsoft App ID, password screen and it loads the chat emulator and code in browser (using the LUIS template and node.js language). After sometime, if I go back to load that app service from Azure dashboard, it keeps giving me "An Internal error occurred at the server" error message. I am not sure if I shouldn't be going to the newly created Bot Service from dashboard? I did this 3-4 times already, with new names, new RG etc., it's the same issue every time.
Thanks
Unfortunately this looks like a bug, there are are two open issues right now on the SDK's repo that look very similar to yours. Here is one of them; 'InternalServerError - Bot & QnA Maker'.
Regarding the downvote, it might be because there isn't a screenshot of the issue which usually helps in answering questions. Also, explaining the steps you undertook or compared against would have helped give a clearer picture for the community to answer.

Resources