Uncaught DOMException: The operation is insecure

After adding the hubspot tracking code to any of my external sites, I get this browser console error in Firefox v118.0.2 on Mac. Does not appear on Chrome or Safari.

I add the tracking code in index.html as provided by hubspot:

<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/XXXXXXXX.js">
</script>

Is there any way to resolve on my end?

Uncaught DOMException: The operation is insecure.

356 ignoreSurvey.js:41

Webpack 5

fetcher.js:1

356 ignoreSurvey.js:41

Webpack 5

Hi @dorviedev,
Thank you for asking our Community!
- What is the link of the page where you get this error, please?
- Are you using a custom module?
If yes, it may be that some of the javascript within a file (which works with HubSpot forms) is ‘bleeding’ or unintentionally attempting to affect code in a custom module and therefore, is coming up with an error.
I’d recommend checking with the creator of the custom module to investigate further.
I also intended to include a few specialists in this discussion: @Anton, @alyssamwilie and @Indra do you have suggestions to help @dorviedev, please?
Also, if anybody else has anything to add and/or share, please feel free to join in the conversation :slightly_smiling_face:
Thanks and have an amazing day!
Best,
Bérangère

This isn’t in any way related to custom modules. It’s all due to how the HubSpot tracking code works. It can only be solved by the HubSpot developers, the ones who author the tracking code.

This is a problem specific to Firefox, which throws an error when the HubSpot script tries to access the browser’s local storage. The exact problem is in the file https://static.hsappstatic.net/feedback-web-renderer-ui/static-1.16751/bundles/fetcher.js, which the HubSpot script (the script at js.hs-scripts.com/XXXXXXXX.js) loads. My guess is that the script tries to access the local storage at the website’s domain (the domain where the HubSpot script is used), but it’s only allowed to access the local storage for app.hubspot.com.

I believe the error’s been there for a very long time already.

Thanks, I expected as much. Nothing to do but wait for hubspot to fix it.

We are seeing the same issue: HubSpot Onboarding - Samba Scientific - Life Science & Biotech Marketing Agency