Charca / bootbot

Facebook Messenger Bot Framework for Node.js
MIT License
974 stars 253 forks source link

No matching user found #139

Open WIEM-S opened 6 years ago

WIEM-S commented 6 years ago

I am trying to create my first bot using bootbot. It works fine but when trying to create two bots like this : /* const BootBot = require('bootbot'); const bot1 = new BootBot({ accessToken: process.env.ACCESS_TOKEN1_Act, verifyToken: process.env.VERIFY_TOKEN, appSecret: process.env.APP_SECRET });

const bot2 = new BootBot({ accessToken: process.env.ACCESS_TOKEN2_news, verifyToken: process.env.VERIFY_TOKEN, appSecret: process.env.APP_SECRET });

bot1.hear('hello', (payload, chat) => { chat.say('Hello, human!'); });

bot2.hear('hello', (payload, chat) => { chat.say('amazing'); });

bot2.start(); bot1.start(); */

The first bot works fine but the second gives me this error : Messenger Error received. For more information about error codes, see: https://goo.gl/d76uvB

{ message: '(#100) No matching user found',

type: 'OAuthException',

code: 100,

error_subcode: 2018001,

fbtrace_id: 'H4GibS7PBz7' }

mraaroncruz commented 6 years ago

Try either:

I think the reason bot1 is working and not bot2 is that it is started after it. If you switch the order you start, the bots in, the other will work.

The problem is that you are starting two different express apps on the same port at the same path /webhook.

WIEM-S commented 6 years ago

@mraaroncruz i used different ports and i switched the order but still one of the first only work. I can't use 2 webhooks because i am using the same facebook app for both

clonn commented 5 years ago

I try to use bot.say(messageId,${message});, but it responded the result.

Messenger Error received. For more information about error codes, see: https://goo.gl/d76uvB
{ message: '(#100) No matching user found',
  type: 'OAuthException',
  code: 100,
  error_subcode: 2018001,
  fbtrace_id: 'CvuRoC80372' }
tebogo37 commented 5 years ago

I am also getting this error. ngrok and VSCode terminal fire 200 OK Status.

The user said "hello", "hi", "hey", or "hey there" The user said: Hello Messenger Error received. For more information about error codes, see: https://goo.gl/d76uvB { message: '(#100) No matching user found', type: 'OAuthException', code: 100, error_subcode: 2018001, fbtraceid: 'AdH9H1-LjIK8i8EJv--Laf' }

edited I got it working, most probably delay with webhooks.