cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
ThibaudGD
Frequent Visitor

Custom Visual - Can't open IDBFactory

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

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

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





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

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)




View solution in original post

12 REPLIES 12
ThibaudGD
Frequent Visitor

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

dm-p
Super User
Super User

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





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

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.





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

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)




Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.