{"action":"created","issue":{"url":"https://api.github.com/repos/ember-fastboot/fastboot/issues/76","repository_url":"https://api.github.com/repos/ember-fastboot/fastboot","labels_url":"https://api.github.com/repos/ember-fastboot/fastboot/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/ember-fastboot/fastboot/issues/76/comments","events_url":"https://api.github.com/repos/ember-fastboot/fastboot/issues/76/events","html_url":"https://github.com/ember-fastboot/fastboot/issues/76","id":169716293,"number":76,"title":"ApplicationInstance Boot Errors are being swallowed","user":{"login":"arjansingh","id":1598641,"avatar_url":"https://avatars.githubusercontent.com/u/1598641?v=3","gravatar_id":"","url":"https://api.github.com/users/arjansingh","html_url":"https://github.com/arjansingh","followers_url":"https://api.github.com/users/arjansingh/followers","following_url":"https://api.github.com/users/arjansingh/following{/other_user}","gists_url":"https://api.github.com/users/arjansingh/gists{/gist_id}","starred_url":"https://api.github.com/users/arjansingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arjansingh/subscriptions","organizations_url":"https://api.github.com/users/arjansingh/orgs","repos_url":"https://api.github.com/users/arjansingh/repos","events_url":"https://api.github.com/users/arjansingh/events{/privacy}","received_events_url":"https://api.github.com/users/arjansingh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-05T23:52:22Z","updated_at":"2016-08-18T20:33:18Z","closed_at":null,"body":"I ran into a particularly vicious error, where a stray `window` reference caused the `ApplicationInstance` to fail booting:\r\n\r\n```\r\n  _bootPromise:\r\n   Promise {\r\n     _id: 14,\r\n     _label: undefined,\r\n     _state: 2,\r\n     _result: [TypeError: window.addEventListener is not a function],\r\n     _subscribers: [],\r\n     _onError: null } }\r\n```\r\n\r\nThe failure was silent and I only detected it when I logged `this.instance` inside of [`src/result.js`](https://github.com/ember-fastboot/fastboot/blob/master/src/result.js#L56-L67).\r\n\r\nWe should be logging these events (not swallowing them silently). \r\n\r\nOf course, I'll open a PR but I want to know if `result._finalize` is the place to do the error handling. Suggestions welcome.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ember-fastboot/fastboot/issues/comments/240847799","html_url":"https://github.com/ember-fastboot/fastboot/issues/76#issuecomment-240847799","issue_url":"https://api.github.com/repos/ember-fastboot/fastboot/issues/76","id":240847799,"user":{"login":"arjansingh","id":1598641,"avatar_url":"https://avatars.githubusercontent.com/u/1598641?v=3","gravatar_id":"","url":"https://api.github.com/users/arjansingh","html_url":"https://github.com/arjansingh","followers_url":"https://api.github.com/users/arjansingh/followers","following_url":"https://api.github.com/users/arjansingh/following{/other_user}","gists_url":"https://api.github.com/users/arjansingh/gists{/gist_id}","starred_url":"https://api.github.com/users/arjansingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arjansingh/subscriptions","organizations_url":"https://api.github.com/users/arjansingh/orgs","repos_url":"https://api.github.com/users/arjansingh/repos","events_url":"https://api.github.com/users/arjansingh/events{/privacy}","received_events_url":"https://api.github.com/users/arjansingh/received_events","type":"User","site_admin":false},"created_at":"2016-08-18T20:33:18Z","updated_at":"2016-08-18T20:33:18Z","body":"We still want logging for these errors `fastboot-app-server` because they can still happen in production. Someone could download some bad Ember application code (e.g, a stray `window` reference) on their server and break FastBoot rendering.  \r\n\r\nAfter thinking it over, I think the ideal solution is to have the [`success` function](https://github.com/ember-fastboot/fastboot-express-middleware/blob/master/src/index.js#L35-L52) in `fastboot-express-middleware` check for `result.error` and then log the error if there is one. Because the response is resilient, you never get to the `catch` block."}}
{"actor":{"display_login":"arjansingh"}}