OfficeDev / Copilot-for-M365-Samples

Microsoft Copilot for Microsoft 365 samples

Home Page:https://aka.ms/extendcopilotm365

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: M365 copilot plugin is not reading adaptive card as a response from message extension

ShujaathKhan opened this issue · comments

Sample

msgext-multiparam-ts

Description

We've all the pre-requisites to do the copilot plugin development.

  1. Earlier we got started with sample solutions placed here which were working fine when tried as vanilla and as is.
  2. The same solution for plugin is now not working and though the valid adaptive card JSON is passed from code( which we could see from console log) from vs-code while the same works as message extension when tried separately outside the m365 copilot app.
  3. Besides, we've searched ppl are facing similar kinda issue which are raised in diff. forums as ex ref below
    https://techcommunity.microsoft.com/t5/copilot-for-microsoft-365/copilot-m365-not-showing-results-from-message-extension-plugin/m-p/4120042?lightbox-message-images-4133309=578372i01B70989D420AE33
    4.I also have a doubt in the function execution details of co-pilot plugin - Why 2 calls are being made to my plugin as 1 gets fails and second gets success. Also, from message extension this is not happening.
    image

Steps to reproduce

  1. Run the same sample as selected above.

Expected results

M365 co-pilot should respond as expected from the plugin which is enabled by the user when proper prompt is triggered and respond as adaptive card for the stock price asked.

image

Actual results

Observations

  1. After enabling developer mode on
  2. Copilot invokes plugin multiple time even on a single request
    image

Additional Info

Wanted why two attempts are being made as attached in screenshot

  1. first being unsuccessful and second being a successful one ( even though co-pilot is not evaluating the response). ref. screenshot below.
    image

When default sample plugin which was working 5/6
image
and same plugin is not working from next day 5/7.

image

Update on this
Observation : The same function executes twice, even we could see the logging of data from vs code as well.
image

Hey @ShujaathKhan 👋

Response status 0 generally means that your plugin did not respond within the timeout window which is 10 seconds. See https://learn.microsoft.com/microsoft-365-copilot/extensibility/debugging-copilot-plugin for more information.

If the plugin response is returned within 10 seconds, then I would suggest raising a support ticket via the Microsoft 365 admin portal (if you have a support arrangement) or raising a new question of Microsoft Q&A to get further support. See https://learn.microsoft.com/microsoft-365-copilot/extensibility/feedback for more information.

Hey @ShujaathKhan ,

I faced this issue and was able to resolve it, though I am still investigating the root cause. It appears to be related to the adaptive card and its creation in the backend.

To resolve it, you can generate a sample message extension bot project using the Teams Toolkit. Then, copy the adaptive card TypeScript(or JavaScript, if your project is in JavaScript ) code from the sample project and paste it into your solution. Keep the outer adaptive card code the same, and make the necessary changes. This approach should work, as the sample project code will always work.