OpenCharacters icon indicating copy to clipboard operation
OpenCharacters copied to clipboard

Uncaught [object Object]

Open dawnFirefly opened this issue 1 year ago • 3 comments

josephrocca.github.io says Please report this error on the Discord or Github:

stack: DatabaseClosedError: UnknownError Internal error opening backing store for indexedDB.open. UnknownError: Internal error opening backing store for indexedDB.open. at t (https://josephrocca.github.io/OpenCharacters/:10:18817) at https://josephrocca.github.io/OpenCharacters/:10:19017 at https://josephrocca.github.io/OpenCharacters/:10:16578 at Fe (https://josephrocca.github.io/OpenCharacters/:10:10996) at Ue (https:/bosephrocca.github.io/OpenCharacters/:10:11472) at Ne (https:/josephrocca.github.io/OpenCharacters/:10:11326) line: 0

image image

dawnFirefly avatar Apr 02 '23 21:04 dawnFirefly

Hmm - what were you doing that led to this message? Just loading the web page, or importing a file, or something else?

josephrocca avatar Apr 02 '23 21:04 josephrocca

Just loading in the web page, I've open a fresh one in incognito mode and it is working normally.

On Sun, Apr 2, 2023, 2:31 PM josephrocca @.***> wrote:

Hmm - what were you doing that led to this message? Just loading the web page, or importing a file, or something else?

— Reply to this email directly, view it on GitHub https://github.com/josephrocca/OpenCharacters/issues/23#issuecomment-1493444805, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHLEAOFKFSTLVVRYVA5Y7D3W7HV4HANCNFSM6AAAAAAWQRG3H4 . You are receiving this because you authored the thread.Message ID: @.***>

dawnFirefly avatar Apr 02 '23 22:04 dawnFirefly

Strange - did you have any data (characters/threads)? And you're using Chrome, right?

If you open up the browser console and paste this code, does it download dump.json?

// import dexie.js (for opening indexed db)
await new Promise(async resolve => {
  let loaded = 0;
  let script1 = document.createElement('script');
  script1.onload = () => loaded++;
  script1.src = 'https://unpkg.com/[email protected]';
  document.body.appendChild(script1);
  let script2 = document.createElement('script');
  script2.onload = () => loaded++;
  script2.src = 'https://unpkg.com/[email protected]';
  document.body.appendChild(script2);
  while(loaded < 2) await new Promise(r => setTimeout(r, 100));
  resolve();
});

// for saving the json database dump
function downloadText(text, filename) {
  const blob = new Blob([text], {type: "application/json"});
  const dataUri = URL.createObjectURL(blob);
  let linkElement = document.createElement("a");
  linkElement.setAttribute("href", dataUri);
  linkElement.setAttribute("download", filename);
  linkElement.click();
  linkElement.remove();
  setTimeout(() => URL.revokeObjectURL(dataUri), 30*1000);
}

// save the database:
let db = new Dexie("chatbot-ui-v1");
let {verno, tables} = await db.open();
db.close();
db = new Dexie("chatbot-ui-v1");
db.version(verno).stores(tables.reduce((p,c) => {p[c.name] = Array.isArray(c.schema.primKey.keyPath) ? "["+c.schema.primKey.keyPath.join("+")+"]" : c.schema.primKey.keyPath ? c.schema.primKey.keyPath : ""; return p;}, {}));
let text = await db.export().then(blob => blob.text());
downloadText(text, "dump.json");

josephrocca avatar Apr 02 '23 23:04 josephrocca