Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

151
Views
What could be causing transaction for indexeddb to not work in my code
var database = window.indexedDB.open("myTestDatabase", 3);

database.onerror = function(event) {
    alert('Error creating database');
}

database.onupgradeneeded = function(event) {
    var db = event.target.result;

    console.log(1);
    //
    if (!db.objectStoreNames.contains("data")) {
        //Add to indexDB
        db.createObjectStore("data", {
            keypath: "data"
        });
    }
}

//If the database is creaed run.
database.onsuccess = function(event) {
    var db = event.target.result;

    var transaction = db.transaction(["data"], 'readwrite');
    //More code here to store data into indexeddb
}

When running my code, I run into the following error: Uncaught NotFoundError: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.

When looking at the indexeddb, the "myTestDatabase" is created, but the "data" objectstore is not. What might be the problem with this? It works sometimes, but other times it fails.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!