coollabsio/coolify · error · Exception

Destination not found.

Error message

Destination not found.

What it means

Before cloning a project or environment, clone() resolves the selected destination UUID via find_resource_destination_for_current_team(). A null result - stale select value, deleted destination, or destination belonging to another team - throws before any resources are copied.

Source

Thrown at app/Livewire/Project/CloneMe.php:103

            return;
        }
        $this->selectedServer = $server_id;
        $this->selectedDestination = $destination_uuid;
        $this->server = $this->servers->where('id', $server_id)->first();
    }

    public function clone(string $type)
    {
        try {
            $this->authorize('create', Project::class);
            $this->validate([
                'selectedDestination' => 'required',
                'newName' => ValidationPatterns::nameRules(),
            ]);
            $selectedDestination = find_resource_destination_for_current_team($this->selectedDestination);
            if (! $selectedDestination) {
                throw new \Exception('Destination not found.');
            }
            if ($type === 'project') {
                $foundProject = Project::where('name', $this->newName)->first();
                if ($foundProject) {
                    throw new \Exception('Project with the same name already exists.');
                }
                $project = Project::create([
                    'name' => $this->newName,
                    'team_id' => currentTeam()->id,
                    'description' => $this->project->description.' (clone)',
                ]);
                if ($this->environment->name !== 'production') {
                    $project->environments()->create([
                        'name' => $this->environment->name,
                        'uuid' => new_public_id(),
                    ]);
                }
                $environment = $project->environments->where('name', $this->environment->name)->first();

View on GitHub (pinned to 70b9acc424)

Solutions

  1. Reload the clone dialog and pick a destination that still exists
  2. Verify under the team's servers/destinations that the target destination is present
  3. Re-create the destination (network) if it was removed unintentionally
Defensive patterns

Strategy: validation

Validate before calling

// before clone(), confirm the destination resolves for the team
if (! find_resource_destination_for_current_team($this->selectedDestination)) {
    // repopulate the destination select from fresh data and ask the user to re-pick
}

Type guard

function destinationResolvesForTeam(string $uuid): bool
{
    return find_resource_destination_for_current_team($uuid) !== null;
}

Prevention

When it happens

Trigger: The destination select holds a UUID that no longer resolves for the current team: the destination or its server was deleted since the page loaded, or the selection state is empty/stale despite the required rule.

Common situations: Destination removed in another tab while the clone dialog was open; cloning after deleting a server; long-lived modal state on the project page.

Related errors


AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17). Data as JSON: /api/errors/42b839b99cb58d25. Report an issue: GitHub.