Fix CI: harden OpenSSL download and move it before MSBuild#18
Merged
Conversation
Agent-Logs-Url: https://github.com/taskscape/FileManager/sessions/3f63ef74-f099-4b3f-9777-69365bab34fc Co-authored-by: mzagozda <467608+mzagozda@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job in workflow build-installer.yml
Fix CI: harden OpenSSL download and move it before MSBuild
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The build job was failing after a successful MSBuild because the
Download OpenSSL Librariesstep ran after the build and used a bareInvoke-WebRequestwith no validation — if the URL returned HTML (redirect/rate-limit/404),Expand-Archivewould silently consume the HTML and exit 1, printing raw GitHub HTML/CSS/JSON to the log.Changes
Step reorder
Download OpenSSL Librariesto run beforeBuild Solution, so libs are available during the link phase.Hardened download logic
shell: pwsh+$ErrorActionPreference = 'Stop'— any cmdlet failure immediately aborts the step.-MaximumRedirection 10 -PassThru— follows redirects and captures the HTTP response for inspection.Content-Typeheader, and downloaded file size on every run for diagnostics.PK/0x50 0x4B) before extraction; on mismatch, prints the first bytes and first 20 lines of the file and throws an actionable error:$env:RUNNER_TEMPas the download location instead of the workspace root.Original prompt
Fix failing GitHub Actions job in workflow
.github/workflows/build-installer.yml(run 23660136284, job 68927890948 at ref a331a8c).Observed behavior:
Build succeeded. 0 Error(s).Root cause candidate:
Invoke-WebRequestfrom a GitHubraw/masterURL and then extracts it. If the URL redirects/404s/rate-limits, the downloaded file can be HTML and subsequent steps fail.Required changes:
Update
.github/workflows/build-installer.ymlto make the OpenSSL download step robust:shell: pwsh.$ErrorActionPreference = 'Stop'.Invoke-WebRequestwith-MaximumRedirection 10and-PassThruto capture status.PK(0x50 0x4B). If not, print a short file head and fail with a clear error.utilsas before.Reorder steps so the OpenSSL download occurs before the MSBuild step (since build/link may depend on the libs).
Keep the rest of the workflow behavior intact.
Acceptance criteria:
Files to change:
.github/workflows/build-installer.ymlThe following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The build itself is not failing—MSBuild reports “Build succeeded. 0 Error(s)”—but the job fails immediately afterward with exit code 1 while printing what looks like raw GitHub HTML/CSS/JSON into the logs (e.g.
:root { --tab-size-preference: 4; } ... {"locale":"en","featureFlags":...}). That pattern almost always means a later step is trying to download or parse something and is instead receiving an HTML page (often a redirect/auth page/404) and then the script treats it as an error.In your workflow (
.github/workflows/build-installer.ymlat refa331a8cb47203cebd4d639c649b7e473ee29803c), the most likely culprit is the “Download OpenSSL Libraries” step (lines 35–40), because it fetches a URL from GitHub and then unzips it:Invoke-WebRequest -Uri "https://github.com/IndySockets/OpenSSL-Binaries/raw/master/Archive/openssl-1.0.2u-x64_86-win64.zip" -OutFile openssl.zipExpand-Archive -Path openssl.zip -DestinationPath "utils" -ForceIf that URL returns HTML (rate limiting, moved file, blocked TLS/cipher mismatch, etc.),
Expand-Archive(or a later consumer) will fail and the step ends with exit code 1.Fix (recommended): download from a stable “release asset” URL + validate it’s really a ZIP
Replace the “Download OpenSSL Libraries” step with a more robust version that:
Example replacement:
If the URL is no longer valid, switch to a maintained OpenSSL binary source (preferred: a tagged release asset you control or a known vendor URL). The key is: don’t rely on a mutable raw
masterpath.Fix (also important): do the OpenSSL download before building if the build consumes it
Right now, you build first (step “Bu...
This pull request was created from Copilot chat.
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.