RESOLVED FIXED198278
Cannot store blobs in IndexedDB on iOS in Private Browsing mode
https://bugs.webkit.org/show_bug.cgi?id=198278
Summary Cannot store blobs in IndexedDB on iOS in Private Browsing mode
jordan.michael.last
Reported 2019-05-27 11:28:25 PDT
As far as I know you cannot store blobs in IndexedDB on iOS. It would be nice to have this feature. One good thing about blobs is that they store their mime type with them, and require fewer steps from database to use after being stored.
Attachments
Chris Dumez
Comment 1 2019-05-27 12:15:00 PDT
Do you have a test page that reproduces this issue? What sort of error are you getting?
jordan.michael.last
Comment 2 2019-05-27 19:21:43 PDT
Here is the live test page: https://lastmjs.github.io/safari-blob-indexed-db-test The code is found here: https://github.com/lastmjs/safari-blob-indexed-db-test All the test page does is fetch an mp3 file and try to store the blob in IndexedDB. I've set a console.log and an alert for the error. All the alert says is "null". I'm not sure how to see what the console.log says. I have limited access to iOS devices.
jordan.michael.last
Comment 3 2019-05-27 19:23:01 PDT
Sorry, the test page fetches the audio file, tries to store the blob in IndexedDB, then tries to retrieve the file and set the src of the audio element to the object url created from window.URL.createObjectURL. If the example is successful, you should be able to click play on the audio element and hear Alexander Graham Bell's voice.
jordan.michael.last
Comment 4 2019-05-27 19:31:06 PDT
It looks like the iOS device I was testing on is on iOS version 12.0.1. I tested it on another phone with version 12.2, and the test page works. I'll do some more testing and report back. It would be nice if someone could independently reproduce my results.
Chris Dumez
Comment 5 2019-05-27 19:51:14 PDT
The bug does not reproduce for me on iOS 12.4 beta. This likely has been fixed already?
jordan.michael.last
Comment 6 2019-05-27 21:09:57 PDT
Seems likely, I've tested it on two 12.2 devices now and it works.
jordan.michael.last
Comment 7 2019-06-04 23:14:43 PDT
I've done some more testing: 12.2 works fine 12.3 works fine 12.3.1 does not work with an explicit error: DataCloneError: Failed to store record in an IDBObjectStore: BlobURLs are not yet supported. The behavior seems inconsistent across versions, and Chris you say it's working on 12.4 beta? Is there any way to get a confirmation that it is indeed fixed in 12.4 and will continue to be supported thereafter, officially?
Chris Dumez
Comment 8 2019-06-05 08:52:25 PDT
I have just confirmed that the test page (https://lastmjs.github.io/safari-blob-indexed-db-test) works as expected on iOS 13 beta 1.
jordan.michael.last
Comment 9 2019-06-05 09:37:52 PDT
Thanks for everything!
jordan.michael.last
Comment 10 2019-08-21 20:49:00 PDT
So I'm not so sure this is fixed. I went to an Apple store to test downloads on https://podcrypt.app, and I started getting the same exact error again. This was yesterday. I tested on multiple devices and all were on iOS 12.4 (16G77), and all failed with the "DataCloneError: Failed to store record in an IDBObjectStore: BlobURLs are not yet supported." I have access to another device at home with iOS 12.4 (16G77), and the error does not throw. What's going on here? I'm not confident iOS 13 has this fixed since some versions seem to work, some don't, and even the same version on different devices are not consistent in their behavior.
jordan.michael.last
Comment 11 2019-09-09 22:11:52 PDT
I think I know my issue...the devices at the Apple store are set to private mode by default, and private mode does not have support for IndexedDB blobs. So, non-private mode definitely works in 12.4
Note You need to log in before you can comment on or make changes to this bug.