Skip to content

fix: correct invalid Node24 execution handler (#31)#32

Merged
Arthurvdv merged 4 commits into
mainfrom
fix/invalid-node24-execution-handler
Jun 24, 2026
Merged

fix: correct invalid Node24 execution handler (#31)#32
Arthurvdv merged 4 commits into
mainfrom
fix/invalid-node24-execution-handler

Conversation

@Arthurvdv

Copy link
Copy Markdown
Member

Summary

Fixes the misleading "A supported task execution handler was not found ... not compatible with your current operating system 'Windows(X64)'" error reported in #31.

Despite the wording, this Azure DevOps error is not about the OS. The agent emits it when it recognizes none of the Node execution handlers listed in task.json.

Root cause

All 5 task.json files listed Node24_1 as the primary handler. Verified against the live microsoft/azure-pipelines-agent source: Node24_1 has never been a valid handler name — the correct key is Node24. The agent silently ignored it, so tasks only ever resolved to Node20_1 (modern agents) or plain Node20 (on-prem ADO Server v3.224–v3.230, added in #29). On any agent that recognized none of the three, the task failed with the cryptic error.

Changes

  • task.json (×5): rename Node24_1Node24; keep Node20_1 and plain Node20 (the on-prem handler from Allow older ADO Node20 execution handler/runtime #29 stays). Normalize indentation/trailing newline.
  • minimumAgentVersion: "3.224.1" (×5): the agent release where the Node 20 handler first shipped (PR Support Node 20 handler microsoft/azure-pipelines-agent#4346) — i.e. the floor of our lowest handler. Old agents now get a clear minimum-version error instead of the cryptic handler message. This cannot block any agent that could otherwise run the task.
  • esbuild: target node24node20. The single shared bundle can run on the Node 20 runtime, so it must target the lowest runtime. target is a compatibility floor, not an optimization — no effect on Node 24 execution.
  • tests: updated scaffold.test.ts to assert Node24/Node20_1/Node20, guard against Node24_1 reappearing, and check minimumAgentVersion.
  • docs: README troubleshooting section (upgrade agent / NodeTaskRunnerInstaller@0, incl. on-prem note); fixed Node24_1 references in ARCHITECTURE.md, copilot-instructions.md, CONTRIBUTING.md.

For agents older than v3.224.1

The code fix can't help agents that predate the Node 20 handler. Those users should upgrade the agent or add NodeTaskRunnerInstaller@0 before the ALCops task — both documented in the new README troubleshooting section.

Verification

  • npm test — 46 passed
  • npm run build — clean
  • npm run bundle — clean (node20 target)
  • npm run lint — clean

Non-breaking (no YAML input contract change → no task Major bump).

Closes #31
Refs #29

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Arthurvdv and others added 4 commits June 24, 2026 15:54
…sion

The execution blocks used "Node24_1", which is not a valid Azure Pipelines
handler name and was therefore silently ignored by every agent. The correct
key is "Node24". This meant tasks never ran on the Node 24 runtime and, on
agents that recognized none of the listed handlers, failed with the misleading
"A supported task execution handler was not found ... not compatible with your
current operating system" error (issue #31).

- Rename Node24_1 -> Node24 in all 5 task.json files.
- Keep Node20_1 (modern agents) and plain Node20 (on-prem ADO Server v3.224-v3.230,
  added deliberately in #29).
- Add minimumAgentVersion 3.224.1 (release where the Node 20 handler first shipped,
  the floor of the lowest handler) so older agents get a clear minimum-version error
  instead of the cryptic handler message. This cannot block any agent that could
  otherwise run the task.
- Normalize execution-block indentation and trailing newline.

Refs #31, #29

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All three execution handlers point to the same dist/index.js, so the single
shared bundle can be selected to run on the Node 20 runtime (Node20_1 / Node20
handlers). Targeting node24 risked emitting syntax newer than Node 20 can run.
Lower the esbuild target to node20 so the bundle is valid on the lowest runtime
it can land on. esbuild target is a compatibility floor, not an optimization,
so this has no effect on Node 24 execution.

Refs #31

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assert the valid Node24 handler (not Node24_1), require Node20_1 and Node20,
add a guard that the invalid Node24_1 key is absent, and assert the new
minimumAgentVersion value.

Refs #31

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- README: add a Troubleshooting section explaining the misleading
  "supported task execution handler was not found" error, the v3.224.1 agent
  baseline, and the upgrade / NodeTaskRunnerInstaller@0 workarounds (incl. on-prem).
- Replace incorrect Node24_1 references with Node24 and note the new
  minimumAgentVersion in ARCHITECTURE.md, copilot-instructions.md, and CONTRIBUTING.md.

Refs #31

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Arthurvdv Arthurvdv merged commit 4f0e78c into main Jun 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: A supported task execution handler was not found. Not compatible with your current operating system Windows(X64)

1 participant