SOLVED

Hero card does not load in Desktop MS Teams App, but It works fine in Web MS Teams version

Brass Contributor

 

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();

 

 

 

Dev Preview Detailed errorDev Preview Detailed errorFails in MS Teams Desktop environmentFails in MS Teams Desktop environmentError in Dev PreviewError in Dev PreviewWorking fine in Web versionWorking fine in Web version

 

8 Replies

@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.

@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",
                        },
                    },
                };
          }

 

 

@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?

@Nikitha-MSFT  Image I have already attached in the earlier requests. Let me share the steps, how my application works.

 

  1. Run Bot command. It will return one Hero card with one CardAction Button (i.e. Configure Button caption).
  2. On Button Click -> It will come to  Event -> OnTeamsTaskModuleFetchAsync
  3. Code in event OnTeamsTaskModuleFetchAsync as below.
 return new TaskModuleResponse
                {
                 Task = new TaskModuleContinueResponse
                    {
                        Value = new TaskModuleTaskInfo()
                        {
                            Url = "www.website.com/configurepage",
                            Height = 410,
                            Title = "Configuration the App",
                        },
                    },
                };

4. The above code will open one pop up as Task Module.

5. This webpage contains three text boxes and one button.

6. The user input would be saved in the database on button click event (resides under webpage).

 

Here the issue in Point no 4 (Pop up containing webpage)

MS Team Windows App - Pop up open with empty page. This behavior is not consistent. Some time it works fine and sometimes it does not work. I have attached a screenshot in an earlier communication. And I have shared image error in the Dev Preview environment.

MS Teams Web Version (chrome) - it works fine every time in MS Teams Web version.

 

That might be possible that you are not able to reproduce this issue because of it works fine in my environment too(since the last three days).

I would request you to keep this case open for further detailed investigation.

 

 

best response confirmed by NadirRiyani (Brass Contributor)
Solution

@NadirRiyani - We could reproduce the issue on our side. Raised a bug for this.

@Nikitha-MSFT  thank you for your response. Request you to please share an update as soon as this bug gets fixed.

@NadirRiyani - We are looking into it we don't have ETA to share when it will be available.

 

@Nikitha-MSFT - we are tracking it internally we don't have ETA to share when it will be fixed.

1 best response

Accepted Solutions
best response confirmed by NadirRiyani (Brass Contributor)
Solution

@NadirRiyani - We could reproduce the issue on our side. Raised a bug for this.

View solution in original post