ember-inspector
ember-inspector copied to clipboard
Ember Inspector causing "Assertion Failed: Illegal set of identifier"
Describe the bug
After experiencing random cases of the Assertion Failed: Illegal set of identifier
error I looked for any information and ended up on this StackOverflow question and more specifically this comment by HappyDude stating that this error can sometimes be caused by Ember Inspector.
I disabled Ember Inspector and it fixed the issue.
One element I can add is that the model causing the issue appeared twice in the inspector Data tab.
To Reproduce
I'm very sad and sorry not to be able to give any useful reproduction steps as it happens randomly.
Environment
Ember: 3.28.8 Ember Data: 3.28.6 Ember Inspector: 4.5.11 Firefox: 95.0.2 (64-bit) on a Mac
Taking the opportunity to thank all the team working on this otherwise wonderful tool that Ember Inspector is ❤️
I just ran into this bug, and it happened when I added a hasMany to the model I was working with.
@numero-trey would you be able to provide us with a small reproduction please?
same for me, preconditions:
ember-data: 3.28.7 browser: chrome os: windows devtools open: true ember inspector open: true ember-data request: findRecord called in model hook
If I close chrome dev-tools, all works fine If I open chrom dev-tools, all works fine If I open chrom dev-tools on ember inspector page - I see issue after page reload
Same for me. I was able to create a reproduction.
error firing in this line:
next jump into:
next:
next:
also, after error, model is unloaded (in catch case) =>
tldr: looks like observeModelType
called 2 times, and it's leads to error
looks like we have idea how to fix it: https://discord.com/channels/480462759797063690/486549196837486592/935672357840900118
--
upd: not really
--
if I comment
iterate(records, () => {})
error does not appear
@lifeart looks like from the comments there this might just be a leftover legacy thing?
Looks like it's still used. :/
@lifeart yeah, it might be used, but does it need to be used?
I'm experiencing this today with the same environment. Any guidance on this?
@csprocket777 try to load all model types before opening ember-inspector
burned a few hours trying to figure out the cause of this one as well :(
it's a bit of a double whammy because the tools you use to debug, like ember inspector, are the last thing you expect to be causing issues
Does https://github.com/emberjs/data/pull/8008 fix this issue too for anyone? I did not see it anymore.
Does https://github.com/emberjs/data/pull/8008 fix this issue too for anyone? I did not see it anymore.
I've been bitten by this multiple times, if this fix works I'd appreciate a backport to 3.2.x series. :pray:
fhis has been fixed now in ember and ember data. The ember data fix has also been backported. The fix in ember might also be required. If you still see this issue comment on https://github.com/emberjs/ember.js/pull/20127 for a backport