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

FastBoot broken with latest ember and glimmer 2 #284

Closed
seawatts opened this issue Mar 24, 2017 · 8 comments
Closed

FastBoot broken with latest ember and glimmer 2 #284

seawatts opened this issue Mar 24, 2017 · 8 comments
Labels

Comments

@seawatts
Copy link

yapplabs/ember-wormhole#69

Looks like if we update wormhole it should fix the problem.
#160

@simonihmig
Copy link
Contributor

What kind if error do you see? We have this repo running on ember 2.12, and have FastBoot tests, and they show no error.

The problem with the newer ember-wormhole is that it actually does not work at all with Ember 2.6/2.7, see yapplabs/ember-wormhole#77

@seawatts
Copy link
Author

I see this error:

TypeError: Cannot read property 'document' of undefined

This is the only addon that is using ember-wormhole in my app, so I don't know what else it could be.

@paulcwatts
Copy link

You can actually see this happening in the Fastboot tests on Travis right now: https://travis-ci.org/kaliber5/ember-bootstrap/jobs/215944001

It's probably not failing the test run because the wormhole tests have been disabled (due to the ongoing issues with fastboot and wormhole.)

I can confirm that wormhole 0.5.1 can fix the issue, the 2.6/2.7 compatibility notwithstanding.

@simonihmig simonihmig added the bug label Mar 31, 2017
@simonihmig
Copy link
Contributor

I am actually not sure how to proceed with that issue. With the current state of ember-wormhole, it seems we have to accept at least some issues. And the current one seems to me to be the smaller one.

ember-wormhole not working correctly can affect Bootstrap's modals and dropdowns. Both of them will be not visible in most cases I assume (like the dropdown menu being hidden), and even if they are, the FastBoot issue will only affect the initial paint, once the Ember app is up and running they will popup. So this seems to be more acceptable to me than totally failing in Ember 2.6/2.7.

My current understanding is that somehow the mentioned exception is catched, so you still get a 200 response from FastBoot, with everything rendered but the contents of the wormhole. At least that's what I'm seeing in the FastBoot tests and in one of our real-world apps. So this is something we probably have to live with until that wormhole issue is hopefully sorted out. Other thoughts?

@paulcwatts
Copy link

paulcwatts commented Mar 31, 2017

I'm seeing a different outcome: the initial error above continues with a cascading series of failures, including:

There was an error running your app in fastboot. More info about the error: 
 Error: Assertion Failed: You modified "disabled" twice on <tycho@component:bs-nav/item::ember4562> in a single render. It was rendered in "component:bs-nav/item" and modified in "component:ember-wormhole". This was unreliable and slow in Ember 1.x and is no longer supported. See https://github.com/emberjs/ember.js/issues/13948 for more details.
    at assert (/.../dist/fastboot/vendor.js:21604:13)

Followed by:

/.../dist/fastboot/vendor.js:27862
          throw new Error('infinite rendering invalidation detected');
          ^
Error: infinite rendering invalidation detected

Followed by the Fastboot server crashing.

Admittedly the modal I have is pretty complicated -- too complicated, that's a performance bug that I have to fix. But sadly my mileage varies from the unit tests and your apps. If I have time I will try to boil down my scenario into a more specific repro.

@simonihmig
Copy link
Contributor

Hmm... 🤔

You should be able to add ember-wormhole@0.5.1 as a direct dependency to you app. As there will be just one version of any addon used for your app, this should force ember-bootstrap to also use the newer wormhole version, hopefully fixing your issue for the time being...

@paulcwatts
Copy link

Thanks! That sounds better than maintaining a fork.

@simonihmig
Copy link
Contributor

Created a PR in ember-wormhole that fixes this issue, will cut a new release of ember-bootstrap soon!

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

No branches or pull requests

3 participants