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 failing with Ember 2.9 #266

Closed
bcardarella opened this issue Sep 19, 2016 · 22 comments
Closed

FastBoot failing with Ember 2.9 #266

bcardarella opened this issue Sep 19, 2016 · 22 comments

Comments

@bcardarella
Copy link
Contributor

Not a duplicate of #265

Deploying our staging server with built assets: https://staging.dockyard.com/

A previously working Ember app in Fastboot is now failing. The error is clearly in vendor.js but because I cannot run the fastboot server on my machine due to #265 I cannot diagnose the issue.

@danmcclain
Copy link
Member

danmcclain commented Sep 19, 2016

Not a duplicate of #265

Passive aggressiveness not appreciated

@bcardarella
Copy link
Contributor Author

Passive aggressiveness not appreciated

It has a similarly named issue title and I wanted to draw attention to this.

@bcardarella
Copy link
Contributor Author

Stacktrace I'm seeing:

TypeError: n.get(...).getURL is not a function at [object Object]. (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:11:18665) at o.m.get (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:8:30397) at Object.n [as get] (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:10:6954) at [object Object].a.default.extend.getURL (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:5:2198) at Result._finalizeMetadata (/home/production/dockyard-app-server/node_modules/fastboot/lib/result.js:74:25) at Result._finalize (/home/production/dockyard-app-server/node_modules/fastboot/lib/result.js:64:12) at /home/production/dockyard-app-server/node_modules/fastboot/lib/ember-app.js:225:26 at C (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:21:11181) at k (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:21:11267) at x (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:21:11084) at /home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:13:29447 at s.invokeWithOnError (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:9653) at Object.s.flush (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:10096) at Object.u.flush (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:10866) at Object.d.end (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:11211) at [object Object]._onTimeout (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:8437) at Timer.listOnTimeout (timers.js:92:15)

@danmcclain
Copy link
Member

Are you getting the URL from the router at any point in fastboot?

@danmcclain
Copy link
Member

Also, Ember/glimmer2 works with 2.9 according to: emberjs/ember.js#13949 (Scroll down to addons/tooling). This is likely application issue, or an issue with a specific addon. I would try to run an non-uglified version of the code on staging to debug

@danmcclain
Copy link
Member

I could still be a fastboot issue, but getURL hints that you may be accessing something from the router that isn't available

@danmcclain danmcclain changed the title Fastboot failing with Ember 2.9 FastBoot failing with Ember 2.9 Sep 19, 2016
@bcardarella
Copy link
Contributor Author

I am looking into it, but as I previously mentioned in #265 the application has not changed beyond updating the ember and ember-data deps.

@bcardarella
Copy link
Contributor Author

Updating fastboot-app-server seems to have cleared the issue. However, now the app is not rendering server-side.

@bcardarella
Copy link
Contributor Author

Its strange, I'm not seeing any errors in the app-server logs

@danmcclain
Copy link
Member

Are you still running the same NGINX config since before I left, NGINX is swallowing the errors if so

@bcardarella
Copy link
Contributor Author

No, I rewrote everything. I can see the requests being handled by the app server:

[2016-09-19T00:47:28.068Z][w23698] starting HTTP server
[2016-09-19T00:47:28.077Z][w23698] HTTP server started; url=http://:::3000
2016-09-19T00:47:37.909Z 200 OK /
2016-09-19T00:48:10.436Z 200 OK /
2016-09-19T00:50:20.157Z 200 OK /services
2016-09-19T00:50:58.564Z 200 OK /services
2016-09-19T00:54:40.107Z 200 OK /
2016-09-19T00:56:40.126Z 200 OK /

and it seems to indicate that the app is being served just fine which means that Nginx shouldn't be seeing any errors as the app server is not reporting any errors. However, the version of the app being served is clearly not server-side rendered. Simple things like the title tag is also not rendering but I suspect this is likely a Glimmer 2 issue and not related to Fastboot at all.

@danmcclain
Copy link
Member

