jimmywarting / FormData

HTML5 `FormData` polyfill for Browsers and nodejs
MIT License
360 stars 102 forks source link

IE11 upload failing in version 4.0.1 #118

Closed johnhunter closed 3 years ago

johnhunter commented 3 years ago

Upgrading to 4.0.1 has caused file uploads to fail in IE11. Sorry I don't have an isolated test case but on upload we see an error

Could not complete the operation due to error 800a138f.

in the File polyfill function: https://github.com/jimmywarting/FormData/blob/717239f2c821a2e0620ad3b944f2e6ac8072b0cc/FormData.js#L42-L70

Reverting to 4.0.0 resolves the issue.

jimmywarting commented 3 years ago

800a138f? cryptic...

will look into the differences between 4.0.0 and 4.0.1

jimmywarting commented 3 years ago

Didn't touch the polyfill that much, the only differences was that i removed normalizeValues and instead did it in normalizeArguments so files would be the same instances

All the error 80020101 means is that there was an error, of some sort, while evaluating JavaScript https://stackoverflow.com/questions/10903989/could-not-complete-the-operation-due-to-error-80020101-ie

don't exactly have IE on mac either. IE is pretty much dead now, But i have a old window laptop

also found this: https://stackoverflow.com/questions/49830670/error-could-not-complete-the-operation-due-to-error-800a138f but don't think it's relevant

johnhunter commented 3 years ago

Thanks @jimmywarting - yea IE errors are notoriously unhelpful. I can't give much info as the issue is within minimised JS (IE11 doesn't not run well in our dev builds). The downgrade works so I'm not expecting a fix soon. If there are more reports I'll try and create an isolated test case but can't put the time into it at the moment.

jimmywarting commented 3 years ago

found the bug... In the end, i was passing a undefined value as property bag, that resulted in that error

new Blob([], undefined)