-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Mock Online error #102
Comments
Your setup seems strange - when using Botium in "docker" mode, then ngrok is not required - Botium embeds your bot into a sandbox Docker network. As you are using Watson, I would recommend to use Botiums specialized Watson connector. |
I get testmybot to run correctly with the watson connector and it works, but I have a lot of responses triggered in my code which sit outside the Watson workspace, hence why i was looking at another connector to use which would hit my backend api if that makes sense. |
|
Here it is: |
I would say that your STARCMD capability ("node server.js") is missing an "npm install" - I think you should change it to "npm install && node server.js" |
Hi, |
In the botiumwork-subfolder there should be a logfile with the output from the docker containers (set CLEANUPTEMPDIR capability to false). Please post the content of this file, maybe there are some hints. |
is that either of the docker-env.yml or docker-compose.botium.yml files, or a log file inside the fbmock subfolder? Sorry I'm not very familiar with docker so don't quite know which one you mean |
i've been comparing those files to the ones generated when I run the sample (which works), and I can't see anything strikingly different (though tbh I don't know what I should be looking for) |
Nothing looks wrong, except that the docker container holding the chatbot doesn't come up - in the log you can see that for the first few seconds, the container is there but not started, but then it gets stopped (the messages "getaddrinfo ENOTFOUND botium" point to this). Obviously, the docker syslog driver is not working in your environment, there should be a file "docker-containers-log.txt" in the botiumwork-directory. Without this logging, it is very hard to find out what's actually failing. You wrote that a sample is working - so your docker installation is not the problem. What's in your server.js ? is it something which can fail ? can you provide me the file so I can test in my environment ? |
In the sample, that log file (docker-contrainers-log.txt) doesn't appear in the botiumwork subdirectory either though... the files there have the same structure as in the screenshot previously from my repo. Yet the sample definitely works, see log below: and finally And the examples provided by docker upon install to check that your setup works worked fine for me a couple of days ago (their hello-world image etc...). As for sharing my code, I'm not allowed to I'm afraid. I've got debugging outputs in server.js which i would have seen if something had failed - i'll look into it though. Thanks again for the help! |
Hi,
I am trying to run some tests on a facebook bot using the docker container mode. I've had no issues with the sample, i've got docker-compose and everything else. I am following the set up provided in the sample. When I try to run my tests, it detects them but they all fail - jasmine times out because of a 'No Mock Online' error (in testmybot/node_modules/botium-core/src/containers/DockerContainer.js:424:16).
I've ran the tests in debug mode for botium and testmybot, here is the no mock online bit:
botium-TcpPortUtils WaitForPort port usage (127.0.0.1:46300): true +1ms botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +0ms botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s (node:83268) UnhandledPromiseRejectionWarning: Error: No Mock online at UserSays.Promise (/Users/username/dev/repo/node_modules/testmybot/node_modules/botium-core/src/containers/DockerContainer.js:424:16) at new Promise (<anonymous>) at DockerContainer.UserSays (/Users/username/dev/repo/node_modules/testmybot/node_modules/botium-core/src/containers/DockerContainer.js:409:12) at DockerContainer.UserSaysText (/Users/username/dev/repo/node_modules/testmybot/node_modules/botium-core/src/containers/BaseContainer.js:53:17) at TestMyBot.hears (/Users/username/dev/repo/node_modules/testmybot/src/testmybot.js:119:31) at UserContext.<anonymous> (/Users/username/dev/repo/spec/testmybot.spec.js:26:9) at attempt (/Users/username/dev/repo/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4486:26) at QueueRunner.run (/Users/username/dev/repo/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4402:20) at runNext (/Users/username/dev/repo/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4446:20) at /Users/username/dev/repo/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4453:13 (node:83268) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:83268) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s botium-FacebookMock Mock - checking endpoint http://127.0.0.1:46300 before proceed +2s
I am unsure whether this is a configuration problem on my end or not. The facebook webhook port and path that I am giving in the testmybot.json are the ones my fb page is subscribed to, and I am using ngrok to create that tunnel. The app is not published to facebook yet, so only users marked as testers can access it. Other thing to note is that I am making calls to IBM Watson API in the orchestration to process the user inputs. Any help would be much appreciated :)
The text was updated successfully, but these errors were encountered: