'Can not access a closed stream' error while trying to publish a process



So I have quite a large process (last time I published it, it had a size of 200MB) which I have updated and tried to publish to our unattended bot (not connected to orchestrator). I get the following error:

Publishing the project has failed.

Error: Can not access a closed Stream.

System.Exception: Publishing the project has failed.

Error: Can not access a closed Stream. —> System.ObjectDisposedException: Can not access a closed Stream.
at System.IO.Compression.DeflateStream.EnsureNotDisposed()
at System.IO.Compression.DeflateStream.Flush()
at MS.Internal.IO.Packaging.CompressStream.Flush()
at MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Flush()
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.FlushExposedStreams()
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.UpdateReferences(Boolean closingFlag)
at MS.Internal.IO.Zip.ZipIOBlockManager.SaveContainer(Boolean closingFlag)
at MS.Internal.IO.Zip.ZipIOBlockManager.SaveStream(ZipIOLocalFileBlock blockRequestingFlush, Boolean closingFlag)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.Packaging.PackagePart.Close()
at System.IO.Packaging.Package.DoClose(PackagePart p)
at System.IO.Packaging.Package.DoOperationOnEachPart(PartOperation operation)
at System.IO.Packaging.Package.System.IDisposable.Dispose()
at NuGet.PackageBuilder.Save(Stream stream)
at UiPath.Project.Deploy.ProjectPackageManager.BuildPackage(WorkflowProject project, String destPackFile)
at UiPath.Project.ProjectManager.BuildPackage(String destPackFile)
at UiPath.Workflow.ViewModels.MainViewModel.PackAndPush()
— End of inner exception stack trace —

After a bit of ‘Googling’ I found that this comes up in other programming when trying to publish something with an error, but there are no errors in my workflow - I can also run the automation fine in Studio.


This might be solved. I realised that I didn’t have enough disk storage to publish the process.

I’m not sure why it gave me this error rather than the ‘no space on disk’ error that I have seen before, but I no longer get the error since clearing some room.