Healthy Swarm task shows an empty `(Error:)` suffix on the last row of the Containers tab

Open Beginner friendly
#6,115 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@AyhamJo7 is already working on this.

Since Nov 25, 2026.

  • #6118 by @AyhamJo7 — open
  • #6178 by @Juupeee — closed without merging

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, typescript
Domain
backend

Research direction

Start in packages/server/src/services/docker.ts at getStackTaskContainers, where Docker task rows are trimmed, split on |, and the Error: field label is removed. Reproduce the trailing-empty-field case from the issue and inspect why the final row keeps the label while earlier rows become empty. The fix should strip the label independently of the trailing space, and regression coverage should cover two empty errors plus a nonempty final error; done means the Containers tab shows only Running … when Docker reports no error.

Written by the indexing model from the issue text.

Description

needs-triage🔍
To Reproduce
  1. In Dokploy, deploy a Docker Stack with at least two running tasks. Open the stack’s Containers tab.
  2. On the Swarm manager, run docker stack ps <stack> --no-trunc --filter desired-state=running --format '{{.ID}} | {{.CurrentState}} | {{json .Error}}'. Pick the last task and confirm its error is an empty string ("").
  3. Compare that task’s status on the Containers tab with the status of the preceding task.
Current vs. Expected behavior

The final row displayed running and Running 42 seconds ago (Error:). I matched the task ID on the manager: Docker reported running, the service was 1/1, and docker inspect --type task showed no Status.Err field. The application also started successfully.

Expected: Running 42 seconds ago. A suffix should appear only when Docker supplies an actual error message.

Provide environment information
Dokploy v0.31.4 (self-hosted)
Docker Stack on a remote Linux Swarm cluster
Affected view: Compose → Containers
Which area(s) are affected? (Select all that apply)

Docker Compose

Are you deploying the applications where Dokploy is installed or on a remote server?

Remote server

Additional context

In getStackTaskContainers in v0.31.4, tasksSection.trim() removes the space after the final Error:. The parser then strips the literal Error: , including its trailing space. For the last row the label survives as the nonempty string Error:, which is appended to the status.

Minimal parser reproduction using two empty Docker error fields:

const rows = ['web.1', 'web.2'].map(name =>
  `TASK : id | Name: ${name} | Node: worker | CurrentState: Running | Error: `
);
const errors = (rows.join('\n') + '\n').trim().split('\n').map(line =>
  line.split(' | ')[4].replace('Error: ', '').trim()
);
console.log(errors); // ['', 'Error:']

Stripping the field label independently of trailing whitespace (e.g. replace(/^Error:\s*/, '')) would handle the empty final field. A regression test could cover empty errors on both rows and a nonempty error on the final row.

Will you send a PR to fix it?

No

Dominant language
TypeScript
Stars
38.8k
Forks
3.2k
Avg merge
1d 8h
Merged PRs (30d)
117

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Dokploy/dokploy

All issues in Dokploy/dokploy

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.