{"record":{"id":"cad963c08bdc64fa","repo":"Eugeny/tabby","slug":"not-supported","errorCode":null,"errorMessage":"Not supported","messagePattern":"Not supported","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"tabby-electron/src/services/platform.service.ts","lineNumber":103,"sourceCode":"    }\n\n    async installPlugin (name: string, version: string): Promise<void> {\n        await (promiseIpc as RendererProcessType).send('plugin-manager:install', name, version)\n    }\n\n    async uninstallPlugin (name: string): Promise<void> {\n        await (promiseIpc as RendererProcessType).send('plugin-manager:uninstall', name)\n    }\n\n    async isProcessRunning (name: string): Promise<boolean> {\n        if (this.hostApp.platform === Platform.Windows) {\n            return new Promise<boolean>(resolve => {\n                windowsProcessTreeNative.getProcessList(list => { // eslint-disable-line block-scoped-var\n                    resolve(list.some(x => x.name === name))\n                }, 0)\n            })\n        } else {\n            throw new Error('Not supported')\n        }\n    }\n\n    getWinSCPPath (): string|null {\n        const key = wnr.getRegistryKey(wnr.HK.CR, 'WinSCP.Url\\\\DefaultIcon')\n        if (key?.['']) {\n            let detectedPath = key[''].value?.split(',')[0]\n            detectedPath = detectedPath?.substring(1, detectedPath.length - 1)\n            return detectedPath\n        }\n        return null\n    }\n\n    async exec (app: string, argv: string[]): Promise<void> {\n        await execFile(app, argv)\n    }\n\n    isShellIntegrationSupported (): boolean {","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/Eugeny/tabby/blob/14e2d60b9b6dee84a53c37f05eefeb803787de04/tabby-electron/src/services/platform.service.ts#L85-L121","documentation":"Thrown by `ElectronPlatformService.isProcessRunning` on any platform other than Windows. The implementation uses `windows-process-tree`'s native `getProcessList`, which is Windows-only; on macOS/Linux it has no equivalent and the API explicitly rejects rather than returning a misleading false.","triggerScenarios":"Calling `isProcessRunning(name)` when `hostApp.platform !== Platform.Windows`. Reachable on macOS/Linux for any feature that checks for a running process (e.g. WinSCP detection, single-instance guards, dependency checks).","commonSituations":"Cross-platform feature that forgets to gate the call on platform; a Windows-only plugin loaded on Linux; testing on a developer's Mac for code that only runs in prod on Windows.","solutions":["Gate the call on platform: `if (hostApp.platform === Platform.Windows) { return isProcessRunning(name) } else { return false }`.","Implement a fallback for POSIX using `pgrep`/`ps` if cross-platform support is required.","Catch the error and degrade to `false` (treat 'not supported' as 'not running') when the result is non-critical.","Move the call out of platform-agnostic code paths so non-Windows hosts never reach it."],"exampleFix":"// before\nasync isProcessRunning (name: string): Promise<boolean> {\n    if (this.hostApp.platform === Platform.Windows) { ... }\n    else throw new Error('Not supported')\n}\n\n// caller guard\nif (this.platform.hostApp.platform === Platform.Windows) {\n    running = await this.platform.isProcessRunning('WinSCP')\n}","handlingStrategy":"validation","validationCode":"function canCheckProcessRunning (hostApp: { platform: Platform }): boolean {\n    return hostApp.platform === Platform.Windows\n}\n\nif (canCheckProcessRunning(this.hostApp)) {\n    running = await this.platform.isProcessRunning(name)\n} else {\n    running = false\n}","typeGuard":"function isWindowsHost (p: { platform: Platform }): boolean {\n    return p.platform === Platform.Windows\n}","tryCatchPattern":"try {\n    return await this.platform.isProcessRunning(name)\n} catch (e) {\n    if (e instanceof Error && e.message === 'Not supported') return false  // non-Windows: treat as not running\n    throw e\n}","preventionTips":["Gate platform-specific calls on hostApp.platform before invoking them.","Hide Windows-only UI affordances on macOS/Linux.","Provide a POSIX fallback (pgrep/ps) if cross-platform process checks are needed.","Unit-test platform branches with a fake host whose platform is set per test."],"tags":["electron","platform","windows-only","process","compatibility"],"backgroundTag":null,"analyzedSha":"14e2d60b9b6dee84a53c37f05eefeb803787de04","analyzedAt":"2026-08-12T11:46:48.773Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}