Chat Trigger - Error in sub-node ‘Window Buffer Memory’ when Loading Previous Session

Describe the problem/error/question

When using a modified version of this flow: Chat with OpenAI Assistant (by adding a memory) | n8n workflow template

and embedding the chat trigger in a website. The OpenAI assistant is perfectly usable and has memory, but when the webpage is refreshed or a new page is loaded and the embed chat widget tries to retrieve past messages from ‘Window Buffer Memory’ is errors out.

What is the error message (if any)?

Error in sub-node ‘Window Buffer Memory’

Information on your n8n setup

Node type

@n8n/n8n-nodes-langchain.memoryBufferWindow

Node version

1.1 (Latest version: 1.2)

n8n version

1.42.1 (Cloud)

Time

6/3/2024, 10:48:09 PM

Stack trace

NodeOperationError: Error in sub-node Window Buffer Memory at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1759:19 at processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 0) at Object.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1766:19) at Object.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:2507:24) at Object.webhook (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js:369:33) at Workflow.runWebhook (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:665:15) at Object.executeWebhook (/usr/local/lib/node_modules/n8n/dist/WebhookHelpers.js:226:33)

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

I did provide this information:

n8n version: 1.42.1
Running n8n via: Cloud
n8n EXECUTIONS_PROCESS: default
OS: cloud

1 Like

Hi @thomasmay

Thanks for posting here and welcome to the community! :cake:

I just tried the template myself and I think you will have to just add in the newest node versions for the Window Buffer Memory. Unfortunately when you copy a template it will use the node versions of the time (which may have had some bugs). Let me actually raise this internally.

I had the timeout happening as well but then I changed the nodes (newest version), refreshed my browser and it worked.

Let us know if this helped?

Been trying to figure out what is going on but I am unable to get the chat to recall prior sessions using the window buffer memory without getting an error.

This first chat session works but when refreshing the page, or navigating to a different page on the site where the embedded chat widget has been placed, the recall of the past chats gives an error.

Here is the link to where the widget is running: https://euwholesale.zipfit.com

I updated all the nodes as described. running the latest n8n cloud version.

here is my current flow.

any help would be appreciated.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.