Closed montacerdk closed 5 years ago
Investigating
Hi, here is some more details,
I just changed the LUIS App in the .bot file with these steps:
I tested the new LUIS app after starting the bot, and everything is alright. Suddenly, I got the Error above when I tried to test the bot with Emulator. it indicated a trouble with authentication (microsoftAppId and microsoftAppPassword).
I followed the instructions in this tutorial from the Bot Framework Docs Troubleshooting Bot Framework authentication.
As a first step, If I delete the microsoftAppId and microsoftAppPassword from the .bot file and make their values null in the index.js file, the error disappears and I can test the bot from Emulator without any issue.
const adapter = new BotFrameworkAdapter({
appId: null,
appPassword: null
});
Then, in the second step, I sent this this request in order to check the validity of the appId and appPassword:
curl -X POST \
https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials&client_id=<APP_ID>&client_secret=<APP_PWD>&scope=https://api.botframework.com/.default'
Then, I found out the the appId and appPassword are valid because I received the access token.
Response:
{
"token_type": "Bearer",
"expires_in": 3600,
"ext_expires_in": 3600,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGGAKI..."
}
However, I was blocked in the third steps because the same error persists.
For now, the bot starts fine when I run it from VSCode, as shown in this picture.
Then, If I start the emulator and it tries to connect the bot I get the same error …
I hope that this explantion would be helpful to understand the issue.
Thanks,
@jwiley84, this issue is resolved just by generating a new botFileSecret.
Closing as resolved
@jwiley84, this issue is resolved just by generating a new botFileSecret.
How to do this?
I am developing a bot with Microsoft Bot Framework for Node.js.
I changed the LUIS App in the .bot file wit ha new one and then I generated a new botFileSecret, I tested my bot locally with the Bot Framework Emulator and everything just worked fine.
Then, I got this error:
After a research, I found this article on Bot Framework Docs explaining how to resolve the bot authentication.
I followed up the steps ..
First step, I verified the App ID and the App Password from the Azure Portal. Then, I deleted the APP ID and the App PWD, I verified that the bot starts fine. I sent a this HTTP request via commandLine to check authentication:
I got this response:
Any help for this issue please ?