Forum Discussion
Hero card does not load in Desktop MS Teams App, but It works fine in Web MS Teams version
Hi,
I have populated one Hero card using Event called OnTeamsTaskModuleFetchAsync. The Popup is not getting load in MS Teams Windows environment. but its getting load in Web version. I'vetried to identify the root cause of the issue in Developer Preview, and it seems that there is an error in Console. Attaching screen shot for the same.
I see the issue in MS teams pages is "https://teams.microsoft.com/iframe-container.html".
Is this a bug in MS Teams or Do I need to check this at Dev level? Just to update you it was working fine 3 days back.
Code I have used class extend by "TeamsActivityHandler"
Attaching few screens for refference.
return new HeroCard()
{
Title = "Welcome to Bot company",
Subtitle = "Hi, I'm Bot! To begin with.......",
Buttons = new List<CardAction>()
{
new TaskModuleAction("Configure", new { data = "welcomecard"})
},
}.ToAttachment();
NadirRiyani - We could reproduce the issue on our side. Raised a bug for this.
- Nikitha-MSFTMicrosoft
NadirRiyani - TaskModule currently supports only Adaptive card and Html pages as documented here. It is not possible to open a Hero card inside a task module. However, you can invoke a TaskModule from a Hero card. The screenshot you shared does not look like a herocard. Could you please share more details on what you are trying.
- NadirRiyaniBrass Contributor
Nikitha-MSFT : Thanks for the quick response. The process as below.
1. Display Hero card with one button
2. Open Webpage on Button click.
Now the issue is, I am able to see Task Module in MS Team Web but on Windows MS Team setup it works exceptionally. (Some time it works, sometimes it does not). Is it known or expected?
OR Correct me if any correction required in code here
issue image added on first request.
protected override async Task<TaskModuleResponse> OnTeamsTaskModuleFetchAsync(ITurnContext<IInvokeActivity> turnContext, TaskModuleRequest taskModuleRequest, CancellationToken cancellationToken) { return new TaskModuleResponse { Task = new TaskModuleContinueResponse { Value = new TaskModuleTaskInfo() { Url = AppSettings.WebLink + "/configurepage", Height = 410, Title = "Configuration Settings", }, }, }; }
- Nikitha-MSFTMicrosoft
NadirRiyani - We could not repro the issue on our side. Could you please share a screenshot of the page you are trying to load in web. Does this require any user Authentication?