Closed sarvamariwala closed 6 years ago
What steps have you done to get this error? You did something seriously wrong.
$ git clone https://github.com/codeforequity-at/testmybot.git $ cd testmybot/samples/facebook $ npm install $ npm test
I had issue in this step "npm install", error look's like :- enoent ENOENT: no such file or directory, open '/home/(username)/package.json' npm WARN mtech No description npm WARN mtech No repository field. npm WARN mtech No README data npm WARN mtech No license field.
it looks like cd testmybot/samples/facebook
step failed and you are still in your homedir.
Now, "sudo npm install" looks like this "npm WARN testmybot-sample1@1.0.0 No repository field." in stmybot/samples/facebook
That's nothing to worry about.
thanks, but, after the "sudo npm install" I wrote a command in terminal "npm test", it throw the error like:- mtech@(username):~/testmybot/samples/facebook$ npm test
testmybot-sample1@1.0.0 test /home/mtech/testmybot/samples/facebook jasmine
Started (node:29638) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot build docker containers: 'Cannot build docker containers: Error: docker-compose failed: { Error: spawn docker-compose ENOENT\n at exports._errnoException (util.js:1020:11)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:197:32)\n at onErrorNT (internal/child_process.js:376:16)\n at _combinedTickCallback (internal/process/next_tick.js:80:11)\n at process._tickCallback (internal/process/next_tick.js:104:9)\n code: \'ENOENT\',\n errno: \'ENOENT\',\n syscall: \'spawn docker-compose\',\n path: \'docker-compose\',\n spawnargs: \n [ \'-p\',\n \'testmybot-sample1\',\n \'-f\',\n \'/home/mtech/testmybot/samples/facebook/botiumwork/testmybot-sample1-20180207-155902-oC0j5/docker-compose.botium.yml\',\n \'-f\',\n \'/home/mtech/testmybot/samples/facebook/botiumwork/testmybot-sample1-20180207-155902-oC0j5/fbmock/docker-compose.fbmock.yml\',\n \'-f\',\n \'/home/mtech/testmybot/samples/facebook/botiumwork/testmybot-sample1-20180207-155902-oC0j5/docker-env.yml\',\n \'build\' ] }\n at ChildProcess.runningProcess.on (/home/mtech/testmybot/samples/facebook/node_modules/botium-core/src/helpers/ProcessUtils.js:47:18)\n at emitOne (events.js:96:13)\n at ChildProcess.emit (events.js:188:7)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:217:12)\n at onErrorNT (internal/child_process.js:376:16)\n at _combinedTickCallback (internal/process/next_tick.js:80:11)\n at process._tickCallback (internal/process/next_tick.js:104:9)'
what I will do next for this issue!!
sudo
to run npm install
.ok, thanks @Naktibalda.
Did you install docker and docker-compose ? For this sample you need it ...
@codeforequity-at when I installed "npm install"command on terminal, it return me "npm WARN testmybot-sample1@1.0.0 No repository field."
@codeforequity-at Yes, I am installed docker and docker-compose.
Hi @codeforequity-at , when I wrote "npm test" on terminal,it gives me an error like :-
Started (node:7139) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot build docker containers: 'Cannot build docker containers: Error: docker-compose returned error code 1\n at ChildProcess.runningProcess.on (/home/mtech/testmybot/samples/facebook/node_modules/botium-core/src/helpers/ProcessUtils.js:40:18)\n at emitTwo (events.js:106:13)\n at ChildProcess.emit (events.js:191:7)\n at maybeClose (internal/child_process.js:920:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)'
What I will do for same?
before running, please enable debug mode ("export DEBUG=botium,testmybot"). This should give more insights whats happening.
Hi @codeforequity-at, before execute "npm test", enable debug mode it return like this:-
"botium-BotDriver BotDriver Build error: Error: Cannot build docker containers: 'Cannot build docker containers: Error: docker-compose returned error code 1\n at ChildProcess.runningProcess.on (/home/(username)/testmybot/samples/facebook/node_modules/botium-core/src/helpers/ProcessUtils.js:40:18)\n at emitTwo (events.js:106:13)\n at ChildProcess.emit (events.js:191:7)\n at maybeClose (internal/child_process.js:920:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)' +2s (node:5130) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot build docker containers: 'Cannot build docker containers: Error: docker-compose returned error code 1\n at ChildProcess.runningProcess.on (/home/(username)/testmybot/samples/facebook/node_modules/botium-core/src/helpers/ProcessUtils.js:40:18)\n at emitTwo (events.js:106:13)\n at ChildProcess.emit (events.js:191:7)\n at maybeClose (internal/child_process.js:920:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)' export DEBUG=botium,testmybot(node:5130) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: container not available (node:5130) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: container not available (node:5130) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error: Error: container not available F(node:5130) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): Error: container not available (node:5130) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 9): Error: container not available (node:5130) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 11): Error: Error: container not available F(node:5130) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 13): Error: container not available"
then, what should I do next??
Try to run docker-compose manually and see what happens.
Agree, seems that docker-compose is not installed or not in the path. You can add the docker compose path in your testmybot.json capabilities:
"DOCKERCOMPOSEPATH": "<absolute-path-to-docker-compose>"
More configuration possiblities are described here: https://github.com/codeforequity-at/botium-core/wiki/Botium-Configuration
I tried but it gives same issue.
when you are running "docker-compose version" in command line, the docker-compose executable is found and some version information is shown ?
Also, there should be way more output when the debug mode is enabled. Did you run these two commands in a row ?
export DEBUG=botium,testmybot npm test
Docker-compose version is 1.19.0.
Hi @codeforequity-at, when I execute command "export DEBUG=botium,testmybot" "npm test". It return like this :-
botium-BotDriver BotDriver Build error: Error: Cannot build docker containers: 'Cannot build docker containers: Error: docker-compose returned error code 1\n at ChildProcess.runningProcess.on (/home/(username)/testmybot/samples/facebook/node_modules/botium-core/src/helpers/ProcessUtils.js:40:18)\n at emitTwo (events.js:106:13)\n at ChildProcess.emit (events.js:191:7)\n at maybeClose (internal/child_process.js:920:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)' +2s (node:4926) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot build docker containers: 'Cannot build docker containers: Error: docker-compose returned error code 1\n at ChildProcess.runningProcess.on (/home/mtech/testmybot/samples/facebook/node_modules/botium-core/src/helpers/ProcessUtils.js:40:18)\n at emitTwo (events.js:106:13)\n at ChildProcess.emit (events.js:191:7)\n at maybeClose (internal/child_process.js:920:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)' (node:4926) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: container not available (node:4926) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: container not available (node:4926) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error: Error: container not available F(node:4926) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): Error: container not available DEPRECATION: done callback received an Error object. Jasmine 3.0 will treat this as a failure F
Failures: 1) TestMyBot Sample Conversation Test Suite should answer to hello Message: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. Stack: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. at ontimeout (timers.js:386:11) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) Message: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. Stack: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. at ontimeout (timers.js:386:11) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) Message: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. Stack: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. at ontimeout (timers.js:386:11) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5)
I have to admit that I have no idea what's going on there. Can you please try another sample which doesn't require Docker, in "samples/watson" for example - just to make sure that this problem is related to docker.
It could be some kind of user permission problems, but its hard to do remote diagnosis here. Maybe it would be possible to grant temporary SSH access to your workstation, so I can analyse locally ? If yes, please don't post here, get in contact at hello@testmybot.com.
ENOENT: no such file or directory, open '/home/mtech/package.json'