I condensed my code down to the following script to show the error:
const request = indexedDB.open("myDatabase",10);
request.onupgradeneeded = function myUpgradeHandlerFunction(event){
//Needed for Update
let db = event.target.result;
// Erstelle ein ObjectStore für diese Datenbank
try{
let objectStore = db.createObjectStore("PanelStore", { keyPath: ["panelkey","layerkey","countrycode"] });
}catch(e){console.log("Indexed DB upgrade failed with:"+e);}
}
request.onsuccess = function(event){
oConn=request.result;
let pStx = oConn.transaction('PanelStore', 'readonly');
let panelStore = pStx.objectStore('PanelStore');
let vcount = panelStore.count();
vcount.onsuccess = function() {
console.log(vcount.result);
}
const getall = panelStore.getAll();
getall.onsuccess = () => console.log(getall.result);
getall.onerror = () => console.log(getall.error);
}
request.onerror = () => console.log(request.error);
request.onblocked = () => console.log('blocked');
When I do this on with "Database 1", the output is in Chrome and Firefox
5
Array(5) [ {…}, {…}, {…}, {…}, {…} ]
When I do this with "Database 2", the output is in Chrome is
642
(642) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, …]
in Firefox it is
639
DOMException: The operation failed for reasons unrelated to the database itself and not covered by any other error code.
Of course the small and the big DB are created with the same script, uploaded to a webserver and downloaded (again: same script used in both browsers for both databases).
As you see the count delivered different information on Chrome and Firefox. I assume the sheer size makes a difference.
Adding some debug code in the function that populates the Indexeddb by loading the files from the server, I can see, that in Firefox 638 files upload fine, then the error "Uncaught DOMException: The operation failed for reasons unrelated to the database itself and not covered by any other error code." occurs (at store.put).
Maybe I'm hitting a limit within Firefox? I can't find any reliable documentation. Everyting that talks about limits is more than 8 years old and for outdated Firefox versions.
All files that are supposed to be read sum up to 274.6 MB
Any help appreciated!