Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Subversion "Get Latest Source" Error on Windows Inedo Agent



  • I am trying to create a simple plan that pulls the latest source code from a Subversion repository then runs MSBuild to compile the code before packing everything up in an artifact to be delivered to the next stage in the pipeline. When I set this plan to run under the "Local" agent on the machine hosting my instance of BuildMaster it works fine. However, when I change the plan to run on a remote Windows 7 machine that has an "Inedo" agent installed I receive the following stack trace:

    Getting latest source code from path "/internaltools/"...
    Ensuring local workspace at: C:\ProgramData\InedoAgent\BuildMaster\Temp\SrcRepos\qasubversion_81_svn_repos-internaltools_branches_2.4_2.4.0
    Workspace already exists.
    Updating local workspace...
    Unhandled exception: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Inedo.Agents.InedoAgentClientBase.<SendMessageAsync>d__28.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Inedo.Agents.InedoAgentClientBase.<ExecuteCommandAsync>d__26`1.MoveNext()
       --- End of inner exception stack trace ---
       at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
       at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
       at Inedo.Agents.InedoAgentClient.RemoteProcess.get_ExitCode()
       at Inedo.BuildMaster.Extensibility.Providers.ProviderBase.ExecuteCommandLine(RemoteProcessStartInfo startInfo)
       at Inedo.BuildMasterExtensions.Subversion.Subversion15Provider.ExecuteSvn(String commandName, SvnArguments args, Boolean logErrors) in C:\ProgramData\InedoAgent\BuildMaster\Temp\_E60664\Src\Extension\Subversion15Provider.cs:line 249
       at Inedo.BuildMasterExtensions.Subversion.Subversion15Provider.UpdateLocalWorkspace(SvnSourceControlContext context) in C:\ProgramData\InedoAgent\BuildMaster\Temp\_E60664\Src\Extension\Subversion15Provider.cs:line 320
       at Inedo.BuildMasterExtensions.Subversion.Subversion15Provider.GetLatest(SvnSourceControlContext context, String targetDirectory) in C:\ProgramData\InedoAgent\BuildMaster\Temp\_E60664\Src\Extension\Subversion15Provider.cs:line 85
       at Inedo.BuildMaster.Extensibility.Operations.SourceControl.GetLatestOperation.ExecuteAsync(IOperationExecutionContext context)
       at Inedo.BuildMaster.Windows.ServiceApplication.Executions.PlanExecuter.DeploymentPlanExecuter.<Inedo-ExecutionEngine-Executer-IExecutionHostEnvironment-ExecuteActionAsync>d__20.MoveNext()
    ---> (Inner Exception #0) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Inedo.Agents.InedoAgentClientBase.<SendMessageAsync>d__28.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Inedo.Agents.InedoAgentClientBase.<ExecuteCommandAsync>d__26`1.MoveNext()<---
    Cleaning up...
    Deleting C:\ProgramData\InedoAgent\BuildMaster\Temp\_E14 on QASCM0Build1...
    C:\ProgramData\InedoAgent\BuildMaster\Temp\_E14 on QASCM0Build1 deleted.
    Cleanup complete.
    

    Product: BuildMaster
    Version: 5.2.1



  • The error message could definitely be improved, but based on the stack trace it looks like the svn.exe does not exist on the remote server (hence the file not found exception.

    This is the .exe path configured in the source control provider properties.



  • Which configuration is this exactly? When creating a new Subversion source control provider I do not see any property for executable path.

    In addition I turned on the "Log command line arguments" option and found the following in the action log.

    Executing C:\ProgramData\InedoAgent\BuildMaster\Temp\ExtTemp\Subversion\Resources\svn.exe
    

    Your thought was correct and this path does not exist on the remote agent but there is a similar path at:

    C:\ProgramData\InedoAgent\BuildMaster\ExtensionsTemp\Subversion\Resources\svn.exe

    Is the Subversion extension supposed to be using the second path?



  • Thank you for the extra details - there was a hardcoded path in the extension that should not have been there. A new extension has been released (v.5.1.1) that resolves this issue.



  • Thank you for the quick turnaround. However, I am still receiving an error due to a file not found. After upgrading extensions, the log now shows that the following path is trying to be hit:

    Executing C:\BuildMaster\_SVCTMP\ExtTemp\Subversion\Resources\svn.exe
    

    This path exists on the server hosting BuildMaster but does not exist on the agent server.



  • Alright, v5.1.2 was released and it should be correct now :)



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation