Solution skill
GitLab pipeline stuck on the Nx Cloud heartbeat
Complete solution
Shows how to fix gitLab pipeline stuck on the Nx Cloud heartbeat. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
To unstick the pipeline immediately, disable Nx Cloud for the run with the --no-cloud CLI flag or the NXNOCLOUD=true environment variable.
Steps
- To unstick the pipeline immediately, disable Nx Cloud for the run with the --no-cloud CLI flag or the NXNOCLOUD=true environment variable. To permanently decouple, edit nx.json: switch the default tasks runner from nx-cloud back to nx/tasks-runners/default and remove the accessToken and url options. Then investigate the Nx Cloud outage or token issue separately instead of letting it block every pipeline.
When to use
You are seeing this: The accepted answer identifies the Nx Cloud task runner as the culprit and gives both a temporary and a permanent way to decouple from it. Use this skill when you run into "GitLab pipeline stuck on the Nx Cloud heartbeat".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Stack Overflow #78242481 (accepted answer, 4 votes): a GitLab pipeline that worked for weeks suddenly hangs with NX Took longer than 3 seconds to hear from heartbeat process. The accepted answer identifies the Nx Cloud task runner as the culprit and gives both a temporary and a permanent way to decouple from it.
Verified resolution: To unstick the pipeline immediately, disable Nx Cloud for the run with the --no-cloud CLI flag or the NXNOCLOUD=true environment variable. To permanently decouple, edit nx.json: switch the default tasks runner from nx-cloud back to nx/tasks-runners/default and remove the accessToken and url options. Then investigate the Nx Cloud outage or token issue separately instead of letting it block every pipeline.
Source URL: https://stackoverflow.com/questions/78242481/gitlab-pipeline-stuck-with-nx-cloud-issue
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_SmingNQQ0h6RQEOkAR963w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">GitLab pipeline stuck on the Nx Cloud heartbeat <span>— Vectle</span></a>