question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.

See original GitHub issue

I am getting this error Failed to store record in an IDBObjectStore: BlobURLs are not yet supported. in ios 11 safari. To my knowlege (caniuse), this is incorrect, and bloburls are supported in this browser.

In the following code, icimageStore.put is where the error is thrown from.

    function populateIcImageTable(xml, clearIdbData, imageUrl) {

        const dbPromise = idb.open(idbHelper.databaseName, idbHelper.databaseVersionNumber, idbHelper.setupDatabase);

        let imageBlob;
        // fetch blob
        imageBlob = xml.response;

        // workout image key from the image filename
        const icimageKey = getImageKeyFromUrl(imageUrl);

        if (icimageKey === null){
            // Silently exit as we don't care if the icimage URL is invalid and its highly unlikely that it would be.
            return true;
        }

        // populate pdr table
        dbPromise.then(function (db) {
            const tx = db.transaction('icimage', 'readwrite');
            const icimageStore = tx.objectStore('icimage');

            // clear the existing data?
            if (clearIdbData){
                icimageStore.clear();
                console.log('icimage: store clear requested');
            }

            return icimageStore;

        }).then(function(icimageStore){

            // empty the table before updating it.
            if (clearIdbData) {
                console.log('icimage: store cleared');
            }

            return icimageStore.put({
                icimageKey: icimageKey,
                imageUrl: imageUrl,
                imageBlob: imageBlob

            });

        }).then(function () {

            console.log('icimage stored');

        }).catch(function(e){

            if (Raven){
                Raven.captureException(e);
            }

            console.error(e.stack);

            console.log('Error storing icimage for : '+e);
            displayNotification('danger', 'There was a problem updating the interchange image cache, please try again.', e, 'timeout');

        });

    }

Below is the log. 61089.JPG is the last image and apparently it is stored correctly.

log_censored

This bug may be due to my code, but it seems like an incorrect error message at least. Thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jakearchibaldcommented, Aug 9, 2018

There’s nothing I can really do about this, but I’ve reached out to Safari folks https://twitter.com/jaffathecake/status/1027546666721796097.

Read more comments on GitHub >

github_iconTop Results From Across the Web

198278 – Cannot store blobs in IndexedDB on iOS in Private ...
... works fine 12.3.1 does not work with an explicit error: DataCloneError: Failed to store record in an IDBObjectStore: BlobURLs are not yet...
Read more >
Mobile Safari 10 IndexedDB Blobs - Stack Overflow
TransactionInactiveError (DOM IDBDatabase Exception): Failed to store record in an IDBObjectStore: The transaction is inactive or finished. The ...
Read more >
IDBObjectStore.put() - Web APIs - MDN Web Docs
The put() method of the IDBObjectStore interface updates a given record in a database, or inserts a new record if the given item...
Read more >
I'm getting this on ios Safari when creating document
... was a problem when creating the project: DataCloneError: Failed to store record in an IDBObjectStore: BlobURLs are not yet supported." ...
Read more >
IDBObjectStore.cpp - Apple Open Source
... ec.code = IDBDatabaseException::DataCloneError; ec.message = ASCIILiteral("Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found