https://discord.gg/botpress logo
WebChat is not working on my web server with v3.1
# 🤝help
b
I am trying to access my chatbot from WebChat on my HTML page. It works when testing my webpage locally, but not in production. I see this error in console logs: "Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received". I tried with several browsers and incognito window with same results. For what I've seen on debug logs, the function window.botpress.on("webchat:ready", () => { is never running. I managed to make it work using instead of v3.1, but then my chatbot styles are not being applied. Can anyone help me?
p
Could you try v3.2? Also if you are putting the script in the header add defer as such
a
I tried it but then it does not even load in localhost. Neither with v3.2 neither with defer
p
Which embedding method are you using?
a
I am embedding the chatbot on a full html page
b
One update, now it does not even work with v3
p
Could you send a screenshot of the inspect window's network tab?
p
Are there no errors?
b
No, there aren't. But the chatbot never loads
p
Are you using the two scripts? The iframe method from the studio, the div one from the docs? React?
b
I am following the steps as mentioned here: https://botpress.com/docs/webchat/get-started/embedding-webchat?_gl=1*zn7h5b*_gcl_au*Njk0MDIxMzI2LjE3NTAxODYxMzI.*_ga*MTY5MDMwNDMxMS4xNzUwMTg2MTMz*_ga_HKHSWES9V9*czE3NTUwMDAyMjIkbzEyJGcxJHQxNzU1MDAwNDg0JGo1NyRsMCRoMTgxNjc2NDYx
I added some console logs and the last one I could see is before window.botpress.on("webchat:ready", () => { .. it seems the init function works, but not this one. Shall I send you my full HTML?
p
That would definitely help me test it out!
b
I sent you on a private message
Any updates on this? My client is waiting for its chatbot, and I don't think the issue was on my side
p
I did not receive the html code.
p
Thanks
b
No fix for this yet?
3 Views