continuedev/continue · warning
Empty certificate found at ${path}
Error message
Empty certificate found at ${path} What it means
While aggregating custom TLS certificates, getAllCachedCustomCerts maps over configured cert paths; if a path exists but resolves to empty content (getCachedCustomCert returns falsy), this warning is logged — and only when VERBOSE_FETCH is set, otherwise it is silent. The empty cert is simply not added to the bundle.
Source
Thrown at packages/fetch/src/certs.ts:100
}
const certContent = getCertificateContent(path);
this._customCerts.set(path, certContent);
return certContent;
}
async getAllCachedCustomCerts(
caBundlePath: string[] | string,
): Promise<string[]> {
const paths = Array.isArray(caBundlePath) ? caBundlePath : [caBundlePath];
const certs: string[] = [];
await Promise.all(
paths.map(async (path) => {
try {
const certContent = await this.getCachedCustomCert(path);
if (certContent) {
certs.push(certContent);
} else if (process.env.VERBOSE_FETCH) {
console.warn(`Empty certificate found at ${path}`);
}
} catch (error) {
if (process.env.VERBOSE_FETCH) {
console.error(
`Error loading custom certificate from ${path}:`,
error,
);
}
}
}),
);
return certs;
}
async getCa(caBundlePath: undefined | string | string[]): Promise<string[]> {
if (!caBundlePath) {
return this.fixedCa;
}View on GitHub (pinned to 5522c6f44c)
Solutions
- Inspect the file at the reported path: `ls -la <path>` and `wc -c <path>` to confirm it is empty
- Restore or regenerate the PEM bundle so it contains a full -----BEGIN CERTIFICATE----- block
- Remove the path from custom certificate configuration if it is no longer needed
- Set VERBOSE_FETCH=1 while debugging to surface these otherwise-silent skips
Defensive patterns
Strategy: validation
Validate before calling
for (const p of certPaths) {
const stat = await fs.stat(p);
if (stat.size === 0) throw new Error(`Empty certificate file: ${p}`);
} Prevention
- Validate cert files are non-empty PEMs at deploy time
- Run with VERBOSE_FETCH=1 when diagnosing TLS issues
- Include a -----BEGIN CERTIFICATE----- sanity check in config validation
When it happens
Trigger: Configuring a custom CA bundle path whose file is zero bytes, contains only whitespace, or was truncated; running with VERBOSE_FETCH=1 to see the diagnostic.
Common situations: Empty/truncated .pem created by a failed curl, a mount point with an unreadable file, or a CI cache that produced a 0-byte cert; corporate MITM proxy CA setup where the injected file is empty.
Understand the failure class
- SSL/TLS and certificate errors — how TLS handshakes and certificate validation fail.
Related errors
- Profile ${profileId} not found
- HTTP ${resp.status} ${resp.statusText}
- No reranker set up
- No chat model selected
- Failed to load config
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/50d59dfc318279b9.
Report an issue: GitHub.