You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot destructure property 'manager' of '.for' as it is undefined. #20708
gjs = yes, it still occurs in our app, which is gjs with the original error as above. But, in terms of focusing on the minimal reproduction, no, it instead outputs:
Attempted to set the same type of manager multiple times on a value. You can only associate one manager of each type with a given value. Value was (unknown function)
I don't think it's the fact that it uses two click handlers, rather, that it updates another tracked property that is an argument to the modifier? Since, you can combine the click handler and the error still happens.
Anyway, I really would like this to work of course, since the code is 'valid' also don't forget this is an unrealistic minimal production and in reality, one might not be in control to be able to do your suggested fix
Attempted to set the same type of manager multiple times on a value. You can only associate one manager of each type with a given value. Value was (unknown function)
But with FocusTrapModifier, while on host app using ember-eui components
After having ran ember-cli-update from 5.9.0 to 6.1.0 this is occurring a lot more in our app now
Uncaught (in promise) Error: Attempted to set the same type of manager multiple times on a value. You can only associate one manager of each type with a given value. Value was (unknown function)
As already mentioned, it may be an addon author applying a modifier, and then, a consumer of the addon applying one of the same type again. Which should be allowed because they aren't in control of 'the fix'.
As you have already seen my minimal re-production repo, here is a more realistic scenario.
Based on the discussion and prior triage at the top of this issue, i'd prefer a new issue so we start with a clean slate -- in this issue, there are like 5 different problems being looked at
e.g.:
good news though -- you already have a good reproduction, and that's a great place to start. 🎉
Activity
NullVoxPopuli commentedon Jun 20, 2024
Does the issue appear in
Thanks!
amk221 commentedon Jun 20, 2024
ember-source 5.9 = yes, still occurs
gjs = yes, it still occurs in our app, which is gjs with the original error as above. But, in terms of focusing on the minimal reproduction, no, it instead outputs:
NullVoxPopuli commentedon Jun 20, 2024
That second error seems like the deps got messed up. Does using pnpm reproduce nhe original error?
amk221 commentedon Jun 20, 2024
relooking
amk221 commentedon Jun 20, 2024
You're right.
Here's a gjs branch, with the original error
amk221/-ember-modifier-manager@7832982#diff-8b01f9fcdd7fd5370da514614ab30fe4ea2ebfd452dac4b7e4fd3482dc0e5421R55-R57
NullVoxPopuli commentedon Jun 20, 2024
In the gjs branch, there was an issue.
the modifier import was shadowing the keyword.
After the fix (amk221/-ember-modifier-manager#1), the new error is
which is another issue 🤔
NullVoxPopuli commentedon Jun 20, 2024
It's possible that one of these caused the issue:
just kidding, these landed in 5.9
NullVoxPopuli commentedon Jun 20, 2024
ah, no the repro has a problem
NullVoxPopuli commentedon Jun 20, 2024
Here is the fix:
Now... should it work? probably.
why doesn't it work? idk.
maybe @chancancode can provide some insights there.
amk221 commentedon Jun 20, 2024
Thanks for looking!
I don't think it's the fact that it uses two click handlers, rather, that it updates another tracked property that is an argument to the modifier? Since, you can combine the click handler and the error still happens.Anyway, I really would like this to work of course, since the code is 'valid' also don't forget this is an unrealistic minimal production and in reality, one might not be in control to be able to do your suggested fix
NullVoxPopuli commentedon Jun 20, 2024
that's not what happens in my PR to your repro 🤔
yeah, the fact it doesn't work does seem bad
betocantu93 commentedon Jun 28, 2024
Im also having this error with ember-focus-trap
But with
FocusTrapModifier, while on host app using ember-eui componentsamk221 commentedon Jan 8, 2025
After having ran ember-cli-update from 5.9.0 to 6.1.0 this is occurring a lot more in our app now
As already mentioned, it may be an addon author applying a modifier, and then, a consumer of the addon applying one of the same type again. Which should be allowed because they aren't in control of 'the fix'.
As you have already seen my minimal re-production repo, here is a more realistic scenario.
amk221 commentedon Jul 24, 2025
Fixed by avoiding name clash
1 remaining item
NullVoxPopuli commentedon Sep 10, 2025
In the REPL -- how do I see the issue?
amk221 commentedon Sep 10, 2025
Run the tests
NullVoxPopuli commentedon Sep 10, 2025
REPL with clicks
gonna try your 6.3 app now (the REPL is using 6.8)
NullVoxPopuli commentedon Sep 10, 2025
I think this has something to do with the route template and controller combo. if I just use components, the problem goes away.
amk221 commentedon Sep 10, 2025
I ran ember-cli-update (commit), but the error is still there
NullVoxPopuli commentedon Sep 10, 2025
If you're wanting to be unblocked -- can you try moving to components instead of controller + template? does that fix your issue?
amk221 commentedon Sep 10, 2025
Thanks its a good idea, but I tried it: First by removing use of controllers, and Secondly by switching to ember-route-templates to make doubly sure.
NullVoxPopuli commentedon Sep 10, 2025
did I mess something up here? test passes: https://github.com/amk221/-ember-modifier-manager-issue/pull/1/files#r2337741343
amk221 commentedon Sep 10, 2025
Well its not a true representation of the minimal reproduction of the issue, its not using arguments
NullVoxPopuli commentedon Sep 10, 2025
Here is a repro in the REPL
amk221 commentedon Sep 10, 2025
NullVoxPopuli commentedon Sep 10, 2025
yup -- and with the debug tools open, it can be debugged the same as your repro repo 🎉
though, the error is slightly different. I was never able to see
.forin the erroramk221 commentedon Sep 10, 2025
(Thats why I made the github repo, to be as close to the real problem in our app as possible!)
amk221 commentedon Sep 10, 2025
Please can the issue be reopened?
NullVoxPopuli commentedon Sep 10, 2025
Based on the discussion and prior triage at the top of this issue, i'd prefer a new issue so we start with a clean slate -- in this issue, there are like 5 different problems being looked at
e.g.:

good news though -- you already have a good reproduction, and that's a great place to start. 🎉