codeforequity-at / botium-core

The Selenium for Chatbots - Bots Testing Bots
https://www.botium.ai
MIT License
229 stars 64 forks source link

git returned error code 128 #28

Closed stephenws closed 5 years ago

stephenws commented 6 years ago

I am executing Sample Project with Sample code available But getting Error "git returned error code 128" Code: const BotDriver = require('botium-core').BotDriver const Capabilities = require('botium-core').Capabilities const Source = require('botium-core').Source

function assert (expected, actual) { if (!actual || actual.indexOf(expected) < 0) { console.log(ERROR: Expected <${expected}>, got <${actual}>) } else { console.log(SUCCESS: Got Expected <${expected}>) } }

const driver = new BotDriver() .setCapability(Capabilities.PROJECTNAME, 'core-CreateNewConversation') .setCapability(Capabilities.BOTFRAMEWORK_API, true) .setCapability(Capabilities.BOTFRAMEWORK_APP_ID, 'my microsoft app id') .setCapability(Capabilities.BOTFRAMEWORK_CHANNEL_ID, 'facebook') .setCapability(Capabilities.CLEANUPTEMPDIR, false) .setSource(Source.GITURL, 'https://github.com/Microsoft/BotBuilder-Samples.git') .setSource(Source.GITDIR, 'Node/core-CreateNewConversation') .setSource(Source.GITPREPARECMD, 'npm install') .setCapability(Capabilities.STARTCMD, 'npm start') .setEnv('MICROSOFT_APP_ID', 'my microsoft app id') .setEnv('MICROSOFT_APP_PASSWORD', 'my microsoft app password') .setEnv('NODE_DEBUG', 'botbuilder') .setEnv('DEBUG', '*')

driver.BuildFluent() .Start() .UserSaysText('hi bot') .WaitBotSaysText((text) => assert('You\'ve been invited to a survey! It will start in a few seconds...', text)) .WaitBotSaysText(null, 10000, (text) => assert('Hello... What\'s your name?', text)) .UserSaysText('John') .WaitBotSaysText((text) => assert('Hi John, How many years have you been coding?', text)) .UserSaysText('5') .WaitBotSaysText((text) => assert('What language do you code Node using?', text)) .UserSaysText('CoffeeScript') .WaitBotSaysText((text) => assert('Got it... John you\'ve been programming for 5 years and use CoffeeScript.', text)) .Stop() .Clean() .Exec() .then(() => { console.log('READY') }) .catch((err) => { console.log('ERROR: ', err) })

My Error: iMaheshwari-4:botium Mukesh$ node botiumFluent.js ERROR: Error: git returned error code 128 at ChildProcess. (/Users/Mukesh/botium/node_modules/botium-core/dist/botium-cjs.js:1330:18) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:891:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) iMaheshwari-4:botium Mukesh$

codeforequity-at commented 6 years ago

this is an issue with git (just google for "Git exit code 128").

stephenws commented 6 years ago

One question What is the use of setCapability, . setSource,. setEnv?

codeforequity-at commented 6 years ago

https://github.com/codeforequity-at/botium-core/wiki

ckrishnarjun commented 5 years ago

Hi , I am facing the same issue. Were you able to solve it? I tried to google "Git exit code 128", but didn't get any conclusive answers.

codeforequity-at commented 5 years ago

Just yesterday I got this error and noticed that "filename is too long" - git on windows only allows 260 characters (including directory), which made it fail. when enabling debug mode see here you will get more insights.

ckrishnarjun commented 5 years ago

You were right! It saved a lot of effort for me. The issue is with "filename is too long" in windows. Thanks!

I am trying to see how we can reduce the file names length. Can't do much right now as the filenames are decided by Microsoft Bot Builder samples in GitHub.

I noticed that the folder name where botium clones the repository has timestamp added to it. Is there anywhere we can control this?

codeforequity-at commented 5 years ago

No, there currently is no way to control this. I added it to our backlog, but for now you have to find another solution. With the environment variable BOTIUM_TEMPDIR you can place the temporary files into a very short path like C:/Temp instead of the project directory, maybe this helps (in my case it helped).