Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hello everyone,
I'm working on a custom visual that required to open IDBFactory (see this post from StackOverflow).
I can't figure out how to allow this. Is it possible ?
Here is the error message I got :
Uncaught DOMException: Failed to execute 'open' on 'IDBFactory': access to the Indexed Database API is denied in this context.
at LocalDbCache.open (blob:null/470f8c49-3614-4d49-a0b7-c7a9c2553485:7363:29)
at Object.doInitGeomWorker [as doOperation] (blob:null/470f8c49-3614-4d49-a0b7-c7a9c2553485:14896:18)
at WorkerMain.dispatch (blob:null/470f8c49-3614-4d49-a0b7-c7a9c2553485:14477:12)
at blob:null/470f8c49-3614-4d49-a0b7-c7a9c2553485:41771:55
Thank you all
Solved! Go to Solution.
Hi @ThibaudGD,
From the looks of things, this requires access to the browser data storage APIs. As the custom visual iframe sandbox does not have the allow-same-origin attribute set, I don't think this will not be possible to achieve. If you want definitive confirmation you may need to contact the custom visuals team for clarification - pbicvsupport@microsoft.com.
Regards,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
I got the response from pbivsupport:
Unfortunately right now it is impossible to use stuff like indexDB from our side.
Thank you for the answers
Hi @ThibaudGD,
From the looks of things, this requires access to the browser data storage APIs. As the custom visual iframe sandbox does not have the allow-same-origin attribute set, I don't think this will not be possible to achieve. If you want definitive confirmation you may need to contact the custom visuals team for clarification - pbicvsupport@microsoft.com.
Regards,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hey there, I'm facing the same issue and was wondering if you had luck applying 'disableIndexedDb=true' and also where did you apply it in the code?
Thanks!
Hey,
Saddly not. I used x-ads-derivative-format: fallback to get svf1 id in my requests.
and are you using AggregatedView?
nope. But I'm planning to try
and how did you match dbids?
I switched the viewer to svf1 so the dbids are matching with the ones from the api request with the header x-ads-derivative-format: fallback
Which version of the forge-powerbi plugin are you using and where did you set that header up? thanks!
I did my own forge viewer in pbi. And the header x-ads-derivative-format: fallback is from here : GET Fetch All Properties | Model Derivative API | Autodesk Platform Services
Hi @dm-p,
thank you for the answer. I just email them to have confirmation.
In the meantime, do you know if there is any workaround to this ?
If you want to use something that is not permitted by the sandbox, I would say it's not directly possible to work around. I don't know the IDBFactory APIs but if it's possible to access something similar from a remote endpoint that doesn't have CORS restrictions (again, a limitation of the allow-same-origin not being set by Power BI), then that might work. MS will not apply allow-same-origin to the sandbox as it effectively removes permissions from the sandbox, which creates all kind sof potential issues with custom visuals (even if your intentions are honourable).
The only storage a visual has (unless you can get it submitted to AppSource, certified and whitelisted to use the custom visuals local storage API) is the visual properties.
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
User | Count |
---|---|
7 | |
2 | |
2 | |
2 | |
2 |