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

Hanging builds with ember-source 3.1 beta #18

Closed
RobbieTheWagner opened this issue Feb 18, 2018 · 18 comments
Closed

Hanging builds with ember-source 3.1 beta #18

RobbieTheWagner opened this issue Feb 18, 2018 · 18 comments

Comments

@RobbieTheWagner
Copy link
Contributor

RobbieTheWagner commented Feb 18, 2018

My app's build just stops on one prember route and hangs forever if I used ember-source 3.1 beta. How can I debug this? Are there known issues with ember 3.1?

This works fine with PREMBER=true ember s and I can go to the route no problem, but with ember build -e production the build hangs on the route.

@mansona
Copy link
Collaborator

mansona commented Feb 18, 2018

on the question of "how can i debug this" I have been using the same technique for debugging fastboot issues as described in the ember-cli-fastboot readme

node --debug-brk --inspect ./node_modules/.bin/ember serve

then you can step through the code bit by bit if you wanted to try and track it down 😂

@RobbieTheWagner
Copy link
Contributor Author

ember serve works fine, only ember build -e production hangs.

@mansona
Copy link
Collaborator

mansona commented Feb 18, 2018

sorry my bad, I was quoting the ember-cli-fastboot readme verbatim, change the command as you see fit:

node --debug-brk --inspect ./node_modules/.bin/ember build -e production

@ef4
Copy link
Owner

ef4 commented Feb 18, 2018 via email

@mansona
Copy link
Collaborator

mansona commented Feb 18, 2018

(editing comment) @ef4 it looks like @rwwagner90 is in fact enabling prember in development mode while he's testing. It seems to be an actual behaviour difference 🤔

@RobbieTheWagner
Copy link
Contributor Author

@ef4 I mentioned in my original post here that "This works fine with PREMBER=true ember s"

@RobbieTheWagner
Copy link
Contributor Author

I commented out the route that was hanging and the build worked. I must be doing something that prember does not like in that route.

@ef4
Copy link
Owner

ef4 commented Feb 18, 2018

Does regular fastboot hang there too?

@RobbieTheWagner
Copy link
Contributor Author

It doesn't seem to have any problems loading the page in fastboot. There are things on the page that do not work in fastboot, but initial load is just fine.

@RobbieTheWagner
Copy link
Contributor Author

It's my ember-3d-folding-panel usage that is breaking things, but I have no idea why. If I remove it, it works. https://github.com/shipshapecode/shipshape.io/blob/master/app/templates/ember-consulting.hbs#L33-L42

@mansona
Copy link
Collaborator

mansona commented Feb 18, 2018

@rwwagner90 might it be somehow related to this: ember-fastboot/fastboot#183

I was having some really strange issues with fastboot that seemed to only show themselves when I added just one more nested each. Can you try removing that each but leaving the folding-panel?

@RobbieTheWagner
Copy link
Contributor Author

@mansona I don't think so. I don't get any errors. Everything runs great in fastboot and locally with PREMBER=true ember s or just ember s. When I do ember build -e production is when it hangs.

@RobbieTheWagner
Copy link
Contributor Author

So I've been looking at the wrong thing the whole time. It's actually a different route that is hanging. I believe it is hanging on this:

 model() {
    if (ENV.environment === 'development') {
      return repos;
    }

    return this.store.findAll('github-repo');
  },

So this explains why it all works in development, I am using dummy data, but when it tries to do the store call I guess something hangs there?

@RobbieTheWagner
Copy link
Contributor Author

RobbieTheWagner commented Feb 18, 2018

Should the model hook be called by prember here? I have absolutely no clue why the store call is causing things to hang, rather than throwing an error, but it seems that any model hooks that use the store are broken.

@ef4
Copy link
Owner

ef4 commented Feb 19, 2018

Yes, fastboot runs model hooks. And ember-data knows how to polyfill the browser's xhr with the node equivalents when running fastboot.

Make sure your app is working in just fastboot. Since you already must have ember-cli-fastboot as a dependency, all you need to do is ember s, and then turn off javascript in your browser, so you're not confused by the app booting normally. If fastboot is working you will still see all your content. If it's not, then the problem isn't prember, it's getting your app fastboot-compatible.

@RobbieTheWagner
Copy link
Contributor Author

@ef4 it is broken with just fastboot as well. I'm not sure why a normal this.store.findAll would be hanging in fastboot. I suppose I will open an issue on fastboot.

@RobbieTheWagner
Copy link
Contributor Author

Since this is a fastboot and/or ember-fetch issue. I will close this one. Thanks for bearing with me! If anyone else wants to follow along, here is the new issue ember-fastboot/ember-cli-fastboot#575

@RobbieTheWagner
Copy link
Contributor Author

Just for further info, and to help anyone who ends up here, this is an issue with ember-fetch ember-cli/ember-fetch#106

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

3 participants