I am trying to get a bot working in Microsoft Teams, hosted in azure, written in Node / Javascript.
To eliminate the issue being my code I am currently just trying to host one of the microsoft sample bots... https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/javascript_nodejs/07.using-adaptive-cards
I'm finding the bot is working on localhost. It also working through NGROK and if I use the bot emulator and load the bot from azure at endpoint... https://cnbeaconbot.azurewebsites.net/api/messages This works too.
What isn't working is when I add the bot to my MS Teams app through the app studio application. Initially to get a demo working I haven't added secrets / passwords or authentication to my bot at this point. I'm looking to set up the simplest possible demo that I can build from.
I havent made any customisations to the MS sample, the code for can be found here... https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/javascript_nodejs/07.using-adaptive-cards
In the bot service console in Azure, within the Test in Web chat channel I have an error "There was an error sending this message to your bot: HTTP status code Unauthorized"
But no errors have been logged within my Teams channel. I've checked the endpoints, they all match what I'm using in Bot emulator and I'm not sure what else to check.
In teams when I summon my bot with the @mention it doesn't respond as expected. There is no response from the bot at all.
I've using Teams web app in chrome along with fiddler hoping it would return a HTTP error, 404, 500 but there's nothing outputting there.
If anyone has deployed an azure app in node and using Teams App Studio I'd appreciate any insights.
Thanks in advance :) Andy
Got some more info, here's what the test in Web Chat is returning
Utj-TW1baCBV.js:9 [Microsoft_Azure_BotService] 1:01:13 PM
MsPortalFx.Base.Diagnostics.ErrorReporter 1
MsPortalFx.Base.Diagnostics.ErrorReporter: _errorData: undefined
_sourceErrorLevel: undefined
baseTypes: ["MsPortalFx.Errors.AjaxError","MsPortalFx.Errors.Error"]
code: undefined
data {"uri":"https://botservice.hosting.portal.azure.net/botservice/api/ClientTrace","type":"POST","pathAndQuery":"","requestId":"5738e762-2aa1-4640-b086-495936e70007","failureCause":"","sessionId":"40a3f6eb3b284c5fa66db8b8fe21a06a","status":404,"statusText":"error","duration":47.82500024884939}
errorLevel: 2
errorThrown:
extension: Microsoft_Azure_BotService
handled: undefined
innerErrors: []
jqXHR: {"readyState":4,"responseText":"Not
Found","status":404,"statusText":"error"}
message: ajaxExtended call failed
name: Error
source: undefined
stack: null
textStatus: error
timestamp: 80466.26000013202
type: MsPortalFx.Errors.AjaxError https://webchat.botframework.com/v3/directline/conversations/8hFWddDOnZm5fuIih3b4Sz-a/activities 502
and also...
b2bn3_EAuRkB.js:19 POST https://botservice.hosting.portal.azure.net/botservice/api/ClientTrace 404
Seem to mention both a 502 and 404 there so'll I'll post more info if I find anything out.