Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jgreg14
Frequent Visitor

Custom PBI Visuals

Hey,

 

Keep butting into the below error while trying to implement React-map-gl. Any ideas?

 

 

VM28881:30889 Uncaught DOMException: Failed to read the 'caches' property from 'Window': Cache storage is disabled because the context is sandboxed and lacks the 'allow-same-origin' flag.
    at dt (<anonymous>:30889:12382)
    at <anonymous>:30889:14870
    at <anonymous>:30889:15177
    at wt (<anonymous>:30889:15230)
    at kt (<anonymous>:30889:16193)
    at Object.getSession (<anonymous>:30889:11811)
    at Object.processRequests (<anonymous>:30889:12233)
    at Object.queueRequest (<anonymous>:30889:9815)
    at Object.getSessionAPI (<anonymous>:30889:12004)
    at Map._authenticate (<anonymous>:30893:376250)

 

 

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @jgreg14,

The developer visual hosts all custom visuals in an iframe, which is sandboxed. The allow-same-origin permission is not set, and I can't see this ever being enabled within Power BI, as, according to MDN:


When the embedded document has the same origin as the embedding page, it is strongly discouraged to use both allow-scripts and allow-same-origin, as that lets the embedded document remove the sandbox attribute — making it no more secure than not using the sandbox attribute at all.

Even though your intentions might be honourable, it's a risky permission to allow in a data platform.

The only way around this is to see if your library can work with less permissions on the sandbox, and this is probably a question better directed to the authors of that library to see if there are any such options - this won't be resolvable within Power BI as-is, unfortunately.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @jgreg14,

It seems like the library that you invoke contains some operations that will be blocked by the power bi custom visual sandbox environment. 

For this scenario, I'd like to suggest you contact to library author to report this for the instead operations or try to find out other libraries that not include these types of operations.

BTW, you can also submit an idea for adding cache feature support for the sandbox environment.

Regards,

Xiaoxin Sheng

dm-p
Super User
Super User

Hi @jgreg14,

The developer visual hosts all custom visuals in an iframe, which is sandboxed. The allow-same-origin permission is not set, and I can't see this ever being enabled within Power BI, as, according to MDN:


When the embedded document has the same origin as the embedding page, it is strongly discouraged to use both allow-scripts and allow-same-origin, as that lets the embedded document remove the sandbox attribute — making it no more secure than not using the sandbox attribute at all.

Even though your intentions might be honourable, it's a risky permission to allow in a data platform.

The only way around this is to see if your library can work with less permissions on the sandbox, and this is probably a question better directed to the authors of that library to see if there are any such options - this won't be resolvable within Power BI as-is, unfortunately.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.