https://discord.gg/botpress logo
Popup Error: Sorry an error occurred. Please try a...
# 🤝help
e
Need your help guys. I've got a simple bot asking a few questions and at the end has to open a simple html file as a popup window. I have created an Execution Card. The popup works perfectly in the Emulator. But on my website, it says "Sorry an error occurred. Please try again later" Can you help please?
w
Can you share your code v
?
You cannot interact with the DOM in an execute code card (it works in the studio like you said but not in the web chat..
Thanks @wooden-beard-40210 for your help in advance
w
So you're not using the execute code card anymore ?
and the second version , "working.html" does the desired behavior ?.
will have a lokk at your bot
e
I tried. But it didn’t work. All I want is for the signature pop up to appear when I am done with the conversation. It works if the bot appears as an icon. But it doesn’t work when I have the bot embedded within my html. It keeps saying onEvent is undefined.
Truly appreciate your help. 🙏
w
hum, can you send me the exact error you get
I've had to deal with this kind of error before
e
Actually I am not getting any errors now. But the signature popup doesn’t appear. Google chrome console throws an error: uncaught Cannot read properties of undefined (reading 'onEvent')
w
do you get something in your logs
the console I mean
e
I am getting this on my Google Chrome Console log: notworking.html:95 Uncaught TypeError: Cannot read properties of undefined (reading 'onEvent') at HTMLDocument. (notworking.html:95:36)
w
Yep i see That happens when you define the botpress object after you’re using it
It doesn’t seem to be the case here though
e
Is t possible to show a 'button' in botpress, which when clicked triggers a modal ?
w
not natively
I tried but it doesn't seem to work with the configurable integration that is kept into an iframe
e
Thank you so much for your time. God Bless
w
i will return to you if i have any update ^^
e
Many thanks
2 Views