You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[WASM] Saving through the download fallback throws TypeError: handle.createWritable is not a function on Safari 15.2 to 18 #25683
On Safari 15.2 to 18 (iOS 15.2 to 18, and macOS), saving a file with FileSavePicker through the download fallback fails. PickSaveFileAsync returns a file, but CachedFileManager.CompleteUpdatesAsync throws:
TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)
The download picker stages the file in the origin-private file system (OPFS) before it starts the download (#23880). It falls back to an in-memory Blob only when navigator.storage.getDirectory() is missing or fails. Safari 15.2 to 18 has getDirectory(), but FileSystemFileHandle.createWritable only arrived in Safari 26 ("Added support for the File System WritableStream API"). So the staging fails, and no file is saved.
This is the iOS 16 failure noted in #24130. iOS 17 and 18 are affected the same way.
Expected behavior 🎯
Saving works on Safari 15.2 to 18, with the download built in memory as it is in browsers without an origin-private file system.
How to reproduce it (as minimally and precisely as possible) 🔬
In a WebAssembly app with the default WasmPickerConfiguration.FileSystemAccessApiWithFallback, served over HTTPS or from localhost, run in Safari 15.2 to 18:
varpicker=newFileSavePicker{SuggestedFileName="Report"};picker.FileTypeChoices.Add("Text",newList<string>{".txt"});varfile=awaitpicker.PickSaveFileAsync();CachedFileManager.DeferUpdates(file);awaitFileIO.WriteTextAsync(file,"Hello, world!");awaitCachedFileManager.CompleteUpdatesAsync(file);// throws the TypeError
The same happens in Safari 26 or Chrome after delete FileSystemFileHandle.prototype.createWritable, which is how I reproduced it in the iOS 26.0 and 27.0 simulators and in Chrome.
Workaround 🛠️
No response
Renderer 🎨
Skia
Native
Affected platforms 📱💻🖥️
WebAssembly
Uno.Sdk version (and other relevant versions) 📦
Reproduced in the SamplesApp built from master (ab14387) and from 6.8.0-dev.222 (Uno.Sdk 6.8.0-dev.66). The staging has been there since #23880, so Uno.Sdk 6.7.0-dev.165 from #24130 has it too.
Activity