Skip to content
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

Using Custom Elements is broken since Glimmer v0.22.0 #453

Closed
dunnkers opened this issue Apr 3, 2017 · 14 comments
Closed

Using Custom Elements is broken since Glimmer v0.22.0 #453

dunnkers opened this issue Apr 3, 2017 · 14 comments

Comments

@dunnkers
Copy link

dunnkers commented Apr 3, 2017

Problem

Since Glimmer v0.22.0 using custom elements created with Polymer nested inside each other does not work.

My addon ember-polymer did not pass tests since ember 2.13.0-beta.1. All the tests basically do is try to render a custom element and check whether it was successful. I noticed the cause was the upgrade to Glimmer v0.22.0, since the errors are thrown by glimmer code. The error occurs only when custom elements are nested inside each other.

Reproduction

Ember Twiddle does not work with beta versions of ember. Therefore I created a repository called glimmer-bug-example to show the error.

Using ember v2.12.0 (glimmer < v0.22.0)
screen shot 2017-04-03 at 16 52 24
(master branch)

Using ember v2.13.0-beta.1 (glimmer ^ v0.22.0)
screen shot 2017-04-03 at 16 54 13
full error log
(ember-beta branch)

This error does though, only occur when nesting custom elements. Just using custom elements is just fine:

screen shot 2017-04-03 at 16 59 59

Solving this problem

It would be great if someone takes a look at this! I think there might be some conflicting mechanisms in Glimmer's DOM processing and in the custom elements spec.

@rwjblue
Copy link
Member

rwjblue commented Apr 3, 2017

Thank you for the detailed bug report and digging that you have done to track this down!

@rwjblue
Copy link
Member

rwjblue commented Apr 3, 2017

Looks like we do not register a statement for Component wireformat opcode (which is number 9 in this enum).

I'm not quite sure of the right implementation for it, but that seems to be the issue.

@chadhietala - Do you have an idea on what the implementation should be?

@JackCA
Copy link

JackCA commented Apr 27, 2017

just hit this issue as well -- let me know if I can provide any additional context that would be helpful

@rwjblue
Copy link
Member

rwjblue commented Apr 27, 2017

@JackCA - You hit this in Ember 2.13?

@JackCA
Copy link

JackCA commented Apr 27, 2017

@rwjblue yessir

@JackCA
Copy link

JackCA commented Apr 28, 2017

@rwjblue let me know if I can provide any specific information that will help. I'm using a combination of tagless and custom-tag components

@backspace
Copy link

This has also broken ember-paper for me on Ember 2.13, specifically the paper-chips component. After updating, the main content area of my application wasn’t rendering, with this error in the console:

ember.debug.js:19829 Error: expected an implementation for 6

Stacktrace
    at Object.debugAssert [as assert] (ember.debug.js:1498)
    at Compilers.compile (ember.debug.js:1201)
    at compileStatement (ember.debug.js:1200)
    at ember.debug.js:1200
    at Array.forEach ()
    at WrappedBuilder.compile (ember.debug.js:1200)
    at ComponentLayoutBuilder.compile (ember.debug.js:1173)
    at Object.compileLayout (ember.debug.js:1173)
    at Cache._emberMetal.Cache.owner [as func] (ember.debug.js:11330)
    at Cache.get (ember.debug.js:18578)

Thanks to @rwjblue’s suggestion on the Ember Community Slack, I changed the relevant template from having md-chips-wrap and md-chip elements to have divs instead and the error disappeared.

If there’s any additional information that would be helpful for me to share here, let me know!

@kellyselden
Copy link

I'm also getting this with an A-Frame project in 2.12 => 2.13:

<a-scene>
  <a-assets>
    <a-asset-item id="headObj" src="{{rootURL}}tex.obj"></a-asset-item>
    <a-asset-item id="headMtl" src="{{rootURL}}tex.mtl"></a-asset-item>
  </a-assets>

  {{! more stuff }}

</a-scene>

The error is:

ember.debug.js:19829 Error: expected an implementation for 9
    at Object.debugAssert [as assert] (http://localhost:4200/assets/vendor.js:12742:19)
    at Compilers.compile (http://localhost:4200/assets/vendor.js:12445:465)
    at compileStatement (http://localhost:4200/assets/vendor.js:12444:8728)

@krisselden
Copy link
Contributor

Someone mind opening an issue on ember regarding the regression in 2.13? Also, we are working on this, it's just a bit involved.

@rwjblue
Copy link
Member

rwjblue commented May 17, 2017

Fixed by #488.

@rwjblue rwjblue closed this as completed May 17, 2017
@dunnkers
Copy link
Author

Great work @rwjblue and @krisselden !

@bjornharrtell
Copy link

bjornharrtell commented May 19, 2017

While this fixes Error: expected an implementation for 9 you can still get Error: expected an implementation for 6. Is this expected error and something that needs be fixed at application level?

Noted in the attempted upgrade for ember-paper here adopted-ember-addons/ember-paper#709.

@backspace described the problem above involving paper-clips.

For what it's worth, I can also get Error: expected an implementation for 16 with some experimentation. If this is also unexpected I can try to isolate it and report separately.

@rwjblue
Copy link
Member

rwjblue commented May 19, 2017

@bjornharrtell - please open issues for each of those, we'll need template snippets that cause them to be able to fix...

@bjornharrtell
Copy link

@rwjblue great to hear that. I've opened emberjs/ember.js#15258 with two separate jsbin template snippets that demonstrate additional issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants