Why are marketplace/custom visualizations throwing a `document is sandboxed and lacks the 'allow-same-origin'` error?

Knowledge Drop

Last tested: Mar 24, 2021
 

You might see the following with an error similar to DOMException: Failed to read the `cookie` property from 'Document': The document is sandboxed and lacks the 'allow-same-origin' flag when viewing a marketplace/custom visualization after updating to 7.20:

image (11).png

Chances are you had the "Sandboxed Custom Visualizations" labs feature enabled prior to the update and will need to disable the newly introduced in "Unsafe Custom Visualizations" legacy feature: image (14).png

This can also come up with a message like Uncaught DOMException: Failed to read the serviceWorker property from Navigator: Service worker is disabled because the context is sandboxed and lacks allow-same-origin flag

This content is subject to limited support.                

Version history
Last update:
‎05-07-2021 09:48 AM
Updated by: