1

I'm trying to access indexedDB from the window object, however I keep getting the below error.

DOMException: Failed to execute 'open' on 'IDBFactory': access to the Indexed Database API is denied in this context.

This is how I am trying to do it.

await page.evaluate(() => {
    const idb = window.indexedDB.open("databaseName");
});

I also set --allow-file-access-from-files as part of the args in the jest-puppeteer.config.js and set the browserContext: 'default'

Still I cannot get it to work! Does anyone have the same problem?

skyboyer
  • 22,209
  • 7
  • 57
  • 64
user2302566
  • 181
  • 3
  • 13

0 Answers0