Problem z transakcjami "readwrite" w IndexedDB na Firefoxie

0

Mam napisany wrapper dla IndexedDB którego problematyczną część stanowi wywołanie .put(...) na transakcji typu RW:
Wywołanie na Firefoxie kończy się błędem: DOMException: Data provided to an operation does not meet requirements.
(Na końcu posta załączam cały kod wrappera, oraz logi z wywołania)

    static async set(store: DbStores, key: EntityKey, value: any): Promise<void> {
        if(!this.isInitialized()) {
            await this.initalize()
        }

        DefaultLogger.debug(`requesting database store update: store: ${store}, key: ${key} value: ${value}`)
        
        //make sure value is string
        if(typeof value === undefined)
            throw Error(`Invalid value type`)

        //request transaction
        const transaction = await this.getStoreTransaction(store, "readwrite")
        
        //add object to store
        transaction.objectStore(store) 
            .put(value, key as IDBValidKey) // <-- błąd: "DOMException: Data provided to an operation does not meet requirements."

        this.emitValueChanged(store, key, value)
    }

W debugerze ewidentnie zwracana transakcja jest typu: "readwrite".

Tworzenie bazy:

                openRequest.onupgradeneeded = (ev) => {
                    const result = openRequest.result

                    result.createObjectStore(DbStores.MetadataStore, { keyPath: "metadata"})

                    //wipe API requests metadata
                    if(result.objectStoreNames.contains(DbStores.APIRequestsMetadataStore))
                        result.deleteObjectStore(DbStores.APIRequestsMetadataStore) //delete old version of requests metadata

                    result.createObjectStore(DbStores.APIRequestsMetadataStore, { keyPath: "apimetadata"} ) //(re)create API requests metadata

                    //wipe API responses
                    if(result.objectStoreNames.contains(DbStores.APIResponsesStore))
                        result.deleteObjectStore(DbStores.APIResponsesStore)//delete old version of responses

                    result.createObjectStore(DbStores.APIResponsesStore, { keyPath: "apiresponses" }) //(re)create API responses store
                }

W podglądzie FF wszystkie magazyny są tworzone poprawnie.
Chrome łyka wszystko bez problemu, próbowałem na FF: 72.0.2 (stabilny) oraz najnowszym dev: 89.0b12 (developer edition)

Log:

[DEBUG]: requesting database store update: store: MetadataStore, key: isAllowed value: true
Uncaught (in promise) DOMException: Data provided to an operation does not meet requirements. -> dbHandler.ts: linia: 150
[INFO] : transaction completed: {} -> dbHandler.ts: linia: 275

Co ciekawe: transaction.onerror (linia: nie jest wykonowyane 279)

Cały kod wrappera (dbHandler.ts):
dbHandler.ts - pastebin

Z góry dzięki za pomoc

0

Klasycznie 10 minut po zamieszczeniu posta wpadłem na przyczynę ;-;
Okazuje się, że chromedev jakimś cudem to puścił (a to nie ma prawa działać, bo ustawiając "keyPath" dla objectStore nie można użyć klucza w operacji .put(...)) i utworzył podklucz dla objectStore z ustawionym keyPath

1 użytkowników online, w tym zalogowanych: 0, gości: 1