Skip to content

[v0.29.4] TypeError: Expected input to be a string — all Compose deployments fail #4452

Closed

Description

@owenwu00-cpu

To Reproduce

Create a new project in Dokploy UI
Add a Docker Compose application (using a Stack YML / docker-compose.yml)
Configure environment variables and settings
Click "Deploy" button
Deployment immediately fails with TypeError: Expected input to be a string
Reproducibility: 100% — every Compose deployment attempt through the UI triggers this error.

Current vs. Expected behavior

Expected: Dokploy should parse the Compose file and execute docker stack deploy successfully, as it did in previous versions.

Actual: Deployment fails immediately. Dokploy container logs show:

Error deploying Compose: TypeError: Expected input to be a string
at e (.next/server/chunks/9983.js:10:1117)
at m (.next/server/pages/api/deploy/compose/[refreshToken].js:1:12625)
(node:1) TimeoutNegativeWarning: -2913459.3033825704 is a negative number.
Timeout duration was set to 1.
Workaround confirmed: Manual docker stack deploy -c compose.yml <stack_name> via CLI succeeds, proving the Compose file and Docker Swarm are both functional. The bug is strictly in Dokploy's frontend/API layer.

Provide environment information

Operating System:
  OS: Ubuntu 24.04 LTS
  Arch: amd64

Dokploy version: v0.29.4
  Image: dokploy/dokploy:latest
  Digest: sha256:59d98af76b56ff848a03e2eb1d88a3e2211bf12183a2c81857c42fba3f82092d

VPS Provider: OVH (Beauharnois, Canada)

Docker version: 28.5.2

What applications/services are you trying to deploy?
  WordPress (PHP-FPM + Nginx sidecar) via Docker Swarm Compose Stack

Which area(s) are affected? (Select all that apply)

Docker, Docker Compose

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

Same server where Dokploy is installed

Additional context

The error originates from the Next.js API route .next/server/pages/api/deploy/compose/[refreshToken].js:1:12625, calling into .next/server/chunks/9983.js:10:1117. This suggests an input validation function (likely Zod or similar) receives an unexpected type (undefined, null, or number) instead of a string.

The accompanying TimeoutNegativeWarning with a large negative timestamp (-2913459.3033825704) may indicate a related timer/scheduler calculation bug that corrupts deployment metadata before validation.

All other Dokploy features (monitoring, logs, Traefik management) continue to work normally. Only Compose deployment via UI is broken.

Will you send a PR to fix it?

No

Activity

  1. dosubot commented on May 21, 2026

    @dosubot

    Hi @owenwu00-cpu! I'm Dosu and I’m helping the dokploy team.

    This is a known bug that was reported in issue #4081 [1] and affects the webhook-based deployment path when Watch Paths are configured on the Compose service. The root cause is in how the endpoint normalizes commit data:

    const normalizedCommits = req.body?.commits?.flatMap(
        (commit: any) => commit.modified,
    );

    When the payload's commit.modified field is missing or undefined, this produces a value that gets passed to micromatch.some() inside the shouldDeploy() function [2], which throws TypeError: Expected input to be a string because it expects string inputs.

    A fix exists in PR #4085 [3] but it has not been merged yet, so v0.29.4 still has this vulnerability.

    Workaround: If you have Watch Paths configured on your Compose service, try removing them (leave the Watch Paths field empty). When no watch paths are set, shouldDeploy() returns true immediately without calling micromatch, bypassing the crash entirely [2].

    If you're deploying via the UI "Deploy" button (not a webhook), this error shouldn't normally occur through that code path since it's designed for webhook payloads. If you're seeing it on a manual deploy, it's possible the deployment is being routed through the webhook endpoint unexpectedly — could you confirm whether you have Auto Deploy or Watch Paths enabled on this Compose service?

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about dokploy with Dosu Add Dosu to your team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions