https://discord.gg/botpress logo
Webchat: "Embed iFrame" script not displaying chat...
# 🤝help
w
In bot editor -> communication channels -> webchat -> "Embed iFrame" , the provided script (with the inject placed within the and the main script and associated div placed in ) does not appear to work when installed according to the instructions. When loaded, the chat div is empty; no error is thrown in the console. (i.e., just 'nothing') Interestingly, if
botpress.open ()
is called from within the browser console, the chat window does open, and in the correct div. I have tried tweaking the script in various ways to make the "open on load" behavior work (such as wrapping in a
DOMcontentLoaded
, a
setTimeout
, other attempts to ensure that init and loading are complete before calling
open()
), but so far nothing has worked. Another dev on my team has reported the same issue. All help and guidance is much appreciated!
p
Yes we are aware of this issue and are working towards a fix but I would recommend using other methods to embed your scripts for now. Apologies for the inconvenience.
a
What exactly are the other methods please @prehistoric-airplane-85682
p
You can add the two script tags to your file as you can find in the studio or the dashboard or embed the bot within a div as explained here: https://botpress.com/docs/webchat/get-started/embedding-webchat
6 Views