ember-tooltips: ember-wormhole error

Hi hi.

I am getting this error randomly in production from ember-wormhole which is a dependency of ember-tooltip.

The head node of a wormhole must be attached to the DOM

https://github.com/yapplabs/ember-wormhole/blob/master/addon/components/ember-wormhole.js#L63

Wondering if you had suggestions on the best way to solve this on my side?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 5
  • Comments: 22 (4 by maintainers)

Commits related to this issue

Most upvoted comments

@maxfierke I have the same problem and it was NOT fun to pin point.

  • ember@3.0
  • ember-cli-htmlbars@2.0.3
  • ember-tooltips@3.0.2

Minimal reproduction case I could find:

{{#each itemsList as |item|}}
    <div>
      label
      {{#ember-tooltip}}
        tooltip
      {{/ember-tooltip}}
    </div>
{{/each}}

If itemsList has:

  • less than 11 elements -> works
  • 11 elements -> Uncaught Error: infinite rendering invalidation detected
  • 12 elements -> Assertion Failed: Cannot deregister unknown unregistered renderer
  • more than 12 elements -> The head node of a wormhole must be attached to the DOM

Obviously, can’t upgrade to 3.0.X because of this 😭

@maxfierke Works for me 🎉

@mnoble01 oh, yeah, that makes sense. I don’t think that outer run is at all necessary. Nor is that promise, it seems like. Could you try #320?

@maxfierke That branch did not work for me.

I dug into this a little more and am getting the following error from createTooltip’s catch block. This is not the OP’s error, but it was mentioned above.

createTooltip() {
  return new RSVP.Promise((resolve, reject) => {
    try {
      run(() => {
        ...
      });
    } catch(error) {
      console.log('ERROR', error);
      reject(error);
    }
  });
}
screen shot 2018-11-19 at 12 34 32 pm

which ultimately throws: screen shot 2018-11-19 at 1 10 14 pm

Removing the outer run fixed the above errors and the tooltips show correctly. Not sure if this is the “fix” we’re all looking for ¯\_(ツ)_/¯.

UPDATE If anyone’s curious I was able to reproduce this error in a Twiddle. In my particular case the problem stems from an interaction between ember-block-slots and ember-tooltips. I wouldn’t be surprised if it is a timing issue.