Do you have resilient mode turned on in the fastboot-express-middleware

@bcardarella
Copy link
Contributor Author

bcardarella commented Sep 19, 2016

If that is something I have to opt-into then I would say I do not have that turned on. Our app server is here: https://github.com/DockYard/dockyard-app-server

@danmcclain
Copy link
Member

It's on by default in fastboot-app-server, resilient mode

@bcardarella
Copy link
Contributor Author

Ok, after disabling resilient: true on the app server I now see a new error:

2016-09-19T01:14:32.909Z 500 Unknown Error: Error: Assertion Failed: EventDispatcher should never be instantiated in fastboot mode. Please report this as an Ember bug.
    at /home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:5:24700
    at Object.n [as assert] (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:9:92)
    at [object Object].e.default.n.Object.extend.init (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:14:24261)
    at [object Object].r [as init] (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:14:12794)
    at new o (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:13:12704)
    at Function.m.create (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:13:14949)
    at f (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:19412)
    at a (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:17606)
    at Object.i.lookup (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:21391)
    at [object Object].e.default.t.Mixin.create.lookup (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:12:22350)
    at /home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:6:2494
    at [object Object].r.CoreView.extend.u.init (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:6:2614)
    at [object Object].r [as init] (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:14:12794)
    at new o (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:13:12704)
    at Function.m.create (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:13:14949)
    at Object.t [as initialize] (/home/production/dockyard-app-server/current/fastboot/dockyard-488f3b085f4a6914dac19c5358864c0e.js:4:28360)
    at /home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:5:15963
    at e.each (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:30926)
    at e.topsort (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:30421)
    at e.topsort (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:29829)
    at [object Object].r.Namespace.extend._runInitializer (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:5:16142)
    at [object Object].r.Namespace.extend.runInstanceInitializers (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:5:15854)
    at [object Object].a.default.extend._bootSync (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:5:1328)
    at /home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:5:10190
    at D (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:21:11447)
    at new I (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:21:13078)
    at [object Object].r.Object.extend.boot (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:5:10148)
    at /home/production/dockyard-app-server/node_modules/fastboot/src/ember-app.js:219:25
    at C (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:21:11181)
    at k (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:21:11267)
    at x (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:21:11084)
    at /home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:13:29447
    at s.invokeWithOnError (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:9653)
    at Object.s.flush (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:10096)
    at Object.u.flush (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:10866)
    at Object.d.end (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:11211)
    at [object Object]._onTimeout (/home/production/dockyard-app-server/current/fastboot/vendor-e66ac5437cda24ede6b1afcff0ec4633.js:4:8437)
    at Timer.listOnTimeout (timers.js:92:15)

@rwjblue
Copy link
Member

rwjblue commented Sep 19, 2016

Sorry, lots of comments and I may have missed where you mentioned it, but what is the Ember.VERSION being used?

@rwjblue
Copy link
Member

rwjblue commented Sep 19, 2016

Generally, when I see that event dispatcher error its because something isn't properly honoring the app.visit flags that we pass in in fastboot. But there have been a number of bugs around this area since 2.9.0-beta.1, and it could be something that was fixed upstream (depending on Ember version). I would test with latest published beta build to ensure you have the most up to date one.

@bcardarella
Copy link
Contributor Author

bcardarella commented Sep 19, 2016

@rwjblue our app is on Ember 2.9.0-beta.2 with Ember Data 2.9.0-beta.1

@ghost
Copy link

ghost commented Sep 22, 2016

@rwjblue I can confirm it's still happening with 2.9.0-beta.3 and 2.10.0-canary+6ea3ed0c.

@ghost
Copy link

ghost commented Sep 22, 2016

This issue can be closed. emberjs/ember.js#14333 (comment)

@bcardarella
Copy link
Contributor Author

@martndemus thanks!

@RobbieTheWagner
Copy link

I'm seeing this issue still. How do I fix it? On Ember and Ember CLI version 2.10 beta

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

4 participants