Skip to main content

Notifications

Copilot Studio - General
Answered

Getting Error :Error code: 3002 after publishing the bot

Posted on by 3

Hello,

I am developing a power automate flow that triggers from a power virtual agent. In the PA flow, I am trying to send adaptive cards to the users who invoke the bot and wait for their response. This flow is working well in the test mode of PVA, but once I publish the bot I am getting: Sorry, the bot can't talk for a while. It's something the bot's owner needs to address—error code: 3002.
image.png
Below error was thrown in the PA:
The execution of template action 'Return_value(s)_to_Power_Virtual_Agents' is failed: the client application timed out waiting for a response from service. This means that workflow took longer to respond than the alloted timeout value. The connection maintained between the client application and service will be closed and client application will get an HTTP status code 504 Gateway Timeout.

  • Kodyzak Profile Picture
    Kodyzak 22 on at
    Re: Getting Error :Error code: 3002 after publishing the bot

    found very usefull topic with workaround

     

    https://powerusers.microsoft.com/t5/Calling-Actions-from-Copilot/Why-does-Post-adaptive-card-and-wait-for-a-response-take-two/td-p/1632739

  • Kodyzak Profile Picture
    Kodyzak 22 on at
    Re: Getting Error :Error code: 3002 after publishing the bot

    i have the same problem.. sending to user two adaptive cards mid-conversation

    Kodyzak_0-1707163779462.png

    when flow is triggered first adaptive card is successfully send to user. Even if its submitted in 5 seconds, it shows "Your response was sent to the app" and waits two minutes for timeout. After 2 minutes error message is shown but the flow continues and second adaptive card is displayed. After submitting the second one, it is confirmed right away (no delay or timeout) and mail with data is sent correctly. If i change the order of adaptive cards there is again same error after the first one so the order change nothing.

    Kodyzak_1-1707163987186.png

    If i delete second adaptive card, timeout for the first one is still there

     

    Is there any way how to fix this?

  • terzogenito Profile Picture
    terzogenito 10 on at
    Re: Getting Error :Error code: 3002 after publishing the bot

    Sure. Here are the step in the production PVBA bot we have:

     

    1. User issues command "send message." The PVA topic calls a flow., That flow presents the user with an adaptive card.

    2023-03-25 11_31_18-RIMI Bot _ Microsoft Teams.png

    2. User fills in the adaptive card and hits "Submit for Approval." Notice the flow/bot responds "your response was sent to the app." But the adaptive card doesn't go away and provide the submission message.

     

    2023-03-25 11_31_44-Inbox - rjackvony@rimirad.com - Outlook.png

    3. Observing the in progress flow, it looks as if the flow is awaiting a response. Yet, user has pressed button.

    2023-03-25 11_47_46-Microsoft Power Automate - RIMI Bot - Microsoft​ Edge.png

    4. The bot eventually shows the submission message and an error message. 

    Sorry, the bot can't talk for a while. It's something the bot's owner needs to address. Error code: 3002. Conversation ID: xxxxxxxxxxxxxxxxxxxxxxx. Time (UTC): 3/25/2023 3:48:18 PM.

     

    If you look at the flow, it looks like the adaptive card submission worked fine. The flow continues and completes all other steps successfully. 

     

    It seems the "post adaptive card and await a response" step takes 2 minutes every time, which I think is the default timeout.

  • terzogenito Profile Picture
    terzogenito 10 on at
    Re: Getting Error :Error code: 3002 after publishing the bot

    Sure. Here are the step in the production PVBA bot we have:

     

    1. User issues command "send message." The PVA topic calls a flow., That flow presents the user with an adaptive card.

    2023-03-25 11_31_18-RIMI Bot _ Microsoft Teams.png

    2. User fills in the adaptive card and hits "Submit for Approval." Notice the flow/bot responds "your response was sent to the app." But the adaptive card doesn't go away and provide the submission message.

     

    2023-03-25 11_31_44-Inbox - rjackvony@rimirad.com - Outlook.png

    3. Observing the in progress flow, it looks as if the flow is awaiting a response. Yet, user has pressed button.

    2023-03-25 11_47_46-Microsoft Power Automate - RIMI Bot - Microsoft​ Edge.png

    4. The bot eventually shows the submission message and an error message. 

    Sorry, the bot can't talk for a while. It's something the bot's owner needs to address. Error code: 3002. Conversation ID: xxxxxxxxxxxxxxxxxxxxxxx. Time (UTC): 3/25/2023 3:48:18 PM.

     

    If you look at the flow, it looks like the adaptive card submission worked fine. The flow continues and completes all other steps successfully. 

     

    It seems the "post adaptive card and await a response" step takes 2 minutes every time, which I think is the default timeout.

  • micchow Profile Picture
    micchow on at
    Re: Getting Error :Error code: 3002 after publishing the bot

    @terzogenito , can you share more detail on your scenario and what error you are seeing? It will be really helpful to have screenshots too if they are available.

  • terzogenito Profile Picture
    terzogenito 10 on at
    Re: Getting Error :Error code: 3002 after publishing the bot

    @Keshav07 - how did you ultimately solve this issue? I have the same issue. It actually works fine and as expected in the Power Virtual Agents test mode. When I publish and initiate from production PVA bot I get same error.

  • Keshav07 Profile Picture
    Keshav07 3 on at
    Re: Getting Error :Error code: 3002 after publishing the bot

    Hello, Thank you for the help. Yes, the bot is able to send the card to the user. Even after the user responds the flow will still be stuck waiting for a response for 2 mins and then it gets a time-out error.  

  • Verified answer
    micchow Profile Picture
    micchow on at
    Re: Getting Error :Error code: 3002 after publishing the bot

    Was the card sent successfully to the user? When a flow is called from a PVA bot there is a 2 minute timeout when the flow does not complete in time. I speculate the card was sent but no button was clicked within 2 minutes that caused the flow time out. 

     

    In addition, if your scenario is to send an adaptive card to user during mid-conversation, it is recommended to use Bot Framework Composer for it and not use PVA bot to call a flow to send an adaptive card. This is because Power Automate has throttling that would impact end user experience if many users are chatting with the bot at the same time.

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 137,998

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,059

Leaderboard