-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Reproduction
git clone [email protected]:bk-pb/data-multiple-unload.git
cd data-multiple-unload
npm i
ember s
NOTE: Do not open Ember Inspector before receiving the error. Having it open on the Data tab during reproduction seems to hide the issue.
- Open http://localhost:4200/home
- Navigate to Company List
- Notice that
@model.lengthis2 - Navigate to Home
- Navigate to Company List again
- Notice that
@model.lengthis still2 - Navigate to Home
- Navigate to Company List again
- Notice that
@model.lengthis now4and an error is thrown:
index.js:153 Uncaught (in promise) Error: Assertion Failed: Expected to receive a stable Identifier to subscribe to
at assert (index.js:153:1)
at NotificationManager.subscribe (index-36c7ac56.js:3571:1)
at new RecordState (has-many-c1bfdebf.js:3242:1)
at CompanyModel.init [as _super] (has-many-c1bfdebf.js:3626:1)
at CompanyModel.init (has-many-c1bfdebf.js:5503:1)
at CompanyModel.superWrapper (index.js:366:1)
at initialize (core.js:74:1)
at CompanyModel.create (core.js:398:1)
at Store.instantiateRecord (index-36c7ac56.js:5529:1)
at InstanceCache.getRecord (index-36c7ac56.js:2953:1)
Description
Loading / unloading the same resource (i.e. record with the same type and id) multiple times results in lingering record reference in cache, which triggers a missing stable identifier error on any subsequent peeks.
Upgrading from 3.24.2 to 4.12.3. Quite a jump, but it feels like this use case is simple enough that it shouldn't be blowing up like this.
Versions
Ember: 4.12.3
Ember Data: 4.12.3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels