{"record":{"id":"b1a10ad76d878802","repo":"hcengineering/platform","slug":"unable-to-determine-the-required-version-of-rush-f","errorCode":null,"errorMessage":"Unable to determine the required version of Rush from ${RUSH_JSON_FILENAME} (${rushJsonFolder}). The 'rushVersion' field is either not assigned in ${RUSH_JSON_FILENAME} or was specified using an unexpected syntax.","messagePattern":"Unable to determine the required version of Rush from (.+?) \\((.+?)\\)\\. The 'rushVersion' field is either not assigned in (.+?) or was specified using an unexpected syntax\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"foundations/communication/common/scripts/install-run-rush.js","lineNumber":143,"sourceCode":"const RUSH_PREVIEW_VERSION = 'RUSH_PREVIEW_VERSION';\nconst INSTALL_RUN_RUSH_LOCKFILE_PATH_VARIABLE = 'INSTALL_RUN_RUSH_LOCKFILE_PATH';\nfunction _getRushVersion(logger) {\n    const rushPreviewVersion = process.env[RUSH_PREVIEW_VERSION];\n    if (rushPreviewVersion !== undefined) {\n        logger.info(`Using Rush version from environment variable ${RUSH_PREVIEW_VERSION}=${rushPreviewVersion}`);\n        return rushPreviewVersion;\n    }\n    const rushJsonFolder = findRushJsonFolder();\n    const rushJsonPath = path__WEBPACK_IMPORTED_MODULE_0__.join(rushJsonFolder, RUSH_JSON_FILENAME);\n    try {\n        const rushJsonContents = fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync(rushJsonPath, 'utf-8');\n        // Use a regular expression to parse out the rushVersion value because rush.json supports comments,\n        // but JSON.parse does not and we don't want to pull in more dependencies than we need to in this script.\n        const rushJsonMatches = rushJsonContents.match(/\\\"rushVersion\\\"\\s*\\:\\s*\\\"([0-9a-zA-Z.+\\-]+)\\\"/);\n        return rushJsonMatches[1];\n    }\n    catch (e) {\n        throw new Error(`Unable to determine the required version of Rush from ${RUSH_JSON_FILENAME} (${rushJsonFolder}). ` +\n            `The 'rushVersion' field is either not assigned in ${RUSH_JSON_FILENAME} or was specified ` +\n            'using an unexpected syntax.');\n    }\n}\nfunction _getBin(scriptName) {\n    switch (scriptName.toLowerCase()) {\n        case 'install-run-rush-pnpm.js':\n            return 'rush-pnpm';\n        case 'install-run-rushx.js':\n            return 'rushx';\n        default:\n            return 'rush';\n    }\n}\nfunction _run() {\n    const [nodePath /* Ex: /bin/node */, scriptPath /* /repo/common/scripts/install-run-rush.js */, ...packageBinArgs /* [build, --to, myproject] */] = process.argv;\n    // Detect if this script was directly invoked, or if the install-run-rushx script was invokved to select the\n    // appropriate binary inside the rush package to run","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/hcengineering/platform/blob/63e28dc96483967b2fc21c881b3f1023c1de7718/foundations/communication/common/scripts/install-run-rush.js#L125-L161","documentation":"writeTo in foundations/server/packages/client/src/blob.ts gives up after emptyChunkRetries consecutive empty chunks while downloading a blob and throws `Empty chunk received N times for blob <name> at offset <written>/<size>`. During the retry loop it logs ctx.warn('Empty chunk received, retrying') and backs off 100ms per attempt; this Error indicates the storage backend kept returning zero bytes so the transfer aborted partway, leaving the blob at 'written' of 'size' bytes.","triggerScenarios":"Reading a blob whose reported size is larger than the actual data available in storage — each read at the current offset returns an empty chunk until the retry budget is exhausted (default consecutive empty reads).","commonSituations":"Truncated or corrupted blob in the storage backend (upload failed mid-write); size metadata out of sync with stored content; misconfigured/inconsistent object storage (S3/MinIO) returning empty bodies; concurrent deletion of the blob mid-read.","solutions":["Verify the blob in the storage backend — check its actual size/etag against the expected size; re-upload if truncated.","Retry the blob transfer; transient storage glitches can produce empty reads that succeed on a later attempt.","Delete the broken blob and regenerate it from source data, since the stored content is shorter than the advertised size.","Check storage backend health/configuration (credentials, endpoint, consistency) if multiple blobs are affected."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await blob.writeTo(writable)\n} catch (err) {\n  if (String(err).startsWith('Empty chunk received')) {\n    // verify blob integrity, then retry the transfer from offset 0 with backoff\n    await retry(() => blob.writeTo(writable), { retries: 3, backoffMs: 500 })\n  } else throw err\n}","preventionTips":["Verify blob size/etag against metadata before downloading; treat mismatches as corrupted data.","Retry empty-chunk failures with backoff before giving up, and always resume/verify after a failure.","Monitor the storage backend for truncated uploads or consistency problems.","Avoid deleting blobs while they are being read."],"tags":["blob-storage","empty-chunk","data-corruption","retry-exhausted"],"backgroundTag":"empty-blob-chunk-retries-exhausted","analyzedSha":"63e28dc96483967b2fc21c881b3f1023c1de7718","analyzedAt":"2026-08-29T15:21:27.377Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}