coollabsio/coolify · error · RuntimeException
Invalid passphrase or corrupted bundle.
Error message
Invalid passphrase or corrupted bundle.
What it means
Error "Invalid passphrase or corrupted bundle." thrown in coollabsio/coolify.
Source
Thrown at app/Services/ServerTransfer/ServerTransferBundle.php:146
*/
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);
return $bundle;
}
/**
* Optionally re-seal secrets with Laravel's app key for intermediate storage.
* Prefer passphrase encryption for cross-instance transfers.
*
* @param array<string, mixed> $bundleView on GitHub (pinned to 70b9acc424)
When it happens
Trigger: Thrown at app/Services/ServerTransfer/ServerTransferBundle.php:146 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/81757bdc0b305c0f.
Report an issue: GitHub.