Symptoms
After uploading the source code archive using the Lucent Sky AVM Web UI or CLI, you receive an error message.
Cause
Various reasons can cause source code archive upload to fail. This article describes common causes and solutions to source code archive upload errors.
Resolution
-
After uploading the source code archive, you receive one of the following error messages:
An unspecified error occurred while extracting the archive file. An unspecified I/O error has occurred. ARCHIVE_UNSPECIFIED_ERROR
This problem occurs when CLEAR Engine encountered an error extracting the source code archive. A common cause is invalid characters in the path of files in the archive file.
CLEAR Engine uses .NET Framework Compression API to extract archive files in Zip format. Follow these steps to identify the underlying error that occurred while extracting the source code archive:
- On the CLEAR Engine instance, open PowerShell as administrator.
-
Enter the following command:
# Replace <SourceCodePath> with path to the source code archive $sourceCodePath = "<SourceCodePath>" # Replace <TempDirectoryPath> with path to a temporary directory $tempDirectoryPath = "<TempDirectoryPath>" Import-Module C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.IO.Compression.FileSystem.dll; [System.IO.Compression.ZipFile]::ExtractToDirectory("$sourceCodePath", "$tempDirectoryPath")
- If an exception occurred, the source code archive is incompatible with .NET Framework Compression API. Follow the exception message to resolve the error. Using a 3rd-party program (such as 7-Zip) to extract and recreate the source code archive might also resolve the error.
CLEAR Engine uses 7-Zip to extract archive files in other formats. Use the Teat archive function in 7-Zip to verify the integrity of the source code archive file.
-
After uploading the source code archive, you receive the following error message:
Maximum request length exceeded.
This problem occurs when the uploaded source code archive exceeded the maximum size allowed by CLEAR Engine.
By default, Web UI allows a maximum size of 1 GB when uploading the source code archive. This limit can be extended to 2 GB. Follow these steps to increase the limit:
-
Web UI
- Open C:\Program Files\Lucent Sky\CLEAR Web\web.config with a text editor.
- Locate the
<httpRuntime>
node in the<system.web>
section, and change the value of themaxRequestLength
attribute to2097152
. - Locate the the
<requestLimits>
node in the<requestFiltering>
section, and change the value of themaxAllowedContentLength
attribute to2147483648
.
-
The CLI already allows the maximum upload size of 2 GB.
-
-
After uploading the source code archive, you receive the following error message:
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
This problem occurs when the path of some files in the source code archive is too long.
On systems running Windows Server 2016 (OS Build 14393) and later, enabling long path support will remove this limit. To learn about how to enable long path support, view the following article in the Lucent Sky Knowledge Base:
Administration of Lucent Sky AVM CLIOn systems running on an earlier version of Windows, a workaround exists that extends the path length limit to around 190 characters. Applying this workaround will prevent CLEAR Engine from generating reports and remediated source code of previous scans. Follow these steps to apply the workaround:
- Create a directory with a short name in the root of a disk volume, such as C:\CLEAR. Make sure the LocalSystem account has full control permission to the directory and the NetworkService account has write permission to the directory.
- Open C:\Program Files\Lucent Sky\CLEAR Engine\SkyAnalyzer.config using a text editor.
- Locate the
<StorageRoot>
node in the<appSettings>
section, and change its value to C:\CLEAR, where C:\CLEAR is the directory you created in a previous step. -
Open PowerShell as administrator, enter the following command to restart CLEAR Engine:
Stop-Service "CLEAR Engine"; Start-Service "CLEAR Engine"
-
After uploading the source code archive, you receive the following error message:
The source code archive contains entries with invalid characters.
This problem occurs when the path of some files in the source code archive contains characters that are invalid for files and directories on Windows.
In addition, this error might also occur when CLEAR Engine was unable to locate the MSVC runtime libraries.