Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Service cannot be used before helper failing test #1086

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MichalBryxi
Copy link
Contributor

@MichalBryxi MichalBryxi commented Sep 25, 2024

  • When fileQueue service is used before (fileQueue) helper, then app fails with:
ember.js:626 Uncaught (in promise) Error: Assertion Failed: You attempted to update `_value` on `TrackedStorageImpl`, 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.

`_value` was first used:

- While rendering:
  -top-level
    application
      index
        (unknown template-only component)
          (result of a `unknown` helper)
            (result of a `unknown` helper)
              (result of a `unknown` helper)
                false.files

Note that for me to run the test suite locally I had to first apply following patches:

- When `fileQueue` service is used _before_ `(fileQueue)` helper, then app fails with:

```
ember.js:626 Uncaught (in promise) Error: Assertion Failed: You attempted to update `_value` on `TrackedStorageImpl`, 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.

`_value` was first used:

- While rendering:
  -top-level
    application
      index
        (unknown template-only component)
          (result of a `unknown` helper)
            (result of a `unknown` helper)
              (result of a `unknown` helper)
                false.files
```
- This PR is just to document the issue described in adopted-ember-addons#1085
@@ -20,6 +20,31 @@ module('Integration | Helper | file-queue', function (hooks) {
setupRenderingTest(hooks);
setupMirage(hooks);

test('service can be used before helper', async function (assert) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Until some code fixing the addon is pushed, this test will fail. And that is ok as this PR is only intended to show the bug. I don't think I will have time anytime soon to fix the code itself, so very happy if someone can take-over and finish this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant