{"id":"cb3f829f7b0436d0","repo":"jestjs/jest","slug":"unexpected-request-from-parent-process-request","errorCode":null,"errorMessage":"Unexpected request from parent process: ${request[0]}","messagePattern":"Unexpected request from parent process: (.+?)","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/jest-worker/src/workers/processChild.ts","lineNumber":89,"sourceCode":"\n        initialized = true;\n\n        if (main.setup) {\n          execFunction(\n            main.setup,\n            main,\n            setupArgs,\n            reportSuccess,\n            reportInitializeError,\n          );\n        } else {\n          reportSuccess(void 0);\n        }\n      }\n      break;\n\n    default:\n      throw new TypeError(\n        `Unexpected request from parent process: ${request[0]}`,\n      );\n  }\n};\nprocess.on('message', messageListener);\n\nfunction reportSuccess(result: unknown) {\n  if (!process || !process.send) {\n    throw new Error('Child can only be used on a forked process');\n  }\n\n  try {\n    process.send([PARENT_MESSAGE_OK, result]);\n  } catch (error) {\n    if (\n      isError(error) &&\n      // if .send is a function, it's a serialization issue\n      !error.message.includes('.send is not a function')","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/jestjs/jest/blob/f49721c78e195558b40913977c9230f5b7f559d8/packages/jest-worker/src/workers/processChild.ts#L71-L107","documentation":"Error \"Unexpected request from parent process: ${request[0]}\" thrown in jestjs/jest.","triggerScenarios":"Thrown at packages/jest-worker/src/workers/processChild.ts:89 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Internal Jest error: the parent process sent an unrecognized request type to a forked child. Ensure the parent and child run the same Jest version; if the mismatch persists, upgrade Jest and report the issue."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"f49721c78e195558b40913977c9230f5b7f559d8","analyzedAt":"2026-08-03T20:16:28.571Z","schemaVersion":2}