Bug 268037

Summary: REGRESSION (Safari 17.x): IndexedDB Error preparing Blob/File data to be stored in private browsing
Product: WebKit Reporter: anwong
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, ap, lmcliste, mike, sihui_liu, simon.fraser, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: Safari 17   
Hardware: iPhone / iPad   
OS: iOS 17   
Attachments:
Description Flags
store file/blob in IndexedDB test none

anwong
Reported 2024-01-24 15:30:16 PST
Created attachment 469537 [details] store file/blob in IndexedDB test While trying to store a File in IndexedDB in Safari private mode, we've run into an issue where IndexedDB returns back an error that says "Error preparing Blob/File data to be stored in objectStore". When digging into the issue more, we've found that this happens specifically when the Safari app is opened straight to a new private tab - ie if I were to long tap on the Safari app, choose "New Private Tab" and then run the test, I encounter this error. I'm on Safari 17.2 specifically, on an iPhone SE 2nd generation. I've attached a file containing all the code I was using to make a min-case repro of the issue. The steps I were using to run the test are: 1. Run `npx serve` to get a testable URL I can use on the phone 2. Close the Safari app (if it was already open) 3. Re-open Safari straight to a private tab (by doing a long tap on the app -> "New Private Tab") 4. Go to the URL provided from `npx serve` 5. Click on the "Import Image" button to get a file on my phone to try to store in IndexedDB Results: - When the test is successful, there's a results string that shows `Successfully stored {name-of-file} in IndexedDB` - When there is an IndexedDB error, the results string displays the error message (which in this case is "Error preparing Blob/File data to be stored") - similar console logging around the results from IndexedDB also log the actual error object Other info to note: If I were to: - first open a non-private tab, go to say google.com in the non-private tab, then switch to a private tab to run the test, then the store succeeds - run the test in a non-private tab, then the store succeeds - interestingly if I first run the test in a non-private tab, then all subsequent attempts a running the test in a private tab will work - until I restart the iPhone - open private tabs for Firefox/Chrome and run the test, then the store succeeds - use Safari desktop to run the test, then the store succeeds
Attachments
store file/blob in IndexedDB test (6.37 KB, text/html)
2024-01-24 15:30 PST, anwong
no flags
Radar WebKit Bug Importer
Comment 1 2024-01-24 15:47:26 PST
Alexey Proskuryakov
Comment 2 2024-01-25 18:08:48 PST
> I'm on Safari 17.2 specifically, on an iPhone SE 2nd generation. Thank you for the report! Could you please clarify which iOS versions work, and which do not? In particular, whether this worked before, and whether this is fixed in iOS 17.3.
anwong
Comment 3 2024-01-26 13:18:06 PST
> Could you please clarify which iOS versions work, and which do not? Sure! My colleagues and I have tried the following iOS versions: 16.1.1 - works 16.6.1 - works 17.2.1 - does not work 17.3 - does not work > In particular, whether this worked before, and whether this is fixed in iOS 17.3. I upgraded to 17.3 (21D50) today and I am still able to reproduce the issue. In case it helps, I hosted the same test from the attachment in this bug at https://65b4003cfdec1d4616cf032a--enchanting-praline-ca8e95.netlify.app/ in order to have an easier time running the test case on the phone.
anwong
Comment 4 2024-02-16 17:23:32 PST
Tested today on recent 17.4 beta release and issue appears to be fixed, so marking as resolved.
Note You need to log in before you can comment on or make changes to this bug.