Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4836

Problem with Emberfire

$
0
0

@portugaleren wrote:

I made a test app in Ember 3.0 based on a book and I used Emberfire as the database. I have now a new version of the book based on Ember 3.10 and wanted to do it again from scratch. I have now installed Ember 3.12 and instead of storing data internally in the app I wanted to reuse my Emberfire database. I have installed Emberfire@next but for some reason I do not get access to my data.

This is the adapter:


import FirestoreAdapter from 'emberfire/adapters/firestore';

export default FirestoreAdapter.extend({

  // Uncomment the following lines to enable offline persistence and multi-tab support
  //enablePersistence: true,
  //persistenceSettings: { synchronizeTabs: true }
});

Here is a model:


import DS from 'ember-data';
const { Model, attr, hasMany } = DS;

export default Model.extend({
  name: attr('string'),
  description: attr('string'),
  songs: hasMany('song'),

});

Here is the route:


import Route from '@ember/routing/route';

export default Route.extend({
  model() {
    return this.store.findAll('band');
  },

});

And a template:


<ul>
  {{#each model as |band|}}
    <li>{{band.name}} {{band.description}}</li>
  {{/each}}
</ul>

This is what is installed:


DEBUG: -------------------------------
vendor.js:48590 DEBUG: Ember      : 3.12.0
vendor.js:48590 DEBUG: Ember Data : 3.12.0
vendor.js:48590 DEBUG: jQuery     : 3.4.1
vendor.js:48590 DEBUG: EmberFire  : 3.0.0-rc.3
vendor.js:48590 DEBUG: Firebase   : 6.3.5

This is the error I get:


Error while processing route: bands Assertion Failed: You must call `this._super(...arguments);` when overriding `init` on a framework object. Please update <rarwe311@service:firebase-app::ember247> to call `this._super(...arguments);` from `init`. Error: Assertion Failed: You must call `this._super(...arguments);` when overriding `init` on a framework object. Please update <rarwe311@service:firebase-app::ember247> to call `this._super(...arguments);` from `init`.
    at assert (http://localhost:4311/assets/vendor.js:48568:17)
    at FirebaseAppService.__ASSERT_INIT_WAS_CALLED__ember1566481749836931747236082__ (http://localhost:4311/assets/vendor.js:42765:63)
    at sendEvent (http://localhost:4311/assets/vendor.js:25445:14)
    at initialize (http://localhost:4311/assets/vendor.js:41695:26)
    at Function.create (http://localhost:4311/assets/vendor.js:42280:9)
    at FactoryManager.create (http://localhost:4311/assets/vendor.js:11800:33)
    at instantiateFactory (http://localhost:4311/assets/vendor.js:11610:63)
    at lookup (http://localhost:4311/assets/vendor.js:11538:12)
    at Container.lookup (http://localhost:4311/assets/vendor.js:11382:14)
    at Class.lookup (http://localhost:4311/assets/vendor.js:39970:33)

Uncaught Error: Assertion Failed: You must call `this._super(...arguments);` when overriding `init` on a framework object. Please update <rarwe311@service:firebase-app::ember247> to call `this._super(...arguments);` from `init`.
    at assert (vendor.js:48568)
    at FirebaseAppService.__ASSERT_INIT_WAS_CALLED__ember1566481749836931747236082__ (vendor.js:42765)
    at sendEvent (vendor.js:25445)
    at initialize (vendor.js:41695)
    at Function.create (vendor.js:42280)
    at FactoryManager.create (vendor.js:11800)
    at instantiateFactory (vendor.js:11610)
    at lookup (vendor.js:11538)
    at Container.lookup (vendor.js:11382)
    at Class.lookup (vendor.js:39970)
assert @ vendor.js:48568
__ASSERT_INIT_WAS_CALLED__ember1566481749836931747236082__ @ vendor.js:42765
sendEvent @ vendor.js:25445

Maybe someone could point me in the right direction, thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4836

Trending Articles