GoogleChromeLabs / browser-fs-access

File System Access API with legacy fallback in the browser
https://googlechromelabs.github.io/browser-fs-access/demo/
Apache License 2.0
1.37k stars 82 forks source link

Chromium on Linux fails to save files #118

Closed tmcw closed 2 years ago

tmcw commented 2 years ago

So, I'm not an expert on the differences between Chrome and Chromium and any possible native fs difference between Mac, Linux, etc. but I've gotten reports from the field and can replicate locally in a Ubuntu VM that attempting to use browser-fs-access in Chromium on Ubuntu consistently produces AbortError failures:

CleanShot 2022-06-28 at 10 28 05@2x

This can be replicated on the demo as well as in my application. As far as I can tell, Chromium on Linux advertises support for the native filesystem API and breaks if you try to use it.

tomayac commented 2 years ago

Interesting, I can reproduce this, too. I need to investigate what might be causing this.

tmcw commented 2 years ago

Did some digging, seems like it tracks back to these issues: https://bugs.chromium.org/p/chromium/issues/detail?id=1264708#c10

And it looks like the solution is that Chromium/Linux requires the description parameter. Tested that and it seems to fix behavior. I think on the browser-fs-access side (assuming that Chromium doesn't fix its behavior), a solution would be either to make the description member of the options argument required, or to have a non-empty default value for Description.

tomayac commented 2 years ago

Oh, nice. This would be an easy fix. In meeting all of the rest of today, but will definitely look tomorrow.

tomayac commented 2 years ago

Confirmed working!

Screen Shot 2022-06-29 at 13 23 50