title: Version Change Transaction was aborted in upgradeneeded event handler error in indexedDB
body: <p>I'm trying to create two object store using IndexedDB and store data in them. The First object store is created with data, however after creating the second object store and storing the data, handler goes to on error and on inspecting evt.srcElement --> IDBOpenDBRequest-- > error : DOM Error, message : "Version Change Transaction was aborted in upgradeneeded event handler" and name : "ABortError" </p>
  
  <pre><code>    var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB ||     window.msIndexedDB;
  var IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
  var db;
   var request = indexedDB.open("xxMobileDB", 1);  
           request.onsuccess = function (evt) {
               db = request.result;
               var version = parseInt(db.version);
               db.close();
               var request1 = indexedDB.open("xxMobileDB", version + 1);
               request1.onupgradeneeded = function (evt)
               {
  
                   var objectBOMStore = evt.currentTarget.result.createObjectStore(
                           "BOM", { keyPath: "PackNumber", autoIncrement: true });
  
                   objectBOMStore.createIndex("PackNumber", "PackNumber", { unique: false });
  
                   for (var i = 0; i &lt; BOMData.length; i++)
                   {
                       var obj = BOMData[i];
                       objectBOMStore.add(obj);
                   }
  
               };
               request1.onsuccess = function (evt)
               {
                   evt.target.result.close();
               };
               request1.onerror = function (evt) {
                   console.log("IndexedDB error: " + evt.target.errorCode);
               };
  
           };
  
           request.onerror = function (evt) {
               console.log("IndexedDB error: " + evt.target.errorCode);
           };
  
           request.onupgradeneeded = function (evt)
           {
               var objectStore = evt.currentTarget.result.createObjectStore(
                        "Pack", { keyPath: "PackId", autoIncrement: true });
  
               objectStore.createIndex("PackId", "PackId", { unique: true });
  
               for (var i = 0; i &lt; packData.length; i++)
               {
                   var obj = packData[i];
                   objectStore.add(obj);
               }
  
  
           };
  </code></pre>
  
  <p>After populating the objectBOMStore, the code enters request1.error . The object store Pack is created without any error and I can see them in Chrome-->Resources--> IndexedDB</p>