File upload failed MSTeams - microsoft-teams

I am not able to attach or upload any kind of attachments through my bot integrated with MSTeams .previously it was working fine for me..suddenly it stop working. and I am getting the error as "File upload failed". I also checked my one-drive and cleared all other docs for getting space..but still it is not working.

Related

Error When Uploading Attachments with Directline App Service Extension

We are attempting to upload a xml file using Directline App Service Extension, but getting an error with the message: "Error getting value from 'ReadTimeout' on 'Microsoft.Bot.Streaming.Payloads.PayloadStream'."
We have deployed an Azure bot and have enabled Directline App Service Extension as we want to restrict access to our bot.
We followed the Microsoft Docs https://learn.microsoft.com/en-us/azure/bot-service/bot-service-channel-directline-extension-net-bot?view=azure-bot-service-4.0 and correctly configured the bot.We are getting an "Error getting value from 'ReadTimeout' on 'Microsoft.Bot.Streaming.Payloads.PayloadStream'." error when we try to upload a config.xml file.
Bot was working fine, but after enabling Directline ASE, we are getting this error.

Attachment preview not working in Microsoft Teams: Bot framework v4

Teams Application with a bot and the permission of the file uploading enabled.
Can't see the preview of the attachment sent to this bot on Microsoft Teams even if the JSON response of the file upload confirms the upload success.
The attachment is visible on the browser via the browser link (if we are logged in with the team's web app).
The error message is:
This item might not exist or is no longer available This item might
have been deleted, expired or you might not have permission to view
it. Contact the owner of this item for more information.
This issue got fixed though in this bug

There was an error saving the channel: Namespace not found (Cortana channel)

We just created a botframework account and created a new bot using the basic template. The both is deployed in Azure.
When we try to add the Cortana channel, we get the following error when saving the channel configuration:
Oops. We had trouble saving your configuration
There was an error saving the channel:
Namespace not found
Another error that might be related, when we navigate to the Cortana dashboard page (https://developer.microsoft.com/en-us/cortana/dashboard#!/home) we get the following error:
We are unable to load your skills at this time. Please refresh the page or try again later.
Does anyone know how these errors can be troubleshooted?

Debugging published bot

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.

bot framework channel emulator returning unauthorized

I have updated my bot to the latest version of bot connector . But I keep getting the error unauthorized on every message I send although the message is received but after that the emulator shows error . I went with the tutorial at Microsoft website and I am still having the same error , I have commented [Bot Authentication] but still getting unauthorized.
Below is the screenshot from the emulator
Did you change AppID and AppSecret to MicrosoftAppID and MicrosoftAppPassword in the web.config, as well as updating the MicrosfotAppPassword value?
I found the answer , very weirdly but its written in the documentation (http://docs.botframework.com/en-us/csharp/builder/sdkreference/gettingstarted.html ) , you have to clear the app id and app password values and it will work.

Resources