usebruno/bruno · error · Error
Unsupported platform
Error message
Unsupported platform: ${this.osPlatform} What it means
SystemProxyResolver.detectByPlatform only handles win32, darwin, and linux. Node's os.platform() returning anything else (aix, freebsd, openbsd, sunos, android, cygwin) hits the default branch and throws.
Solutions
- Switch proxyMode off 'system' to 'off' or configure an explicit proxy so detectByPlatform is never called.
- Run on a supported platform (linux/darwin/win32).
- Contribute a resolver for the missing platform and add a case to the switch.
Example fix
// before
const resolver = new SystemProxyResolver();
const cfg = await resolver.getSystemProxy(); // throws on freebsd
// after: avoid the system path on unsupported platforms
const isSupported = ['win32','darwin','linux'].includes(process.platform);
const cfg = isSupported ? await resolver.getSystemProxy() : { http_proxy: null, https_proxy: null, no_proxy: null }; Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_PLATFORMS = new Set(['win32','darwin','linux']);
if (!SUPPORTED_PLATFORMS.has(process.platform)) {
// skip system proxy detection, use explicit config or direct connection
} Type guard
function isSupportedPlatform(p): p is 'win32'|'darwin'|'linux' { return p==='win32'||p==='darwin'||p==='linux'; } Try / catch
try { return await this.detectByPlatform(); } catch (e) { if (/Unsupported platform/.test(e.message)) return DIRECT_CONFIG; throw e; } Prevention
- Avoid proxyMode='system' on niche platforms.
- Provide explicit proxy config for unsupported OSes.
When it happens
Trigger: Running bruno-requests on a non-win32/darwin/linux platform (e.g. FreeBSD, OpenBSD, AIX, or SunOS) and invoking system proxy detection.
Common situations: Running on niche Unix flavors, WSL is fine (linux) but containers built on alpine report linux correctly; custom Node platform strings from a patched runtime; running under Termux/Android where platform is 'android'.
Related errors
- Invalid system http_proxy
- Linux proxy detection failed
- macOS proxy detection failed
- No Linux proxy configuration found
- No Windows proxy configuration found
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/a8a8777f48c75527.
Report an issue: GitHub.
Appendix: source
Thrown at packages/bruno-requests/src/network/system-proxy/index.ts:64
console.warn(`System proxy detection took ${detectionTime}ms`);
}
return result;
} catch (error) {
throw error;
}
}
private async detectByPlatform(): Promise<ProxyConfiguration> {
switch (this.osPlatform) {
case 'win32':
return await new WindowsProxyResolver().detect({ timeoutMs: this.commandTimeoutMs });
case 'darwin':
return await new MacOSProxyResolver().detect({ timeoutMs: this.commandTimeoutMs });
case 'linux':
return await new LinuxProxyResolver().detect({ timeoutMs: this.commandTimeoutMs });
default:
throw new Error(`Unsupported platform: ${this.osPlatform}`);
}
}
getEnvironmentVariables(): ProxyConfiguration {
const { http_proxy, HTTP_PROXY, https_proxy, HTTPS_PROXY, no_proxy, NO_PROXY, all_proxy, ALL_PROXY } = process.env;
const httpProxy = http_proxy || HTTP_PROXY || all_proxy || ALL_PROXY || '';
const httpsProxy = https_proxy || HTTPS_PROXY || all_proxy || ALL_PROXY || '';
const noProxy = no_proxy || NO_PROXY || '';
return {
http_proxy: httpProxy ? normalizeProxyUrl(httpProxy) : null,
https_proxy: httpsProxy ? normalizeProxyUrl(httpsProxy) : null,
no_proxy: noProxy ? normalizeNoProxy(noProxy) : null,
source: 'environment'
};
}
}View on GitHub (pinned to 9bdd81c7bd)