Botframework-sdk: Getting ERROR: ChatConnector: receive - invalid token. Check bots app ID & Password with every message.

Created on 27 Jul 2016  路  6Comments  路  Source: microsoft/botframework-sdk

After upgrading to v3.1.1 is tarted getting ERROR: ChatConnector: receive - invalid token. Check bots app ID & Password on every received message.
This started happening with no change in the code or any modification.

742 claims that the fix is in v3.1.1

Most helpful comment

If everything is definitely configured correctly, be sure to confirm your (or whatever machine your bot is running on) system time is accurate.
Three hours of my life I'll never get back.

All 6 comments

This means that you don't have your bot configured with the right Microsoft App Id and Password. As a result we cannot validate JwtTokens sent to your bot. Here is a step by step troubleshoot guide for auth issues.

I had a working bot for several weeks then once I updated the npm package to v.3.1.1 it started happening. I verified a few times that I am using the correct credentials and I also created a second bot with completely new credentials. It still happens.
This is how I add the credentials to the configuration:

var connector = new builder.ChatConnector({
    appId: process.env.MICROSOFT_APP_ID,
    appPassword: process.env.MICROSOFT_APP_PASSWORD
});

Am I doing something wrong?

If everything is definitely configured correctly, be sure to confirm your (or whatever machine your bot is running on) system time is accurate.
Three hours of my life I'll never get back.

@vlttnv I'm assuming you solved this issue, if not please reopen. Thanks!

@Andrea-Orimoto I'm still facing this issue in https://github.com/Microsoft/BotBuilder/issues/710#issuecomment-351025956

@loretoparisi Are you running this in docker? I was experiencing clock drift in my containers. Google for docker clock/time drift and you see some solutions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maba4891 picture maba4891  路  3Comments

peterbozso picture peterbozso  路  3Comments

stijnherreman picture stijnherreman  路  3Comments

hailiang-wang picture hailiang-wang  路  3Comments

kenyeung128 picture kenyeung128  路  3Comments