-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Ember Data 4.7] Error: Assertion Failed: Expected to receive a stable Identifier to subscribe to #8262
Comments
I suspect you haven't diagnosed what has gone wrong here quite right yet, the reason it appears there are separate run-loops is because we immediately fully dismantle everything for new records when any of |
I'm unable to reproduce this using the repo you provided, note: there is one difference in what I tested: npm install resulted in a new package.lock for me because the existing lockfile was generated by an outdated npm |
@runspired i'm using nodejs v14 The error occures, when i access to a deleted model, like in the provided repo. Before i'm deleting the record there is necessary to use find or some. |
@mkszepp yes, what I am saying is that the provided reproduction does not reproduce the error at all for me. If it does for you, then there's likely something wrong with your install as that would be the only difference. |
@runspired i have now updated nodejs version to I have now commitet the new package.lock file (i have deleted node_model folder + the old package.lock file before regenerate), but the update has not solved my problem. data/packages/store/addon/-private/managers/record-notification-manager.ts Lines 48 to 61 in b14e586
I have also tested the same code in ember data I have activated the identifier debug, maybe this is helpful: I can reproduce this error also on other computers |
I have tried to update to |
still not sure how to replicate this, the repo provided did not replicate this for me with the steps provided. Would be happy to setup a video call to go through it together since probably I'm missing some context. |
@runspired Thank you for your patience. Yes this woud be great, so i can show you the bug on my computer. How can we get in contact? Which channel do you prefer? |
@runspired it would be great to geat a release with this and also other bugfixes in LTS 4.8.x |
Reproduction
createRecord
without savingdestroyRecord
Error: Assertion Failed: Expected to receive a stable Identifier to subscribe to
by accessing the functionsome
,filter
....The problem doens't appear when i use in step 3
rollbackAttributes
instead ofdestroyRecord
/deleteRecord
Description
For better understanding i have created a new clean ember project with a example (branch identifier-subscribe).
Example repo: https://github.com/mkszepp/ember-stable-identifier/tree/identifier-subscribe
So i have check the difference between
rollbackAttributes
anddestroyRecord
i found a possible reason.The difference is, that the
unloadRecord
calls immidiatly theunloadRecord
whiledeleteRecord
in the next run loop.data/packages/model/addon/-private/model.js
Lines 848 to 860 in c165e7e
data/packages/store/addon/-private/store-service.ts
Lines 632 to 649 in c165e7e
Is it possible, that the reported bug is a timing problem?
An other problem is, when i create a new record and delete it (with deleteRecord) the model stays in the store and the states (isNew, isDeleted...) are false and dirtyType is empty string. Maybe those two problems are interconnected
Versions
Ember Js: 4.7.0+
Ember Data: 4.7.3
The text was updated successfully, but these errors were encountered: