codeforequity-at / codeforequity-at/botium-bindings
No Mock Online error
- Dominant language
- JavaScript
- Stars
- 106
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
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 ()
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. (/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 :)
Contributor guide
Assessment
This issue has not been assessed yet.