ember-changeset: hasMany relationship broken with changeset-validations@1.2.10

Upgraded ember-changeset and ember-changeset-validations to the latests versions (1.4.2-beta.0 and 1.2.10) and now every time i access a hasMany relationship i get this weird error:

"Error: Assertion Failed: content must be present.…(http://localhost:4200/assets/vendor.js:39848:18)"

and also this:

Uncaught Error: a glimmer transaction was begun, but one already exists. You may have a nested transaction
    at debugAssert (util.js:62)
    at Environment.begin (runtime.js:6380)
    at Environment.begin (environment.js:252)
    at InteractiveRenderer._renderRoots (renderer.js:270)
    at InteractiveRenderer._renderRootsTransaction (renderer.js:323)
    at InteractiveRenderer._revalidate (renderer.js:360)
    at invoke (backburner.js:258)
    at Queue.flush (backburner.js:151)
    at DeferredActionQueues.flush (backburner.js:329)
    at Backburner.end (backburner.js:462)

Line 39848 in my vendor.js is https://github.com/emberjs/ember.js/blob/bdc2c3e3a15d13d8bb1951d44b1a28ee1c6a36cb/packages/ember-metal/lib/property_get.js#L67

After downgraded ember-changeset-validations to 1.2.8 again everything works. I only get this error when my model that has a hasMany relationship is new and unsaved.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 32 (5 by maintainers)

Most upvoted comments

Just to notify everyone, 2.0.0-beta.0 has been published for ember-changeset and ember-changeset-validations. Give it a shot! @abobwhite

I’m also getting this, have downgraded back to EC 1.3.0 to resolve

@snewcomer There were two forms in my Ember 3.4 app that had this issue when upgrading from ember-changeset 1.3.0 to 1.5.0 . After upgrading to the new beta versions, I no longer have failing tests for those forms and everything seems to be working! I’ll continue to test this out.

Thanks for all the hard work getting this released!

This is fixed in ember-changeset. Verified by adding, saving, and removing a has many relationship. Will look to releasing 1.5 proper soon!

Lmk if anybody has another issue! Will close for now if you don’t mind!

It’s not related to ember-changeset-validations. Bug was introduced by ember-changeset@1.4.2-beta.0. Here is a simple reproduction: https://ember-twiddle.com/31dad57760c42a665442764c5b96e0f5?fileTreeShown=false&openFiles=twiddle.json%2C

I finally got around to upgrading to 2.0.0, @snewcomer and it appears to be working correctly for me now 🎆 🥂

After more searching and debugging, it appears it was actually an error during render of the power-select-multiple and not actually related to EC at all. Sorry for any confusion.

@snewcomer: I have the same problem. If you update @jelhan twiddle to the newest version it doesn’t work either: https://ember-twiddle.com/1b34e71c35c1091fe11ff34f12636fe7

Have you tested it with a template? The tests are all with out one if I am correct. Maybe it has something to do with the glimmer getter.