Forum Discussion

AyeshaKulsumSJ's avatar
AyeshaKulsumSJ
Brass Contributor
Sep 04, 2022

Error when trying to update adaptive card

I am trying to update the adaptive card in a channel with the click of a button in the Personal bot. But I get the following error.

Error: Message does not exist in the thread.

const newActivity = MessageFactory.attachment(CardFactory.adaptiveCard(
{
'type': 'AdaptiveCard',
'version': '1.5',
'body': [
{
'type': 'Container',
 
]
}));
newActivity.id = messageId;
const turnContext = new TurnContext(adapter, activity);
BotConnector.MicrosoftAppCredentials.trustServiceUrl(activity.serviceUrl);
await turnContext.updateActivity(newActivity);
    • NanddeepNachan's avatar
      NanddeepNachan
      Learn Expert

      Hi AyeshaKulsumSJ 

      Please have another look at the Azure Bot configuration for the correct Bot ID from there is mentioned in your code configuration.

      Also, as you have channelized the bot to MS Teams, have a look if there are any errors reported.

      • AyeshaKulsumSJ's avatar
        AyeshaKulsumSJ
        Brass Contributor

        NanddeepNachan 

        Please find logs below

        [Message does not exist in the thread.
        Error: Message does not exist in the thread.
        at new RestError (node_modules/@azure/ms-rest-js/dist/msRest.node.js:1403:28)
        at /node_modules/@azure/ms-rest-js/dist/msRest.node.js:2528:37
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (internal/process/task_queues.js:95:5)
        at async fnc.]

         

Resources