{"record":{"id":"e1ee1b48d7f8b626","repo":"cypress-io/cypress","slug":"platform-platform-is-not-supported","errorCode":null,"errorMessage":"Platform: \"${platform}\" is not supported.","messagePattern":"Platform: \"(.+?)\" is not supported\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"cli/lib/tasks/state.ts","lineNumber":20,"sourceCode":"import os from 'os'\nimport path from 'path'\nimport untildify from 'untildify'\nimport Debug from 'debug'\nimport { cwd } from 'process'\nimport fs from 'fs-extra'\nimport util from '../util'\n\nconst debug = Debug('cypress:cli')\n\nconst getPlatformExecutable = (): string => {\n  const platform = os.platform()\n\n  switch (platform) {\n    case 'darwin': return 'Contents/MacOS/Cypress'\n    case 'linux': return 'Cypress'\n    case 'win32': return 'Cypress.exe'\n      // TODO handle this error using our standard\n    default: throw new Error(`Platform: \"${platform}\" is not supported.`)\n  }\n}\n\nconst getPlatFormBinaryFolder = (): string => {\n  const platform = os.platform()\n\n  switch (platform) {\n    case 'darwin': return 'Cypress.app'\n    case 'linux': return 'Cypress'\n    case 'win32': return 'Cypress'\n      // TODO handle this error using our standard\n    default: throw new Error(`Platform: \"${platform}\" is not supported.`)\n  }\n}\n\nconst getBinaryPkgPath = (binaryDir: string): string => {\n  const platform = os.platform()\n","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/cypress-io/cypress/blob/0d85fdc91230885bca0a91df278312800a48b727/cli/lib/tasks/state.ts#L2-L38","documentation":"Raised by getPlatformExecutable() when os.platform() returns a value other than 'darwin', 'linux', or 'win32'. The Cypress desktop binary only ships executable layouts for those three platforms, so the function cannot compute the path to the binary entry point (e.g. Contents/MacOS/Cypress, Cypress, Cypress.exe). The TODO comment notes this is not yet using Cypress's standard error format.","triggerScenarios":"Running any Cypress command that needs the binary path on a Node build whose process.platform is something like 'aix', 'sunos', 'freebsd', or 'openbsd'. Also triggered by test environments that mock os.platform() to an unsupported value.","commonSituations":"Attempting to run Cypress on an unsupported OS (e.g. FreeBSD, SmartOS); a misconfigured container/VM reporting a nonstandard platform; running under a Node runtime that reports a platform string Cypress does not recognize.","solutions":["Run Cypress on a supported OS: macOS, Linux, or Windows. For other Unix systems, use the Linux build inside a compatible emulation/container if licensing allows.","Confirm the platform with `node -e \"console.log(require('os').platform())\"` and ensure it reports darwin, linux, or win32.","If you hit this inside CI, switch the runner image to a supported OS."],"exampleFix":"# before: running on FreeBSD (os.platform() === 'freebsd')\n# after: run the job on a linux runner image","handlingStrategy":"validation","validationCode":"import os from 'os'\n\nconst platform = os.platform()\nconst supported = new Set(['darwin', 'linux', 'win32'])\nif (!supported.has(platform)) {\n  throw new Error(`Unsupported platform ${platform}; Cypress runs on macOS, Linux, or Windows.`)\n}","typeGuard":"function isSupportedPlatform(p: string): p is 'darwin' | 'linux' | 'win32' {\n  return p === 'darwin' || p === 'linux' || p === 'win32'\n}","tryCatchPattern":null,"preventionTips":["Gate Cypress usage on os.platform() being darwin/linux/win32 before invoking install or run.","Choose CI runner images that report a supported platform.","Fail fast in your own setup script rather than letting Cypress throw deep in state resolution."],"tags":["platform","binary","unsupported-os"],"backgroundTag":null,"analyzedSha":"0d85fdc91230885bca0a91df278312800a48b727","analyzedAt":"2026-08-12T16:24:28.056Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}