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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.