Bot error 1008 - Unexpected character encountered while parsing value

Tanguy 10 Reputation points
2023-10-24T08:42:18.9333333+00:00

We are developing an MS teams app with a bot, which returns adaptive cards for link unfurling and other features.

Things work fine when working in local, with ngrok pointing to our machine, and the cards show up nicely in Teams.

However, in production, the cards don't show up, and inspecting the network shows that there is an error 1008, apparently related to Unexpected character during the bot "invoke" call.

We suspected something wrong with gzip handling, and disabled it on our side to check, and indeed the issue was solved for a while, but it is back again. Is anyone else experiencing this ?

The really weird thing is that if we configure the bot endpoint to ngrok, and forward that ngrok to our production server, things work fine, which is strange because when inspecting requests to ngrok or our server, the response bodies are 100% identical.

{
    "errorCode": 1008,
    "message": "<BotError>Error when processing invoke response: Unexpected character encountered while parsing value: �. Path '', line 0, position 0.",
    "standardizedError": {
        "errorCode": 1008,
        "errorSubCode": 1,
        "errorDescription": "<BotError>Error when processing invoke response: Unexpected character encountered while parsing value: �. Path '', line 0, position 0."
    }
}
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,643 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,476 questions
{count} vote

2 answers

Sort by: Most helpful
  1. SaiPratap-MSFT 0 Reputation points Microsoft Vendor
    2023-11-02T06:23:27.6666667+00:00

    @Tanguy - Could you please share the bot id ,tenantid, and timestamp when it occured and log also would be helpfull.


  2. SaiPratap-MSFT 0 Reputation points Microsoft Vendor
    2023-11-28T06:21:05.88+00:00

    @Tanguy - Provided your response with engineering team.I will update you once i get any resonse from the engineering team


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.