Version 3.5.20
The emulator at first is supposed to return a response with the number of characters of a user input string. However even after using the default endpoint url which is http://localhost:3978/api/messages, whenever inputting a string, the message is not sent. What appears in the log is show in one of the images below.
When accessing the app settings, the emulator port is modifiable. The emulator port was 9002 by default and even changing it to 9000 (which I remember seeing in some other posts) did not fix the issue.
Log
Emulator listening on http://[::]:9002
failed to start ngrok: spawn D:\Downloads\Setup\ngrok-stable-windows-amd64\ngrok.
Click here to configure ngrok.
Checking for new verson...
Application is up to date.
From the contents of your log, it would seem that no attempt was made to connect to a bot. When you enter your bot's endpoint http://localhost:3978/api/messages, a panel should appear with a CONNECT button. Did you click on this button?
Ok I just figured it out.
After you create the 'Bot Application' project in Visual Studio, you need to run the project and then the browser will display a message. The url of this webpage would be localhost:3979 by default. This four digit number must also be in the endpoint URL of the 'Bot Framework Emulator'.
Just click on the 'Enter your endpoint URL' field on top and you will be able to edit it. Mine was set to '3978' by default and after changing it to '3979' the issue was solved.
Related
I've had a Slack app up and running for quite some time which has been working flawlessly. The app sends messages that have an interactive button on it. It also has slash command interactivity.
However, since this morning, whenever a user presses the button on the message, Slack displays an exclamation point (!) next to it with the message "Error in establishing a secure connection. Please use a secure certificate for the interactivity URL of this app."
The SSL cert on my server is not expired and I've made absolutely no changes to the Request URL within the app's settings. Does anyone know what the problem may be?
I have an accounting application that i use to send emails. Recently with the latest Outlook 365 update, every time i try and send an email, i get the error
"Sorry, something went wrong. You may want to try again."
The application is working through OLE to communicate with Outlook. In the application, there is an option to show the email before sending. This requires myself to click on Send. This option works fine.
However if do not want to see the email before sending and want it to be sent automatically, this is when the error comes up.
I have changed the Programmatic Access to to never warn me and allow 3rd party applications to go through. Prior to changing this setting, outlook use to pop up with a box asking permission for the application to go through. I used to click Allow and the error still appeared. With the above change, it does not prompt for me to allow but the error still appears.
I've integrated the Code from Microsoft.Bot.Sample.AadV2Bot in my own bot but the GetTokenDialog call always results in error "AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application: 'MYBOTSAPPID'"
As far as I understood, I do not have to register my bot in Azure Portal under "Azure Active Directory" but setup the Reply URL in the application registration Portal (https://apps.dev.microsoft.com) - Correct?
But whatever values I enter here, it won't work, neither locally via Emulator nor via Web. Furthermore, in MS Teams the signin Dialog does not work at all.
I've already tried these reply URLs without success:
https://MYBOTSNAME.azurewebsites.net, http://localhost:3978 and https://localhost:44362
I also tried to extend these with /api/messages, /signin-oidc and several other combinations, all without success.
The mentioned sample solution also does not include more keys than ConnectionName, MicrosoftAppId and MicrosoftAppPassword in web.config, so I haven't got a clue which redirect URI is taken on runtime.
In Azure Portal I've created an Azure Active Directory V2 Connection on my bot and entered my bot's Microsoft App ID in the field "Client ID" and Microsoft App Password in the field "Client Secret" - is this correct?
Any hint what I might have done wrong is VERY welcome!!
I finally could solve the Reply URL mismatch problem myself. Had to enter this Reply URL on my app in the application Registration Portal to make it work locally, via Emulator:
https://token.botframework.com/.auth/web/redirect
Still, the authentification Dialog (GetTokenDialog class from Microsoft.Bot.Builder.Dialogs) doesn't popup when I use MS Teams as channel.
Does anyone have an idea what could help?
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.
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: