title: "InvalidStateError: A mutation operation was attempted on a database that did not allow mutations."
body: <p>I'm trying to open a transaction inside then().It gives me exception.
  Here is the code:</p>
  
  <pre><code>open.onsuccess = function (e1) {
   var dbase = e1.target.result;
  $.get("https://www.uuidgenerator.net/api/version4").then(
          function (message) {
              debugger;
              var projectData = { "uid": message, "name": "appName", "pages": [] };
              var trans = dbase.transaction(["Project"], "readwrite"); // error over here
              var store = trans.objectStore("Project");
              var projectAddReq = store.add(projectData);
              projectAddReq.onsuccess = function (e) {
                  console.log("added project name into the database");
              }
              projectAddReq.onerror = function (e) {
                  console.log("error adding project name into the database");
              }
          });
  }
  </code></pre>
  
  <p>Can someone help me, why is the error occurring?</p>