filestack / filestack-js

Official Javascript SDK for the Filestack API and content ingestion system.
https://www.filestack.com
MIT License
206 stars 76 forks source link

Edge: Out of stack space error when opening local filesystem #326

Open sterlingrobot opened 4 years ago

sterlingrobot commented 4 years ago

Environment: Windows 10 Edge 18 Angular 8

Filestack v3.11.2

When using filestack-js within an Angular 8 app that loads @webcomponents/webcomponentsjs polyfills in Edge, the Filestack picker gets stuck in an endless loop, continually calling openSelectFile() from https://static.filestackapi.com/picker/1.11.1/index.js. There is no way to open, cancel or exit the local file picker without closing the browser.

image

image

The issue does not happen in Chrome, Safari, FF or IE 11.

I have a minimal reproduction here: https://github.com/sterlingrobot/filestack-ng-webc

Any help resolving this would be greatly appreciated - thank you!

sterlingrobot commented 4 years ago

FWIW, the workaround I found that seemed to fix the issue was to attach a __shady_addEventListener('click') to the fsp-fileUpload input once the widget initializes, and stopPropagation on that event. https://github.com/sterlingrobot/filestack-ng-webc/commit/31e2a6181ed46a8c1024f06c536a2f413aba4813

pcholuj commented 4 years ago

HI, @sterlingrobot
thanks for reporting we will look into it.

pcholuj commented 3 years ago

hey we made some fixes for that, can you confirm that its fixed?

sterlingrobot commented 3 years ago

@pcholuj sorry for taking so long to get back around to it, but I did update and test with:

Unfortunately, not fixed - it's still getting stuck in the same loop in MS Edge <=18 (pre-Chromium).

It's also worth noting that Angular 8 requires Typescript <3.6 and so it does complain about filestack-js >= 3.12 during compile:

ERROR in node_modules/filestack-js/build/main/lib/api/upload/file.d.ts:56:9 - error TS1086: An accessor cannot be declared in an ambient context.

It can be worked around by setting "skipLibCheck": true in tsconfig.json.

Anyway, hopefully MS Edge / EdgeHTML will become a thing of the past now that they've officially adopted Chromium. I'm okay if you want to close this as won't fix.