usebruno/bruno · error · Error
Invalid scutil --proxy output format
Error message
Invalid scutil --proxy output format
What it means
parseScutilOutput expects scutil's output to contain a '<dictionary>' marker; if findIndex returns -1 the output shape is unrecognized and the parser cannot locate the proxy config block, so it throws.
Source
Thrown at packages/bruno-requests/src/network/system-proxy/utils/macos.ts:32
const { stdout } = await execFileAsync('scutil', ['--proxy'], execOpts);
return this.parseScutilOutput(stdout);
} catch (error) {
throw new Error(`macOS proxy detection failed: ${error instanceof Error ? error.message : String(error)}`);
}
}
private parseScutilOutput(output: string): ProxyConfiguration {
if (typeof output !== 'string') {
throw new Error('Invalid scutil --proxy output');
}
const cleanLines = output.split('\n')
.map((line) => line.trim())
.filter((line) => line.length > 0);
const dictStart = cleanLines.findIndex((line) => line.includes('<dictionary>'));
if (dictStart === -1) {
throw new Error('Invalid scutil --proxy output format');
}
const config = this.parseConfiguration(cleanLines, dictStart);
return this.buildProxyConfiguration(config);
}
private parseConfiguration(lines: string[], startIndex: number): Record<string, any> {
const config: Record<string, any> = {};
let i = startIndex + 1;
while (i < lines.length && !lines[i].includes('}')) {
const line = lines[i];
if (!line.trim()) {
i++;
continue;
}
const keyValueMatch = line.match(/^([^:]+)\s*:\s*(.+)$/);View on GitHub (pinned to 9bdd81c7bd)
Solutions
- Run `scutil --proxy` in Terminal and inspect the output — if no '<dictionary>' appears, the parser cannot handle this macOS build.
- Report the output format to bruno and use explicit proxy config instead of 'system' mode meanwhile.
- Upgrade bruno-requests to a version whose parser matches the macOS release in use.
Defensive patterns
Strategy: validation
Validate before calling
function hasDictionaryBlock(stdout) { return typeof stdout === 'string' && stdout.includes('<dictionary>'); }
// guard before parsing
if (!hasDictionaryBlock(stdout)) { /* fall back to direct connection / explicit proxy */ } Try / catch
try { return resolver.parseScutilOutput(stdout); } catch (e) { if (/Invalid scutil --proxy output format/.test(e.message)) return DIRECT_CONFIG; throw e; } Prevention
- Pin bruno-requests to a version matching your macOS release.
- Use explicit proxy config when scutil output format diverges.
When it happens
Trigger: scutil --proxy returned output without the '<dictionary>' line — e.g. an empty result, an error string from scutil, or a radically different macOS version output format.
Common situations: macOS version mismatch (older/newer release with changed scutil formatting); scutil emitting an error like 'ncopydict: not a dictionary' instead of proxy state; running on a hackintosh/virtualized macOS with non-standard system configuration framework.
Related errors
- macOS proxy detection failed: ${error instanceof Error ? err
- Invalid scutil --proxy output
- Failed to parse the file – ensure it is valid JSON or YAML
- Failed to read ${file.name}: ${err.message}
- Invalid system http_proxy "${http_proxy}": ${error.message}
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/b6d6dd493a90bc9c.
Report an issue: GitHub.