Sitecore.Ship icon indicating copy to clipboard operation
Sitecore.Ship copied to clipboard

Cannot delete tempfile on package upload (Sitecore 8)

Open moanrose opened this issue 9 years ago • 4 comments

When uploading a package using the /services/package/install/fileupload endpoint in a version compiled for Sitecore 8, i get the following exception:

Exception Details: System.IO.IOException: The process cannot access the file 'C:\projects\ci\cidevelopment\Website\temp\48ca187f-d7f5-4ad9-adce-02343dd46d53.update' because it is being used by another process. Source Error: Line 36: public void Dispose() Line 37: { Line 38: File.Delete(_tempPackageFile); Line 39: } Line 40: } Source File: c:\projects\ci\Sitecore.Ship\Sitecore.Ship\src\Sitecore.Ship.Infrastructure\IO\TempPackager.cs Line: 38

It seems that the file is still in use by the Sitecore.Updater at this point.

Update: Apparently the error is related to me making a malformed HTTP Post. I tried posting my update package using curl, and there was no error.

moanrose avatar Mar 13 '15 09:03 moanrose

I'll take a look.

-----Original Message----- From: "moanrose" [email protected] Sent: ‎13/‎03/‎2015 09:13 To: "kevinobee/Sitecore.Ship" [email protected] Subject: [Sitecore.Ship] Cannot delete tempfile on package upload (Sitecore 8)(#35)

When uploading a package using the /services/package/install/fileupload endpoint in a version compiled for Sitecore 8, i get the following exception: Exception Details: System.IO.IOException: The process cannot access the file 'C:\projects\ci\cidevelopment\Website\temp\48ca187f-d7f5-4ad9-adce-02343dd46d53.update' because it is being used by another process. Source Error: Line 36: public void Dispose() Line 37: { Line 38: File.Delete(_tempPackageFile); Line 39: } Line 40: } Source File: c:\projects\ci\Sitecore.Ship\Sitecore.Ship\src\Sitecore.Ship.Infrastructure\IO\TempPackager.cs Line: 38 It seems that the file is still in use by the Sitecore.Updater at this point. — Reply to this email directly or view it on GitHub.

kevinobee avatar Mar 13 '15 09:03 kevinobee

Is there an estimate when the Sitecore 8 version is going to be available?

BobLokerse avatar Mar 25 '15 17:03 BobLokerse

@BobLokerse The first commit towards getting a Sitecore 8.x compatible Ship is in the release/0.4.0 branch.

kevinobee avatar Jul 27 '15 16:07 kevinobee

I'm going to treat this as a bug as the issue is the exception originating out of the Ship code failing to handle the File.Delete error case appropriately. I will push thin as a fix into the 0.4.0 release.

kevinobee avatar Sep 13 '15 22:09 kevinobee