Closed RobbieTheWagner closed 6 years ago
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 😂
ember serve
works fine, only ember build -e production
hangs.
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
Prember is off by default in development mode, but you can turn it on to debug there.
On Sun, Feb 18, 2018 at 9:00 AM Robert Wagner notifications@github.com wrote:
ember serve works fine, only ember build -e production hangs.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ef4/prember/issues/18#issuecomment-366518149, or mute the thread https://github.com/notifications/unsubscribe-auth/AATfMuxhjK0DlIDH7sgBdPu3zOeo3Eeoks5tWC0DgaJpZM4SJhwQ .
(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 🤔
@ef4 I mentioned in my original post here that "This works fine with PREMBER=true ember s
"
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.
Does regular fastboot hang there too?
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.
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
@rwwagner90 might it be somehow related to this: https://github.com/ember-fastboot/fastboot/issues/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?
@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.
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?
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.
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.
@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.
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 https://github.com/ember-fastboot/ember-cli-fastboot/issues/575
Just for further info, and to help anyone who ends up here, this is an issue with ember-fetch https://github.com/ember-cli/ember-fetch/issues/106
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 withember build -e production
the build hangs on the route.