I'm trying to find out what is wrong with my bot. This is a bot meant as back-end for a Cortana skill. The bot is built with the bot framework version 3.8.0. I'm running it on an Azure Bot Service instance (Azure Function).
Locally, everything works as expected. I'm using the bot framework emulator to test everything; all great. Now I publish the bot to Azure and invoke it using Cortana. Cortana replies there's an issue with the bot.
When I check the diagnotics log in Azure, I see the following:
2017-07-18T08:11:34.252 Exception while executing function: Functions.messages
2017-07-18T08:11:34.252 Invalid channel data.
2017-07-18T08:11:34.272 Executed 'Functions.messages' (Failed, Id=e5eae9f5-97e4-4a35-aa5f-5c7d58a63aed)
2017-07-18T08:11:34.272 Invalid channel data.
2017-07-18T08:11:34.272 Function had errors. See Azure WebJobs SDK dashboard for details. Instance ID is 'e5eae9f5-97e4-4a35-aa5f-5c7d58a63aed'
2017-07-18T08:11:34.272 Invalid channel data.
2017-07-18T08:11:34.315 {"id":"6f095c10-d9e8-4ad0-a6a8-caf052288f8b","requestId":"2f4c950c-2459-4467-8579-4f3b5bc45e6b","statusCode":500,"errorCode":0,"messsage":"An error has occurred. For more information, please check the logs for error ID 6f095c10-d9e8-4ad0-a6a8-caf052288f8b"}
2017-07-18T08:11:34.315 Invalid channel data.
2017-07-18T08:11:34.194 Function completed (Failure, Id=e5eae9f5-97e4-4a35-aa5f-5c7d58a63aed, Duration=4626ms)
2017-07-18T08:11:34.252 Exception while executing function: Functions.messages. Microsoft.Bot.Connector: Invalid channel data.
So "invalid channel data" seems to be the main error here, but that doesn't tell much. I enabled all logging on the server and downloaded + inspected these; there's nothing more useful in there.
I also attached a debugger to the remote process. I see my dialog method being called and finished without any problem. So the issue doesn't appear to be in my code, but in the framework somewhere? But I have no idea on where to go next.
BTW I also tried updating to the latest version of the SDK (3.8.5) but it appears that Microsoft.Bot.Builder.Azure has a dependency on version 3.8.0 cause it won't run after upgrading due to a assembly load error (it's trying to load 3.8.0).
You can debug your Azure published BOT locally. This will help you to find the real issue.
I am adding the steps how to debug Azure published BOT in locally.
Enable Debug in Azure Application setting:
Open Azure Portal.
Click on Azure Web Bot.
Click on Application Settings, In the Debugging section On Remote Debugging and select your Visual Studio Version.
enter image description here
Get Publish Settings:
Click on All App service Settings
Click on Get publish profile to get the publish setting with all user name and paths. It will download the settings.
enter image description here
Click on the Attach to process ..
enter image description here
In the Connection target: type your bot url without http://.
Example: yourbotname.azurewebsites.net:4022
--Click on Find Button.
--This is asking you to give username and password. You need to get your azure username and password from publish file.
enter image description here
Now run your Web App or Cortana to debug your BOT and the get real Error.
Related
I have created LUIS App using following command msbot clone services --folder Export --name <NAME_OF_BOT> --groupName <NAME_OF_GROUP> --luisAuthoringKey <LUIS_AUTHORING_KEY> --location westus --subscriptionId <AZURE_SUBSCRIPTION_ID> --sdkLanguage Node --sdkVersion v4 --appId <APPLICATION_ID> --appSecret <APPLICATION_PASSWORD>
Everything worked as expected except one thing. The LUIS App created is not available for consumption and always throws the error "model not published. please publish your model before hitting the endpoint."
Logged in to https://luis.ai > Selected the LUIS App > Clicked on Manage tab > Clicked on Keys and Endpoints on the left panel > Ensured URL reference slot has "Production" selected > Clicked on the Endpoint URL for "Starter_Key" Resource Name > appended a sample questions next to q= in the URL payload opened in browser
Expected Result: LUIS will be able to evaluate my utterance
Actual Result: model not published. please publish your model before hitting the endpoint.
For argument purpose tried to change the "URL referencing slot" from Production to Staging and retried. The expectation was met. Republish the already published app to Production and retried but the behavior was exactly same.
Just to ensure this is not a known problem even with Apps created directly on LUIS, went ahead and created a sample app using LUIS portal directly. Published only to Staging and tried to invoke the URL while "URL referencing slot" had Production selected. Got exact same error message. The published to Production and retried and everything worked as expected.
In summary this issue seem to be only with LUIS apps published using "msbot clone services ..." command. We are just not able to publish the app to production slot even though LUIS portal says it has been published.
This issue was a bug in LUIS and has been fixed.
I have created bots using the azure portal, which auto creates a bot app resource in azure. When I click on this resource via the portal, I can access the bot by opening the chat window and can try out the bot.
I also created bot using visual studio, published it to the azure web and then configured a 'bot channels registration' bot to use this published bot.
All good so far.
Now I am trying to go through the ready made Microsoft examples from: https://learn.microsoft.com/en-us/azure/bot-service/dotnet/bot-builder-dotnet-samples?view=azure-bot-service-3.0
I opened the "Create new conversation" link from the above website (https://github.com/Microsoft/BotBuilder-Samples/tree/master/CSharp/core-CreateNewConversation). I scroll down and click on "Deploy to Azure" button and the deploy is successful. How do I access the bot now?
I have tried creating the 'bot channels registration' bot and setting the messaging endpoint to the https://DeployedExampleAzureWebsiteLink/api/messages. Now, when I go into this azure resource, and into the test chat window, my message does not get delivered to the bot, and same issue upon retry aswell.
How do I access this bot please?
When you click deploy to Azure you get an option to fill out the Microsoft App Id and Password.
You are supposed to enter the same App Id and Password you gave while registering the Bot in the Bot channel registration
I have created two bots via the Azure portal today (NodeJS blank & language understanding) and both bots don't work.
If I launch the emulator in the portal and send a message it states "Couldn't send retry" and the console shows the following:
On the Channels tab under Web Chat it shows the following errors:
My previously created bots work however.
Has anyone an idea what I might be missing here?
I am having a problem trying to create a Microsoft App ID and password for my Bot. After creating a bot on Bot Service on the Azure portal I try to create a Microsoft App ID.
When I click the Create Microsoft App ID and password button as shown on the image above, it opens a new tab and I get this error message:
I'm also having problems with a previously created bot. When I go to All Resources on the Azure portal and click on that previously created bot I get the following error message:
Unable to find the specified id
I thank you in advance for your time and help :)
I definitely saw this happening on some MSA accounts, it's not a Bot Framework or Azure Bot Service issue. Two things you might try:
try creating MSA AppId and Password directly from https://apps.dev.microsoft.com/
If this doesn't work, do you have another MSA account you could try with?
Hope this helps
Andrea
I've seen this error before. Retrying fixed the issue for me (click Create Microsoft App ID and password button again). Please try again. You might need to sign out, clear your cookies, and sign back in.
I have built a bot in massively.ai and set it all up in the Microsoft Bot framework. I have submitted it for review and it has been reviewed and published.
It is working fine in Skype, but does not work on the "web chat" channel or the Telegram channel. It also doesn't work in the test area on the MS Bot landing page
You can debug locally by clicking the "configure continuous integration button" in Azure. You will get a .zip file with the source code and then you can open it in VS or your editor of choice.
But since you are using Massively.ai what you could do is use or create a Trace class and use it in the Catch section of a Try/Catch to track and store errors and then show them in the Bot Framework emulator log. That might give you more information about the problem.
catch (Exception e)
{
Trace.TraceError("Some error in class X" + e.ToString());
return null;
}
To test the same bot in the emulator, you will need to find the end point, application ID and password for the bot service. The Settings tab only provides the partial message endpoint (ending with three dots). Therefore you will need to go to the developer site, https://dev.botframework.com/. Click on the Edit link. You will find the message endpoint there. Copy the entire URL and enter it in the emulator. Also, copy and paste the application ID and password from the bot developer portal.
You will also need to download the free tool, ngrok, which creates a tunnel between the bot hosted remotely (in this case on Massively.ai) and your computer behind the firewall. Click App Settings in the emulator. Browse to the location where ngrok.exe is located. Save the setting. The utility will be launched automatically from the emulator. At this point, the emulator is ready. Click “Connect” or the refresh icon. When you type something in the input box, You will see a response: