FileSaver.js icon indicating copy to clipboard operation
FileSaver.js copied to clipboard

saveAs fails on chrome with no error

Open theahura opened this issue 2 years ago • 3 comments

Thanks for this library.

I'm getting silent failures where, when I try to download using saveAs, it fails without any error or log -- a download simply never appears.

I'm using Chrome: Version 107.0.5304.87 (Official Build) (64-bit), on Ubuntu 20.02.

Any idea whats going on?

Example code:

import {saveAs} from 'file-saver'

const blob = new Blob(['helloworld'], {
  type: "application/json",
});

saveAs(blob, 'test')

theahura avatar Nov 10 '22 18:11 theahura

Update: it looks like it fails silently if it is running in a WebWorker, which is where our code was running. Is there a way to add a warning if saveAs is used in a worker?

theahura avatar Nov 10 '22 23:11 theahura

I faced the same problem,but not in a WebWorker when using Chrome 108.

Wooyme avatar Dec 11 '22 13:12 Wooyme

Hi is this issue resolved? I am also facing silent failure to save

i am also using in worker. will this not work in worker? @theahura theahura

sandeepk97 avatar Jun 29 '24 21:06 sandeepk97