coollabsio/coolify · error · RuntimeException

$e->getMessage()

Error message

$e->getMessage()

What it means

oldRawParser() feeds the application's stored docker_compose_raw into Symfony Yaml::parse(). Any YAML syntax error — tab indentation, unbalanced quotes/brackets, duplicate keys, bad anchors — makes Yaml throw, and the catch rethrows the underlying parser message wrapped in RuntimeException. So the text you see is Yaml's own 'line X column Y' diagnostic.

Source

Thrown at app/Models/Application.php:2030

                $commands->push($this->gitCommand(executeInDocker($deployment_uuid, $git_clone_command)));
            } else {
                $commands->push($this->gitCommand($git_clone_command));
            }

            return [
                'commands' => $this->gitCommandsAsShellCommand($commands),
                'branch' => $branch,
                'fullRepoUrl' => $fullRepoUrl,
            ];
        }
    }

    public function oldRawParser()
    {
        try {
            $yaml = Yaml::parse($this->docker_compose_raw);
        } catch (\Exception $e) {
            throw new RuntimeException($e->getMessage());
        }
        $services = data_get($yaml, 'services');

        $commands = collect([]);
        $services = collect($services)->map(function ($service) use ($commands) {
            $serviceVolumes = collect(data_get($service, 'volumes', []));
            if ($serviceVolumes->count() > 0) {
                foreach ($serviceVolumes as $volume) {
                    $workdir = $this->workdir();
                    $type = null;
                    $source = null;
                    if (is_string($volume)) {
                        $source = str($volume)->before(':');
                        if ($source->startsWith('./') || $source->startsWith('/') || $source->startsWith('~')) {
                            $type = str('bind');
                        }
                    } elseif (is_array($volume)) {
                        $type = data_get_str($volume, 'type');

View on GitHub (pinned to 70b9acc424)

Solutions

  1. Run the file through yamllint (or any YAML validator) and fix the reported line/column.
  2. Replace tab indentation with 2-space steps per level.
  3. Re-copy the compose file from the repository and edit inside the Coolify UI editor to avoid encoding artifacts.

Example fix

# before (tabs break YAML)
services:
	app:
		image: nginx

# after (spaces)
services:
  app:
    image: nginx
Defensive patterns

Strategy: validation

Validate before calling

// Lint before storing/parsing compose content
use Symfony\Component\Yaml\Exception\ParseException;
try { Yaml::parse($dockerComposeRaw); } catch (ParseException $e) { return back()->withErrors(['docker_compose_raw' => 'YAML error: ' . $e->getMessage()]); }

Try / catch

try { $parsed = $application->parse(); } catch (RuntimeException $e) { show the underlying Yaml line/column message to the user next to the raw editor; do not fall back to default parsing. }

Prevention

When it happens

Trigger: docker_compose_raw edited by hand with tabs instead of spaces; smart quotes or invisible characters pasted from a rich editor; a compose file that docker tolerates via its own pre-processing but plain YAML parsing rejects.

Common situations: Pasting compose files from websites/Word/docs that mangle characters; editing the raw editor field and breaking indentation; large multi-document files where one '---' section is malformed.

Related errors


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