Skip to content

Invalid runtime error: tracked property has "already been used previously in the same computation" #20999

@ChrisN-transnexus

Description

@ChrisN-transnexus

🐞 Describe the Bug

You attempted to update currPosition on MyComponent, but it had already been used previously in the same computation. The tracked property name and component name are irrelevant. This occurs in an Ember 6 app after update from 5.12, and in an Ember 6 V2 addon being run in the test-app after update from 5.12.

🔬 Minimal Reproduction

This code worked 100% fine in Ember 5.12. Then the project (addon and/or app) was updated to Ember 6.0, which caused this error to be generated. I'm not going to create a reproduction, the codebase is private and I don't have time to do so. This error ONLY occurs when updating from Ember 5.12 to 6.0. If the code worked in Ember 5.12, it should also work in Ember 6.0 as no features, deprecations, etc, were supposed to have changed between these versions.

😕 Actual Behavior

While developing an app and an addon, the error "You attempted to update currPosition on MyComponent, but it had already been used previously in the same computation." occurs. The app's execution is halted.

🤔 Expected Behavior

There should not be an error, the code has not changed, only the Ember dependency.

🌍 Environment

  • Ember: - 6.0.1
  • Ember-CLI: - 6.0.1
  • Node.js/npm: - 22
  • OS: - MacOS
  • Browser: - Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions