https://discord.gg/botpress logo
QQ RE inject.js
# 🤝help
w
I am trying to develop a web bot that is called via JavaScript (window.botpress.init) and during this time I am passing variables, etc and it works great... However, what I have noticed is every time the "https://cdn.botpress.cloud/webchat/v3.0/inject.js" file is updated (the v3.0, I started this at v2.1) the bot stops working, or at least accpeting data being pushed to it. Is there a working around for this so I don't have to monitor the file updates constantly? TIA, Tony
p
Can you clarify what "the bot stops working" means? Are tehre any errors in your logs?
w
Leanne-Thanks for your response... Only thing I see in my logs are included in the image... For the "stops working" part the code doesn't push the variables up to the bot. This is code to kick off the bot via the web page. When the inject.js version changes the "data" stops getting passed until I update the version, then it works once again. No other changes (I removed identifying details, just so you can see the structure I kept all the variables) (edited for clarity) window.botpress.init( { botId: "", configuration: { composerPlaceholder: "Enter your question here...", botName: "XONO", botAvatar: "https://files.bpcontent.cloud/2025/03/14/15/20250314152821-MWITYTWC.png", botDescription: "Xono is an AI-powered chatbot...and stress-free.", website: { title: "www..com", link: "www..com" }, email: { title: "helpdesk@.com", link: "helpdesk@.com" }, phone: { }, termsOfService: { }, privacyPolicy: { title: "https://...privacy_policy.pdf", link: "https://...privacy_policy.pdf" }, color: "#1C3352", variant: "solid", themeMode: "light", fontFamily: "inter", radius: 1 }, clientId: "", data: { ** firstName: firstname, lastName: lName, policy : policy, rsmName: rsmName, rsmEmail: rsmEmail, rsmPhone: rsmPhone** } } ); https://cdn.discordapp.com/attachments/1390350060117823612/1390383740592849036/image.png?ex=68680f43&is=6866bdc3&hm=8250ba41e69e9068160474e9260f237dc4f436aa5aa51734be8aa3bc41e4645e&
Anyone able to offer some assistance?