Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab pipeline stuck with nx cloud issue

I have tried run pipeline from last one week. But this is not working fine. Is there any issues here? Before last week this pipeline is working perfectly. Now this is stuck with this error.

 >  NX   Took longer than 3 seconds to hear from heartbeat process
   The heartbeat process may have not started properly. This CIPE could have inconsistent status reporting.
 >  NX   Nx Cloud: Workspace is disabled
   This Nx Cloud organization has been disabled due to exceeding the FREE plan.
   An organization admin can start a free PRO plan trial for up to two months with no billing required at https://cloud.nx.app/orgs/63c038302fe9b1000ec9a7d0/plans
Uploading artifacts for failed job
00:01
Uploading artifacts...
WARNING: /builds/pipeline/qa-alps/coverage/**/**/cobertura-coverage.xml: no matching files. Ensure that the artifact path is relative to the working directory (/builds/pipeline/qa-alps/) ```
 

 [![pipeline-issue][1]][1]


  [1]: https://i.sstatic.net/Xs9Up.png
like image 584
Akila Peiris Avatar asked Aug 31 '25 16:08

Akila Peiris


2 Answers

I ran into this same problem. The recommended solution is:

  1. Temporarily disable via:
    • the --no-cloud CLI flag; or
    • the NX_NO_CLOUD=true environment variable
  1. Permanently disable via nx.json:
    • Switch the default task runner from nx-cloud:
    • Remove the accessToken and url (if present)
{
  "tasksRunnerOptions": {
    "default": {
-      "runner": "nx-cloud",
+      "runner": "nx/tasks-runners/default",
      "options": {
        "cacheableOperations": ["build", "lint", "test", "e2e"],
-        "accessToken": "your-token",
-        "url": "your-url"
      }
    }
  }
}
like image 152
Mike Post Avatar answered Sep 03 '25 15:09

Mike Post


I just ran into this issue this morning with some pipelines for a project, I fixed it by adding, --skip-nx-cache in the build command. The command looked like this in the end.

npx nx build my-app --skip-nx-cache

After the change I ran the pipeline again and it worked. I got info about the command from this github forum post, https://github.com/nrwl/nx/issues/3338

I also added neverConnectToCloud to my nx.json file to disable connecting to the nx cloud.

I just added that to the object at the bottom of the object.

{
    "neverConnectToCloud": true,
}

https://nx.dev/ci/reference/config

like image 26
ZPappalau Avatar answered Sep 03 '25 14:09

ZPappalau