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
- Reload the clone dialog and pick a destination that still exists
- Verify under the team's servers/destinations that the target destination is present
- 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
- Reload the clone dialog after destination or server deletions elsewhere in the UI
- Re-fetch selectable destinations on modal open rather than caching them in component state
- Re-check the destination immediately before the copy loop, not only at form render
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
- Destination does not belong to the current team.
- Server not found.
- Network already added to this server.
- Preview not found
- Project with the same name already exists.
AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17).
Data as JSON: /api/errors/42b839b99cb58d25.
Report an issue: GitHub.