{"record":{"id":"339fe146f743d624","repo":"oven-sh/bun","slug":"invalidscannerversion","errorCode":null,"errorMessage":"InvalidScannerVersion","messagePattern":"InvalidScannerVersion","errorType":"exception","errorClass":"bun_install::Error","httpStatus":null,"severity":"error","filePath":"src/install/error.rs","lineNumber":113,"sourceCode":"    #[error(\"InvalidIPCMessage\")]\n    InvalidIPCMessage,\n    #[error(\"InvalidIPCFormat\")]\n    InvalidIPCFormat,\n    #[error(\"MissingIPCType\")]\n    MissingIPCType,\n    #[error(\"InvalidIPCType\")]\n    InvalidIPCType,\n    #[error(\"MissingErrorCode\")]\n    MissingErrorCode,\n    #[error(\"InvalidErrorCode\")]\n    InvalidErrorCode,\n    #[error(\"UnknownErrorCode\")]\n    UnknownErrorCode,\n    #[error(\"SecurityScannerNotFound\")]\n    SecurityScannerNotFound,\n    #[error(\"SecurityScannerNotInDependencies\")]\n    SecurityScannerNotInDependencies,\n    #[error(\"InvalidScannerVersion\")]\n    InvalidScannerVersion,\n    #[error(\"ScannerFailed\")]\n    ScannerFailed,\n    #[error(\"UnknownMessageType\")]\n    UnknownMessageType,\n    #[error(\"MissingAdvisoriesField\")]\n    MissingAdvisoriesField,\n    #[error(\"SecurityScannerFailed\")]\n    SecurityScannerFailed,\n    #[error(\"SecurityScannerTerminated\")]\n    SecurityScannerTerminated,\n    #[error(\"InvalidAdvisoriesFormat\")]\n    InvalidAdvisoriesFormat,\n    #[error(\"InvalidAdvisoryFormat\")]\n    InvalidAdvisoryFormat,\n    #[error(\"MissingPackageField\")]\n    MissingPackageField,\n    #[error(\"InvalidPackageField\")]","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/install/error.rs#L95-L131","documentation":"The security scanner subprocess started successfully but replied with an IPC error message carrying code INVALID_VERSION, meaning the scanner detected a version mismatch — typically its own version versus the IPC protocol or arguments Bun passed. Bun surfaces this as InvalidScannerVersion after printing the scanner's message (security_scanner.rs:1662-1671).","triggerScenarios":"The spawned scanner validates a protocol/API version handshake and rejects what Bun sends. Happens when a scanner built for an older/newer Bun security-scanner IPC contract is configured, or the installed scanner package version is incompatible with the current Bun release.","commonSituations":"Upgrading Bun (or the scanner) without upgrading the other half of the pair; pinning an old scanner version in CI while Bun updates; a custom in-house scanner that checks process.argv or an env-provided protocol version and disagrees.","solutions":["Upgrade the scanner package to the latest version (`bun add --dev <scanner>@latest`)","Upgrade or align Bun to the release the scanner documents support for (`bun upgrade`)","For a custom scanner, relax or fix the version check that emits INVALID_VERSION so it matches Bun's current IPC shape"],"exampleFix":"# before\nbun add --dev my-scanner@1.0.0   # emits INVALID_VERSION under new Bun\n\n# after\nbun add --dev my-scanner@latest\nbun install","handlingStrategy":"validation","validationCode":"# pin and verify a known-good scanner/Bun pair before install\nbun add --dev my-scanner@^2   # v2 is the line that matches your Bun major\nbun pm ls | grep my-scanner   # confirm it actually installed","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Upgrade Bun and the scanner package together, not independently","Pin both versions in CI (bun version + scanner version) so upgrades are deliberate","For custom scanners, treat the IPC protocol as a contract: version and test it"],"tags":["security-scanner","version-mismatch","ipc","install"],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}