Skip to content

[Bug]: Build fails with 'The "Unzip" task failed unexpectedly.' #7060

@bdukes

Description

@bdukes

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Builds like https://dev.azure.com/dotnet/DNN/_build/results?buildId=123959&view=results are failing due to issues unrelated to the files changed.

Steps to reproduce?

See https://dev.azure.com/dotnet/DNN/_build/results?buildId=123959&view=results

Current Behavior

##[error]:/a/1/s/Build/BuildScripts/AEPackage.targets(53,): error : The "Unzip" task failed unexpectedly.
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: length
at ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputBuffer.ReadClearTextBuffer(Byte[] outBuffer, Int32 offset, Int32 length)
at ICSharpCode.SharpZipLib.Zip.ZipInputStream.BodyRead(Byte[] b, Int32 off, Int32 len)
at ICSharpCode.SharpZipLib.Zip.ZipInputStream.InitialRead(Byte[] destination, Int32 offset, Int32 count)
at ICSharpCode.SharpZipLib.Zip.FastZip.ExtractFileEntry(ZipEntry entry, String targetName)
at ICSharpCode.SharpZipLib.Zip.FastZip.ExtractEntry(ZipEntry entry)
at ICSharpCode.SharpZipLib.Zip.FastZip.ExtractZip(String zipFileName, String targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, String fileFilter, String directoryFilter)
at MSBuild.Community.Tasks.Unzip.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()

Expected Behavior

Build succeeds

Relevant log output

Anything else?

This was first an issue on #7008, but mysteriously disappeared.

It appears that the immediate cause is related to .\Dnn.AdminExperience\ClientSide\Styles.Web\dist\dnn-styles\index.esm.js being generated as an empty file. The version of SharpZipLib in Build/BuildScripts (0.84.0) fails to unzip a zero-length file.

Affected Versions

Current development branch (unreleased)

What browsers are you seeing the problem on?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions