{"record":{"id":"1743ca5829f536fc","repo":"oven-sh/bun","slug":"expected-receivedcount-0-to-equal-sentcount","errorCode":null,"errorMessage":"Expected ${receivedCount[0]} to equal ${sentCount}","messagePattern":"Expected (.+?) to equal (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"bench/postMessage/postMessage-object.mjs","lineNumber":112,"sourceCode":"  worker.postMessage(objects.small);\n});\n\nbench(\"postMessage({ prop: \" + fmt(objects.medium.property.length) + \" string,    ...9 more props })\", async () => {\n  sentCount++;\n  worker.postMessage(objects.medium);\n});\n\nbench(\"postMessage({ prop: \" + fmt(objects.large.property.length) + \" string,     ...9 more props })\", async () => {\n  sentCount++;\n  worker.postMessage(objects.large);\n});\n\nawait run();\n\nawait new Promise(resolve => setTimeout(resolve, 5000));\n\nif (receivedCount[0] !== sentCount) {\n  throw new Error(\"Expected \" + receivedCount[0] + \" to equal \" + sentCount);\n}\n\n// Cleanup worker\nworker?.terminate();\n","sourceCodeStart":94,"sourceCodeEnd":117,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/bench/postMessage/postMessage-object.mjs#L94-L117","documentation":"Post-run integrity check in the postMessage object benchmark: after all benches and a 5s drain, the worker's received-message counter must equal the number of posted messages. A mismatch means messages were dropped or the worker died mid-run, invalidating the benchmark results.","triggerScenarios":"Installing with a bun.lockb last written by a pre-1.0-era Bun (v0/v1 format) - e.g. checking out an ancient branch or importing a very old repository.","commonSituations":"Reviving old projects; long-lived branches that predate a Bun upgrade; archives vendored with ancient lockfiles.","solutions":["Delete bun.lockb and run `bun install` to generate a fresh lockfile","Upgrade Bun first so the regenerated lockfile uses the current format","Commit the regenerated lockfile so the old format is gone for everyone"],"exampleFix":"# before\n$ bun install\nerror: Outdated lockfile version\n\n# after\n$ rm bun.lockb && bun install","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Delete ancient bun.lockb files when reviving old branches instead of reusing them","Upgrade Bun before regenerating so the new lockfile is current","Commit the regenerated lockfile immediately so the old format disappears"],"tags":["lockfile","version","migration"],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","contentChangedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}