-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Polymer build --bundle --js-compile not working in ie11 #2510
Comments
@beonglee81 do you only get this error when bundling? |
@justinfagnani yes only when bundling option is true. works fine if not. |
I also noticed that the error doesn't show up if I use |
@beonglee81 Assuming you're using web-components-loader, can you try webcomponents-lite and see if it fixes the problem? Our guess is that the template polyfill hasn't run by the time that the component scripts run, and so template elements aren't set up correctly. |
I tried both the web-components-loader and webcomponents-lite without any luck. Error still exists.. |
@usergenic @justinfagnani Any updates or ETA? we're also planning to use Polymer 2.0 on a new project but won't be able to if ie11 is not supported.. |
We are halfway through our Polymer 2 migration for a large application and running into what I think is this issue. We see it even when we run the polymer shop and the polymer starter kit. We get an error 1/5 times we load the application, so it seems to be an async issue. The error is random in the form of 'Unable to get property XXX of undefined or null reference'. From our debugging, it always happens on this line: We are in a deadlock now, we need to decide what to do. It would be great to get some official guidance on this. |
@LarsDenBakker, that line doesn't actually have any property accesses so I'm a bit confused as to why that particular error would result from it. Do you happen to have a reduced test case that can reproduce this issue? Also, could you make sure you're breaking on all (including uncaught) errors? I think you might be seeing this error at this line because it's being thrown from somewhere further down the stack, in or below the element's constructor. |
Sorry I didn't explain that well enough. It does indeed happen inside the constructor, and then the error gets caught there. I've not been able to debug it further than that, IE11 is not very great at debugging. Will dig further. The reduced test case for me is both the shop app and the polymer starter kit. I've played around with removing imports, and it somewhat seems to be related to the number of imports but I can't say for sure. |
I am experiencing the same issue, very interested to get this resolved. |
Does anyone here have a minimal reproduction they can provide? Something with as few files and imports as possible? |
Adding @azakus as an assignee, as this looks like an interaction between bundling, the template polyfill and possibly how core boots up elements. The problem is likely that the template polyfill hasn't upgraded main page templates by the time elements try to access their template's content. A few solutions could be:
|
Should be fixed in webcomponentsjs v1.0.16 |
There was a very easy spot to make sure that HTMLTemplateElement polyfill runs before custom elements boot up in the webcomponentsjs bundle. |
@beonglee81 you said you're still seeing this issue. @azakus make a minimal reproduction that fails before webcomponentsjs v1.0.16 and passes with it: https://gist.github.com/azakus/b01dc558b53fef5b45c8c4aff0f37aa1 Since this works, your setup must have some different interaction causing the failure. Can you make a similar reproduction that still fails with webcomponentsjs v1.0.16? |
webcomponentsjs v1.0.17 |
@azakus @justinfagnani We no longer get the initial JavaScript error, but I'm not seeing it work with more than the bare bones example. Here, I've added a dom-if, and I'm seeing extra slashes added in the HTML. Also see the HTML output in the browser - both
|
@mleonardallen I've tried bundling a reconstruction of your code snippet, but I can't recreate what you are seeing: https://glitch.com/edit/#!/eight-drop?path=index.html:18:13 |
@azakus are you using polymer serve? We only see this issue when using
|
Yes, I tried using I would have put that on Glitch, but the pipeline is too big for Glitch's rather tiny allowed disk space. |
Description
Using Polymer 2.0 and building with

polymer --bundle --js-compile
is not working in ie11... currently getting the following errorDug around and saw that template.cloneNode(true) wasn't cloning the
content
property, possibly because it was DocumentFragment. Tried doing putting a workaround described in webcomponents/webcomponentsjs#362 but that also yields different errors..Versions & Environment
The text was updated successfully, but these errors were encountered: