{"record":{"id":"a8a8777f48c75527","repo":"usebruno/bruno","slug":"unsupported-platform-this-osplatform","errorCode":null,"errorMessage":"Unsupported platform: ${this.osPlatform}","messagePattern":"Unsupported platform: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-requests/src/network/system-proxy/index.ts","lineNumber":64,"sourceCode":"        console.warn(`System proxy detection took ${detectionTime}ms`);\n      }\n\n      return result;\n    } catch (error) {\n      throw error;\n    }\n  }\n\n  private async detectByPlatform(): Promise<ProxyConfiguration> {\n    switch (this.osPlatform) {\n      case 'win32':\n        return await new WindowsProxyResolver().detect({ timeoutMs: this.commandTimeoutMs });\n      case 'darwin':\n        return await new MacOSProxyResolver().detect({ timeoutMs: this.commandTimeoutMs });\n      case 'linux':\n        return await new LinuxProxyResolver().detect({ timeoutMs: this.commandTimeoutMs });\n      default:\n        throw new Error(`Unsupported platform: ${this.osPlatform}`);\n    }\n  }\n\n  getEnvironmentVariables(): ProxyConfiguration {\n    const { http_proxy, HTTP_PROXY, https_proxy, HTTPS_PROXY, no_proxy, NO_PROXY, all_proxy, ALL_PROXY } = process.env;\n\n    const httpProxy = http_proxy || HTTP_PROXY || all_proxy || ALL_PROXY || '';\n    const httpsProxy = https_proxy || HTTPS_PROXY || all_proxy || ALL_PROXY || '';\n    const noProxy = no_proxy || NO_PROXY || '';\n\n    return {\n      http_proxy: httpProxy ? normalizeProxyUrl(httpProxy) : null,\n      https_proxy: httpsProxy ? normalizeProxyUrl(httpsProxy) : null,\n      no_proxy: noProxy ? normalizeNoProxy(noProxy) : null,\n      source: 'environment'\n    };\n  }\n}","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-requests/src/network/system-proxy/index.ts#L46-L82","documentation":"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.","triggerScenarios":"Running bruno-requests on a non-win32/darwin/linux platform (e.g. FreeBSD, OpenBSD, AIX, or SunOS) and invoking system proxy detection.","commonSituations":"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'.","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."],"exampleFix":"// before\nconst resolver = new SystemProxyResolver();\nconst cfg = await resolver.getSystemProxy(); // throws on freebsd\n\n// after: avoid the system path on unsupported platforms\nconst isSupported = ['win32','darwin','linux'].includes(process.platform);\nconst cfg = isSupported ? await resolver.getSystemProxy() : { http_proxy: null, https_proxy: null, no_proxy: null };","handlingStrategy":"validation","validationCode":"const SUPPORTED_PLATFORMS = new Set(['win32','darwin','linux']);\nif (!SUPPORTED_PLATFORMS.has(process.platform)) {\n  // skip system proxy detection, use explicit config or direct connection\n}","typeGuard":"function isSupportedPlatform(p): p is 'win32'|'darwin'|'linux' { return p==='win32'||p==='darwin'||p==='linux'; }","tryCatchPattern":"try { return await this.detectByPlatform(); } catch (e) { if (/Unsupported platform/.test(e.message)) return DIRECT_CONFIG; throw e; }","preventionTips":["Avoid proxyMode='system' on niche platforms.","Provide explicit proxy config for unsupported OSes."],"tags":["proxy","platform","system-proxy","unsupported"],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}