EmberJS Data Assert in setRecordDataFor "Illegal set of identifier"

Viewed 546

Using 3.28 I am hitting an assert deep inside Ember Data when retrieving a relationship on one of my models. I can run the following query just fine:

return this.store.findRecord('project', project_id)

However when I run a subsequent

const monitors = await model.monitors;

in my afterModel() of the route, this assert is triggered.

My Models look pretty standard:

export default class ProjectModel extends Model {
  @attr('string') name;
  @belongsTo('user') creator;
  @attr('date') created;
  @attr('date') changed;
  @hasMany('domain-monitor') monitors;
}

export default class DomainMonitorModel extends Model {
  @belongsTo('project') project;
  @hasMany('page-monitor') pages;
  @attr('string') protocol;
  @attr('string') domain;
  @attr('date') created;
  @attr('date') changed;
}

If someone can point to what is going wrong, I am happy to submit an MR to improve this assert message to hopefully unstuck someone in the future. Thanks!

1 Answers

Ember inspector in dev tools seems to cause this sometimes. Disabling it (or even clicking away from the tab in dev tools and refreshing) usually seems to fix the problem for me.

Related