{"action":"closed","issue":{"url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/635","labels_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/635/labels{/name}","comments_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/635/comments","events_url":"https://api.github.com/repos/simplabs/ember-simple-auth/issues/635/events","html_url":"https://github.com/simplabs/ember-simple-auth/issues/635","id":102783690,"number":635,"title":"Cannot read property 'on' of undefined","user":{"login":"ksnyde","id":980757,"avatar_url":"https://avatars.githubusercontent.com/u/980757?v=3","gravatar_id":"","url":"https://api.github.com/users/ksnyde","html_url":"https://github.com/ksnyde","followers_url":"https://api.github.com/users/ksnyde/followers","following_url":"https://api.github.com/users/ksnyde/following{/other_user}","gists_url":"https://api.github.com/users/ksnyde/gists{/gist_id}","starred_url":"https://api.github.com/users/ksnyde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksnyde/subscriptions","organizations_url":"https://api.github.com/users/ksnyde/orgs","repos_url":"https://api.github.com/users/ksnyde/repos","events_url":"https://api.github.com/users/ksnyde/events{/privacy}","received_events_url":"https://api.github.com/users/ksnyde/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-08-24T12:42:13Z","updated_at":"2015-09-08T17:54:40Z","closed_at":"2015-09-08T17:54:40Z","body":"I have installed the **jjabrams** ESA and wanted to get that in place before actually wiring it up to my OAuth based backend. With the use of the demo-app it wasn't too hard but I am getting two extraneous errors in my unit tests that appear to map back to ESA, they're both similar code blocks:\r\n\r\n> #application-route-mixin.js\r\n\r\n    _mapSessionEventsToActions: Ember.on('init', function() {\r\n        Ember.A([\r\n          ['authenticationSucceeded', 'sessionAuthenticated'],\r\n          ['invalidationSucceeded', 'sessionInvalidated']\r\n        ]).forEach(([event, method]) => {\r\n          this.get('session').on(event, Ember.run.bind(this, () => {\r\n            this[method](...arguments);\r\n          }));\r\n        });\r\n      }),\r\n\r\n> #addon/services/session.js\r\n\r\n    _forwardSessionEvents: on('init', function() {\r\n      Ember.A([\r\n        'authenticationSucceeded',\r\n        'invalidationSucceeded'\r\n      ]).forEach((event) => {\r\n        this.get('session').on(event, () => {\r\n          this.trigger(event, ...arguments);\r\n        });\r\n      });\r\n    }),\r\n\r\nIn both cases, the `this.get('session')` seems to resolve to an undefined object. In a project with 200 or so unit tests I only get one failure for each. The first one comes from the `route/application.js` where I've mixed in the `ApplicationRouteMixin` just like your demo-app. The other one is a bit more bizarre considering the error comes from a \"it renders\" test of a Component which *does not* inject the **session** service."}}