Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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)
Solved! Go to Solution.
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 bothallow-scripts
andallow-same-origin
, as that lets the embedded document remove thesandbox
attribute — making it no more secure than not using thesandbox
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
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
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
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 bothallow-scripts
andallow-same-origin
, as that lets the embedded document remove thesandbox
attribute — making it no more secure than not using thesandbox
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
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
User | Count |
---|---|
10 | |
5 | |
4 | |
4 | |
3 |
User | Count |
---|---|
14 | |
9 | |
5 | |
5 | |
4 |