I just found what is causing the problem in my case, but unfortunately, not a solution. It’s the “response to webhook” node. For some reason, it’s being read incorrectly from the webchat when it loads, and not as response when you send a message, and is treated as an error in the code. I have the response as text just to return fixed texts in the chat. However, if I add quotes around the texts or change the return type to JSON, it works normally. But of course, I don’t want the responses to have quotes or be in JSON format. This seems like a bug to me.
Same issue for me… no input field. Tried embedded and hosted on the chat trigger node, same issue.
update: Here is an error message likely related:
[Error] SyntaxError: The string did not match the expected pattern.
(anonymous function)
Fl (chat.bundle.es.js:817)
br (chat.bundle.es.js:814)
(anonymous function) (chat.bundle.es.js:781)
It’s rerring to the webhook.
Here is my page; I put …'s around the word script as comments here can’t have actual script tags:
< ...script... type="module"> import { createChat } from 'https://cdn.jsdelivr.net/npm/@n8n/chat/dist/chat.bundle.es.js'; createChat({
webhookUrl: "https://n8n-railway-custom-production-fc79.up.railway.app/webhook/<id here; redacted>/chat"
});
<…script…>
~
update: when I chose to add an option at the bottom of the node configuration interface and added a default input text, the input appeared. Hmmm.
update 2: seems to be working. the next issue was that the chat responses were full json messages; I found the solution here (see Romain’s answer):
I put my config into my similar question below; commenting here so you might be alerted to my question, Jon. ![]()
I ran into this issue and checked the console in my browser and realized that all web socket requests were failing.
I forgot to add websocket support to my nginx config on my server, so I added this:
WebSocket support
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
into the / server block in my nginx config
how you create this chatbot welcome message trigger
Hi,
Does it mean that it’ll only works in https?
was there ever a fix for this? having this issue right now trying to deploy.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.