{"record":{"id":"f48ac2f127387b7b","repo":"microsoft/playwright","slug":"unable-to-restore-indexeddb-e-message","errorCode":null,"errorMessage":"Unable to restore IndexedDB: ${e.message}","messagePattern":"Unable to restore IndexedDB: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/injected/src/storageScript.ts","lineNumber":202,"sourceCode":"      // Waiting for them to finish unregistering takes ages so we do not await.\n      // However, they will unregister immediately after fetch finishes and should not affect next page load.\n      // Unfortunately, loading next page in Chromium still takes 5 seconds waiting for\n      // some operation on this bogus service worker to finish.\n      if (!r.installing && !r.waiting && !r.active)\n        r.unregister().catch(() => {});\n      else\n        await r.unregister().catch(() => {});\n    }));\n\n    try {\n      for (const db of await this._global.indexedDB.databases?.() || []) {\n        // Do not wait for the callback - it is called on timer in Chromium (slow).\n        if (db.name)\n          this._global.indexedDB.deleteDatabase(db.name!);\n      }\n      await Promise.all((originState?.indexedDB ?? []).map(dbInfo => this._restoreDB(dbInfo)));\n    } catch (e) {\n      throw new Error('Unable to restore IndexedDB: ' + e.message);\n    }\n\n    this._global.sessionStorage.clear();\n    this._global.localStorage.clear();\n    for (const { name, value } of (originState?.localStorage || []))\n      this._global.localStorage.setItem(name, value);\n  }\n}\n","sourceCodeStart":184,"sourceCodeEnd":211,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/injected/src/storageScript.ts#L184-L211","documentation":"Error \"Unable to restore IndexedDB: ${e.message}\" thrown in microsoft/playwright.","triggerScenarios":"Thrown at packages/injected/src/storageScript.ts:202 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}