coollabsio/coolify · error · RuntimeException
Invalid encrypted payload.
Error message
Invalid encrypted payload.
What it means
Error "Invalid encrypted payload." thrown in coollabsio/coolify.
Source
Thrown at app/Services/ServerTransfer/ServerTransferBundle.php:137
'encrypted' => true,
'schema_version' => self::SCHEMA_VERSION,
'payload' => base64_encode($iv.$mac.$cipher),
];
}
/**
* @param array<string, mixed> $encrypted
* @return array<string, mixed>
*/
public static function decryptWithPassphrase(array $encrypted, string $passphrase): array
{
if (! data_get($encrypted, 'encrypted')) {
throw new RuntimeException('Bundle is not encrypted.');
}
$raw = base64_decode((string) data_get($encrypted, 'payload'), true);
if ($raw === false || strlen($raw) < 48) {
throw new RuntimeException('Invalid encrypted payload.');
}
$key = hash('sha256', $passphrase, true);
$iv = substr($raw, 0, 16);
$mac = substr($raw, 16, 64);
$cipher = substr($raw, 80);
$expectedMac = hash_hmac('sha256', $iv.$cipher, $key);
if (! hash_equals($expectedMac, $mac)) {
throw new RuntimeException('Invalid passphrase or corrupted bundle.');
}
$json = openssl_decrypt($cipher, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv);
if ($json === false) {
throw new RuntimeException('Failed to decrypt transfer bundle.');
}
/** @var array<string, mixed> $bundle */
$bundle = json_decode($json, true, 512, JSON_THROW_ON_ERROR);View on GitHub (pinned to 70b9acc424)
When it happens
Trigger: Thrown at app/Services/ServerTransfer/ServerTransferBundle.php:137 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17).
Data as JSON: /api/errors/39a37f253a62557e.
Report an issue: GitHub.