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

Error 'Headers undefined' in bundle on IE11

Open JensMadsen opened this issue 3 years ago • 1 comments

I get the error:

ReferenceError: 'Headers' is undefined

When importing (import Rollbar from 'rollbar') in production mode in IE11. I inspected the minimized bundles and it seems that the polyfills for fetch.Headers are not included in the bundles (e.g. /dist/rollbar.min.js, v2.24.1). I suspect that this is why it works in e.g. Chrome but not in IE11 which does not have the fetch API?

JensMadsen avatar Mar 25 '22 08:03 JensMadsen

Rollbar.js doesn't provide a polyfill, as the code path is only executed when the application code uses fetch either natively or via its own polyfill. That said, I'm sure there's more than one fetch polyfill that doesn't implement Headers. Thank you for the report, and I'll have a PR ready shortly.

waltjones avatar Apr 07 '22 20:04 waltjones

@waltjones any news on this?

JensMadsen avatar Sep 13 '22 07:09 JensMadsen

@JensMadsen Just now released in v2.25.2. https://github.com/rollbar/rollbar.js/releases/tag/v2.25.2

waltjones avatar Sep 14 '22 18:09 waltjones