Ok, I am going to work on a reduction, but here is what I am running into:
Environments:
-
ember s
: no issue -
npm start
: no issue - App Engine: “Error: Assertion Failed: Attempting to inject an unknown injection: ‘service:session’”
I am following the instructions I wrote to get FastBoot running on App Engine and combining them with the Emberfire authentication instructions.
app/controllers/application.js
import Ember from 'ember';
export default Ember.Controller.extend({
session: Ember.inject.service(),
beforeModel() {
return this.get('session')
.fetch()
.catch(() => {});
},
actions: {
login: function () {
this.get('session')
.open('firebase', {
provider: 'google'
})
.then(function ( data ) {
console.log(data.currentUser);
});
},
logout: function () {
this.get('session')
.close();
}
}
});
app/torii-adapters/firebase.js
import ToriiFirebaseAdapter from 'emberfire/torii-adapters/firebase';
export default ToriiFirebaseAdapter.extend({});
config/enviornment.js
...
firebase: { ... },
torii: {
sessionServiceName: 'session'
},
...
Best I can tell this is some sort of race condition, as I had a similar issue when running npm start
prior to updating envornment.js
(forgot to save…) but ember serve
still worked.
Thoughts? It seems like some declarative statement is missing that is needed in the App Engine/Fastboot environment.