VersionError Browser Origin: On your device Last updated 15 Oct 2026

Console: VersionError: The requested version (1) is less than the existing version (2) — IndexedDB open() failed

indexedDB.open(name, version) was called with a lower version number than the database already has.

Exact message you may see VersionError: The requested version is less than the existing versionThe requested version (1) is less than the existing version (2)IDBDatabase VersionErrorFailed to execute 'open' on 'IDBFactory'
Seen on: Chrome Firefox Safari JavaScript

Meaning

IndexedDB schema versions only go up. A deploy rolled back, two code paths use different numbers, or an old cached script is running. Open the DB without a version to use the current one, or bump your version above the stored one and migrate in onupgradeneeded.

Common causes

  • Code rolled back to an older version number
  • Two scripts or tabs open the same DB with different versions
  • Cached/old service worker serving an outdated script
  • Hard-coded version not incremented after schema changes

⚡ Quick fix

  1. Always increase the version when the schema changes
  2. Open without a version to use the existing DB
  3. Clear site data in DevTools → Application → Storage while developing

Detailed fix by platform

JavaScript

  1. const req = indexedDB.open('app', 3); req.onupgradeneeded = e => { const db = e.target.result; if (e.oldVersion < 3) db.createObjectStore('items', { keyPath: 'id' }); };

Chrome

  1. DevTools → Application → IndexedDB shows the stored version; "Clear site data" resets it

How to diagnose

  1. Versions — Stored version vs requested?
  2. Deploy — Was code rolled back?
  3. Tabs — Other tabs with old code?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

Aw, Snap! — Chrome: Aw, Snap! Something went wrong while displaying this webpage. Error code: STATUS_ACCESS_VIOLATION / SIGILL / Out of Memory (Browser)Aw, Snap!captive portal — Browser: This network requires you to sign in — captive portal (hotel, airport, café Wi-Fi) blocking HTTPS sites (Browser)captive portalQuotaExceededError — QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value exceeded the quota (JavaScript)QuotaExceededErrorSecurityError: Failed to read the 'localStorage' property — Console: SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document (Browser)SecurityError: Failed…Service worker registration failed — Console: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script (Browser)Service worker regist…The canvas has been tainted by cross-origin data — Console: SecurityError: Failed to execute 'toDataURL' / 'getImageData' on 'HTMLCanvasElement': Tainted canvases may not be exported (Browser)The canvas has been t…Unchecked runtime.lastError — Console: Unchecked runtime.lastError: The message port closed before a response was received (extension message) (Browser)Unchecked runtime.las…VersionEr…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.