Bubble does not load <script> although works in empty index.html

Hello! The issue I have is that I am unable to render a chatbot via a Bubble page. It is a one liner script that loads a bundle to display the chatbot. When I insert this line into an empty index.html page in plain code (outside Bubble), it works like a charm.

However, it does not seem to work on Bubble. I have tried both through a HTML element and via the page HTML header, but none work.

Here is how the one liner looks like:
<script src="https://...[mydomain].../bundle.js?id=1694018478971x385571189599764500"></script>

Can you please fix the issue?

Yeah, well, there’s nothing to worry about timing when using an empty index file. Here there is a million things working in required sequences. I bet you’re referring to an ID in your script that doesn’t exist yet when the code is being run. You’re going to want to leverage a load event listener on a specific element, so that the code runs at the proper time.

Also, you mention your domain, and if that’s a local server or something please check for CORS issues.

Thanks @jonah.deleseleuc. The ID is already existing prior to running the code - it is meant to load preconfigured items in the chatbot based on this ID.

Will look into CORS issues as next step.

This topic was automatically closed after 14 days. New replies are no longer allowed.