Polyfill-service: IE11 HierarchyRequestError

Created on 18 Dec 2017  路  11Comments  路  Source: Financial-Times/polyfill-service

Hi,

We received an issue from a client using an older version of IE11 - version 11.0.9600.18837. It works in the version we have on our machines, which is 11.608.15063.0. Here are screenshots from their machine:

image
image

This is the script src of polyfill.io we're using:

https://cdn.polyfill.io/v2/polyfill.min.js?features=default,Array.prototype.includes,Array.prototype.find,Element.prototype.remove

Any help on this would be appreciated.

Thanks.

Most helpful comment

@marc-bouvier Thank you for the detailed bug report! I think I know how to solve the issue because of your excellent reproduction steps :-)

All 11 comments

I think this is another instance of #875. I ran into this on Android 4.4.3 webview. I added the gated flag, which kept the unnecessary Element polyfill from executing. Try

http://cdn.polyfill.io/v2/polyfill.min.js?features=default|gated,Array.prototype.includes,Array.prototype.find,Element.prototype.remove

or

http://cdn.polyfill.io/v2/polyfill.min.js?features=default,Array.prototype.includes,Array.prototype.find,Element.prototype.remove&flags=gated

Thanks, I'll try it out. We're not going to deploy until after the new year. I will comment back if this fix solves the issue.

I can reproduce this issue. Instructions can be found here : https://marc-bouvier.github.io/test-polyfill-io/index.html I rewrote them in the following text.

Problem
In Internet Explorer 11, When a site is in "Local intranet" security zone, and using cdn.polyfill.io, ie/7.0.0 is detected instead of ie/11.0.0

Reproduce

  1. On Windows 7, Internet Explorer 11 (you can find virtual images from microsoft here : https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/)
  2. Open this page on Internet Explorer 11 : https://marc-bouvier.github.io/test-polyfill-io/index.html
  3. Then, open internet explorer "internet options"

  1. Add the domain "https://marc-bouvier.github.io" to "Local intranet" sites.



  1. Open page inspection (F12) and reload the page
    On the javascript console you will have the error : HierarchyRequestError

  1. Open Debugger tab and look at the comment section of "polyfill.js" file
    ie/7.0.0 is detected instead of ie/11.0.0

+1, I get this error as well.

@marc-bouvier Thank you for the detailed bug report! I think I know how to solve the issue because of your excellent reproduction steps :-)

So... any news on this? We are seeing this problem in production on certain machines now, too.

I can confirm this error too on Windows 10 and IE11
image

Hi all, I believe this is fixed in https://polyfill.io/v3/polyfill.js. I will be closing the issue as I can no longer reproduce the bug.

If you can still reproduce the bug using version 3 of the service, please comment on the issue and I will reopen it.

This is still an issue when using the flags=always option. This html file will trigger the error on IE11:

<html>
<head>
  <script src="https://polyfill.io/v3/polyfill.js?flags=always"></script>
</head>
</html>

It is recommended to not use always on all polyfills without also including gated on all polyfills for this very reason.

What is your use-case for https://polyfill.io/v3/polyfill.js?flags=always? Perhaps we can solve your issue without having to resort to always including the polyfills even when a browser does not require them.

What does gated,always even mean? I would expect this to be to a OR type of situation.

The issue that I'm having is that the fetch polyfill (and maybe the others as well) is not being loaded in IE11 and some versions of the Facebook browser. The strange thing is that it's loaded correctly in the VM I have with IE11 and on crossbrowsertesting.com, so I was trying to get the polyfills to always load.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dy picture dy  路  8Comments

JakeChampion picture JakeChampion  路  4Comments

stsvilik picture stsvilik  路  5Comments

stegano picture stegano  路  5Comments

stevesy picture stevesy  路  3Comments