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!

BuildMaster Create-Artifact - Handle does not support synchronous operations.



  • Hello,

    I am getting below error in "Create-Artifact".

    Debug: Found 1800 matches (193724990 bytes total).
    Error: Unhandled exception: System.ArgumentException: Handle does not support synchronous operations. The parameters to the FileStream constructor may need to be changed to indicate that the handle was opened asynchronously (that is, it was opened explicitly for overlapped I/O).

    Script has two create-artifact, one for "Test" and another for "Production".

    From path: D:\BuildMaster\Temp{Website_Test/Website_Production}

    It works fine for "Test" but fails in "Production". But if I change path to D:\BuildMaster\Temp_E$ExecutionId* then it fails for both "Test" and "Production".


  • inedo-engineer

    Hi @vishal_2561 ,

    Can you provide us with a full log/stack trace? That's an unusual error and we'd like to get some more context on where it's coming from.

    Thanks,
    Steve



  • Hi @stevedennis ,

    Below is the log.

    Debug: Using TcpAgent agent on QA
     Info: Getting list of files in D:\BuildMaster\Website\Content\C_C\ProgramData\InedoAgent\BuildMaster\Temp\_E2605\Website\obj\Production\Package\PackageTmp to add to artifact...
    Debug: Found 1800 matches (193724993 bytes total).
    Error: Unhandled exception: System.ArgumentException: Handle does not support synchronous operations. The parameters to the FileStream constructor may need to be changed to indicate that the handle was opened asynchronously (that is, it was opened explicitly for overlapped I/O).
       at System.IO.FileStream.VerifyHandleIsSync()
       at System.IO.FileStream..ctor(SafeFileHandle handle, FileAccess access, Int32 bufferSize, Boolean isAsync)
       at System.IO.FileStream..ctor(SafeFileHandle handle, FileAccess access)
       at Inedo.IO.FileEx.Open(String fileName, FileMode fileMode, FileAccess fileAccess, FileShare fileShare, FileOptions fileOptions)
       at Inedo.Agents.RemoteFileHost.<OpenFileAsync>d__1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Inedo.Agents.AgentCommand`1.<Inedo-Agents-IAgentCommandWithResponse-ExecuteAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Inedo.Agents.AgentCommandDispatcher.<ExecuteCommandAsync>d__7.MoveNext()
    

    We are using Buildmaster of version 6.2.20.


  • inedo-engineer

    Hi @vishal_2561,

    This sounds like it could potentially be an issue with the file becoming locked at the operating system level (like an anti-virus scan, a snapshot taken, etc...). But to be sure, could you please enable "Verbose logging" on your Deploy-Artifact operation and send us the execution again? That will give us a little more detail about the issue. If that execution is too sensitive, you could email it to us at support@inedo.com and use the subject [QA-1175] - Execution log and let us know you sent it.

    Thanks,
    Rich



  • Hi @rhessinger ,

    Verbose doesn't have much details, all "Capturing files..." messages. I changed buildmasteragent root directory and its working now, so as you said it might be something at OS level.

    Thanks.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation