简体   繁体   中英

MS Teams | Microsoft bot framework - Returns 502 error on task/fetch

I have an MS Teams adapter written using the botframeworks sdk v4 for node js which works perfectly for normal conversations. But when I try to do a task/fetch, it returns an error message "Unable to reach app. Please try again." on the task module popup

在此处输入图片说明

I can see from the inspector that it returns 502 response for the request to invoke the task module

在此处输入图片说明

The task module returns a simple adaptive card and I can see that I get a callback on my handleTeamsTaskModuleFetch function from the logs

在此处输入图片说明

The adapter runs on a docker container with an nginx proxy and the nginx logs shows that, it returns a 200 response whenever I click on the task module launch button

I have a similar setup in my dev and taskmodule works perfect there

Any help is highly appreciated

Update

I have tried hardcoding the adaptive card. That doesnt help either

在此处输入图片说明

Eventually it was found that there was a problem with one of the csp headers and microsoft was not happy about it.

I removed the CSP headers and the taskmodule started working

Thanks to @gousia-msft for your help in debugging the issue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM