Build Server Issue

I am getting this error when I am running the ant RunLocalBuildServer command in the buildserver DIR

Build Log

E:\srikar\Funmora_Builder\appinventor\buildserver>ant RunLocalBuildServer
Buildfile: E:\srikar\Funmora_Builder\appinventor\buildserver\build.xml

init:

common_CommonUtils:

init:

CommonUtils:

common_CommonVersion:

init:

CommonVersion:

BUILD FAILED
E:\srikar\Funmora_Builder\appinventor\build-common.xml:321: The following error occurred while executing this line:
E:\srikar\Funmora_Builder\appinventor\common\build.xml:99: Execute failed: java.io.IOException: Cannot run program "git" (in directory "E:\srikar\Funmora_Builder\appinventor\common"): CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at java.lang.Runtime.exec(Runtime.java:621)
        at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
        at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:424)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:438)
        at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:660)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:699)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:527)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
        at org.apache.tools.ant.Main.runBuild(Main.java:818)
        at org.apache.tools.ant.Main.startAnt(Main.java:223)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:453)
        at java.lang.ProcessImpl.start(ProcessImpl.java:140)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 35 more

Total time: 1 second

Please help @NishyanthKumar, @Android_Builder, @preetvadaliya
~ Thanks

2 Likes

java.io.IOException: Cannot run program "git" (in directory "E:\srikar\Funmora_Builder\appinventor\common"): CreateProcess error=2, The system cannot find the file specified
the exception; maybe you entered an invalid dir?

2 Likes

So, may I know what could I do?

That, I'm afraid, is something I cannot help you with; I do not use Git on a regular basis.

1 Like

Oh its ok, Actually it has been an month-and-an-half since I've used this command :joy:

What changes you have made before running this command?

Are you sure git is installed in your device? otherwise install git.

1 Like

Yeah, it is installed...

Actually I have no recent changes from the past 15 days but I will see what changes I have done before and :point_down:

You need to run the build in a shell where git is on the PATH. The easiest way to do this is to use git bash. If you're using the standard Windows command prompt you'll have to modify your environment variables to include the bin directory where git is located.

2 Likes

Oh, I think I forgot this...

But I guess once it worked in Windows CMD too, but once let me try... :+1:

1 Like

This error is coming because you are running ant RunLocalBuildServer in wrong file you are running this in appinventor-sources/appinventor/common you need to run this command in appinventor-source/appinventor/buildserver

No @Faraz_Firoz, wrong guess

I am running that command on appinventor-sources/appinventor/buildserver only

@ewpatton
Thanks a lot, now it worked well :+1:


Regards
~ Funmora Developers

BTW I have another doubt @ewpatton

Actually I need to update my Google Cloud SDK Shell so when I run the command gcloud components update it is triggered but it isn't worked...


And I'm on Administrator mode as it isn't working on normal mode

Sorry but I can't really provide support for Google Cloud SDK. You should contact someone at Google if you need assistance with that.

2 Likes

Sure, Thanks @ewpatton

I have noticed that if you run PowerShell with administrative privileges, it will open a window in C:\Windows\system32 directory. If you execute the command there, then another window will pop up and will proceed with installation or update of gcloud components. However if you cd into different directory the behavior will be as mentioned in this issue.

So to resolve this:

Run PowerShell as Administrative
If the directory is different than what I described above execute $ C:\Windows\system32 otherwise go to Step 3
Execute any command you want for gcloud components. e.g. $ gcloud components update or gcloud components install beta etc.
A window should popup and proceed with the installation or update of the components.

2 Likes

Actually I am not using Power Shell I am using the Google Cloud SDK shell can I use it?

:smiley::smiley: I don't know but you can try.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.