cibernox / ember-power-select

The extensible select component built for ember.
http://www.ember-power-select.com
Other
541 stars 379 forks source link

[Ember 3.17.0-beta.2]: You attempted to update `isActive` on `PowerSelect`, but it had already been used #1325

Closed jelhan closed 4 years ago

jelhan commented 4 years ago

Running the test for ember-beta scenario, which is picking up ember-source@3.17.0-beta.2 causes causes most of the tests to throw with this error:

Assertion Failed: You attempted to update isActive on PowerSelect, but it had already been used previously in the same computation. Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.

581 out of 761 are failing. Not all but most of them are failing due to this error.

An example of the stack trace included in test report:

Stack trace for the update: at http://localhost:7357/assets/vendor.js, line 55265
 While executing test: Integration | Component | Ember Power Select (Accesibility): Single-select: The selected option has `aria-selected=true` and the rest `aria-selected=false`
    ---
        browser log: |
            testContext: [object Object]
            ERROR: Uncaught Error: Assertion Failed: You attempted to update `isActive` on `PowerSelect`, but it had already been used previously in the same computation.  Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.

            `isActive` was first used:

            - While rendering:

              application
                index
                  power-select
                    this.isActive

            - While rendering:

              application
                index
                  power-select
                    basic-dropdown
                      (result of a `assign` helper)

            - While rendering:

              application
                index
                  power-select
                    basic-dropdown
                      basic-dropdown-trigger
                        -dynamic-element
                          (result of a `ifHelper` helper)

            Stack trace for the first usage: 
                at getter (http://localhost:7357/assets/vendor.js:55709:7)
                at PowerSelect.get [as isActive] (http://localhost:7357/assets/vendor.js:17309:24)
                at getPossibleMandatoryProxyValue (http://localhost:7357/assets/vendor.js:14759:19)
                at get (http://localhost:7357/assets/vendor.js:14825:20)
                at http://localhost:7357/assets/vendor.js:47340:34
                at runInAutotrackingTransaction (http://localhost:7357/assets/vendor.js:55158:9)
                at track (http://localhost:7357/assets/vendor.js:55668:9)
                at PropertyReference.value (http://localhost:7357/assets/vendor.js:47339:47)

            Stack trace for the update: at http://localhost:7357/assets/vendor.js, line 55265
cibernox commented 4 years ago

I believe it has to do with a problem with {{in-element}} on the beta version of Ember, being tracked in https://github.com/emberjs/ember.js/issues/18696

Hopefully it can be fixed soon. Tomorrow I should have time to investigate this myself.

chancancode commented 4 years ago

@cibernox @jelhan is the problem still occurring for you since #18727?

chancancode commented 4 years ago

Fix landed in https://github.com/emberjs/ember.js/pull/18728 for canary and beta!

cibernox commented 4 years ago

Nice, so the next build in CI should be green again.

cibernox commented 4 years ago

@jelhan Can you verify that this is fixed with the latest changes in Ember itself? (No significant changes in this repo)

jelhan commented 4 years ago

@jelhan Can you verify that this is fixed with the latest changes in Ember itself?

All I'm doing is cloning this repo, installing the dependencies and running the ember-beta scenario. I guess restarting the ember-beta scenario on TravisCI for last commit to master branch should provide the same information in a more reproducible way.

But nevertheless I've done it and could confirm that #1326 and the issue reported here are fixed by upstream changes. ember try:one ember-beta is passing again.