codeforequity-at / botium-bindings

The Selenium for Chatbots
http://www.botium.at
MIT License
108 stars 33 forks source link

FBDirect emulator catches message from external conversation #68

Closed lzmartinico closed 6 years ago

lzmartinico commented 6 years ago

I was testing my chatbot through the emulator, and after a few exchanges I sent a closing message that didn't expect a reply. However, within 15-20 seconds, the Facebook account I was testing with received a message from an unrelated group chat. FBDirect captured that interaction and displayed it as a bot utterance

codeforequity-at commented 6 years ago

confirmed, this is a bug in one of the libraries Testmybot relies on.

codeforequity-at commented 6 years ago

The new 1.4.0 package includes the latest release build one of the included libraries. Please give it a try.

codeforequity-at commented 6 years ago

success ?

lzmartinico commented 6 years ago

Hi, sorry I have been off this project for a while. I tried running off the fbdirect sample, but I am unable to install the node package:

npm WARN testmybot-sample-monitoring@1.0.0 No repository field.

npm ERR! path /Users/Lorenzo/testmybot/samples/fbdirect/node_modules/.staging/testmybot-50b4862f/node_modules/@babel/code-frame
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '$HOME/testmybot/samples/fbdirect/node_modules/.staging/testmybot-50b4862f/node_modules/@babel/code-frame' -> '$HOME/testmybot/samples/fbdirect/node_modules/.staging/@babel/code-frame-3f4d3010'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 
codeforequity-at commented 6 years ago

There are several things you can try:

Or if this doesn't help, as a last option you can run this: npm cache clean --force

and then doing npm install again.

Note that this problem is not really related to Botium or Testmybot, but NPM and Node.JS sometimes get confused

lzmartinico commented 6 years ago

I have already tried all the standard NPM troubleshooting, but I still get the same result

On August 16, 2018 8:58:56 AM UTC, Botium notifications@github.com wrote:

There are several things you can try:

  • remove the node_modules folder
  • remove the package-lock.json file (NOT the package.json)
  • and run npm install again

Or if this doesn't help, as a last option you can run this: npm cache clean --force

and then doing npm install again.

Note that this problem is not really related to Botium or Testmybot, but NPM and Node.JS sometimes get confused

codeforequity-at commented 6 years ago

You have to do something about your Node.js or NPM installation. Maybe remove the global NPM cache.

lzmartinico commented 6 years ago

My node installation was probably botched, I moved to a different machine and I was able to install. I am now having some issues with logging into facebook using 2FA, I have left a comment on the facebook-chat-api bug tracker, will let you know once it's resolved. Sorry for the many delays

lzmartinico commented 6 years ago

OK, I have opened codeforequity-at/botium-core#99 to add support for 2FA logins. Since this requires interactivity, it would probably break any CI workflow, but for manual testing through testmybot it should work. The ideal solutions would be to use an app-password, but facebook-chat-api seems not support this yet

codeforequity-at commented 6 years ago

many thanks - merged into botium-core 1.3.22