{"record":{"id":"0d0e762086834318","repo":"n8n-io/n8n","slug":"process-completed-but-returned-no-result-this-is","errorCode":null,"errorMessage":"Process completed but returned no result. This is likely an internal error.","messagePattern":"Process completed but returned no result\\. This is likely an internal error\\.","errorType":"exception","errorClass":"TaskResultMissingError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/task-runner-python/src/task_executor.py","lineNumber":258,"sourceCode":"                assert process.exitcode is not None\n                raise TaskSubprocessFailedError(process.exitcode)\n\n            pipe_reader.join(timeout=task_timeout)\n\n            if pipe_reader.is_alive():\n                try:\n                    read_conn.close()\n                except Exception:\n                    pass\n                raise TaskResultReadError(\n                    TimeoutError(f\"Pipe reader timed out after {task_timeout}s\")\n                )\n\n            if pipe_reader.error:\n                raise TaskResultReadError(pipe_reader.error)\n\n            if pipe_reader.pipe_message is None:\n                raise TaskResultMissingError()\n\n            returned = pipe_reader.pipe_message\n\n            if \"error\" in returned:\n                error_msg = cast(PipeErrorMessage, returned)\n                raise TaskRuntimeError(error_msg[\"error\"])\n\n            if \"result\" not in returned:\n                raise TaskResultMissingError()\n\n            result_msg = cast(PipeResultMessage, returned)\n            result = result_msg[\"result\"]\n            print_args = result_msg.get(\"print_args\", [])\n            assert pipe_reader.message_size is not None\n            result_size_bytes = pipe_reader.message_size\n\n            return result, print_args, result_size_bytes\n","sourceCodeStart":240,"sourceCodeEnd":276,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/task-runner-python/src/task_executor.py#L240-L276","documentation":"TaskResultMissingError is raised when pipe_reader.pipe_message is None after a successful child exit and a successful reader join. The child finished with exit code 0 and the reader thread finished without error, but no message at all was written to the pipe. The message 'Process completed but returned no result' marks this as an internal-error condition rather than a user input problem.","triggerScenarios":"The child process ran to completion but never called the result-sending primitive (e.g. forgot to return, exited via os._exit(0) which skips finalizers/flush, or the result dispatch hook was patched out). It is almost always an internal bug in the runner harness or a sandboxing side effect, not user code.","commonSituations":"An internal regression where the child's main loop does not reach the send-result call; a sandboxing shim that overrides the result channel; a partial migration of the IPC protocol; a fork-server quirk where the worker exits 0 without dispatching.","solutions":["Report as an internal bug: capture the runner version, the user snippet, and the child's stdout/stderr if surfaced; do not treat it as a user error.","If you control the runner, verify the child-side entry point always reaches the result send on every code path, including early returns and exceptions caught inside the child.","Reproduce with verbose child logging to confirm whether the child reached the result-send call.","Check that no os._exit or sys.exit is being invoked inside the child before the result is sent."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from n8n_task_runner.errors import TaskResultMissingError\ntry:\n    result = TaskExecutor.execute_process(proc, rc, wc, task_timeout, continue_on_fail=False)\nexcept TaskResultMissingError as e:\n    # internal-error path: capture diagnostics, do not blame user code\n    report_internal_bug(\"child exited without sending result\", exc=e)\n    return [{\"json\": {\"error\": \"internal: no result returned\"}}], [], 0\n","preventionTips":["Ensure every child code path reaches the result-send call.","Never call os._exit in user code; use return.","Add a child-side guard that asserts a result is sent before exit.","Run the runner's own integration tests after any IPC change."],"tags":["python","task-runner","ipc","internal-error","pipe"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}