Open wagenet opened 3 years ago
I have verified that this issue is introduced in Ember 3.19. Before that it gives an error about how it must be a function. I'm guessing that additional debugging was added for 3.19, which caused the issue.
Hey! I've seen the same issue with glimmer component. I accidentally didn't pass callback to fn
helper and instead of descriptive message about missing callback I've got: Attempted to create a log for a path reference
Hey! I've seen the same issue with glimmer component. I accidentally didn't pass callback to fn helper and instead of descriptive message about missing callback I've got: Attempted to create a log for a path reference
Same issue, a descriptive error message would be nice here.
I think we just landed a fix for this over in https://github.com/emberjs/ember.js/pull/19195. I'll be working on a series of backports / releases over the next day or two to get it released.
I recently received the same error because I did not include mock actions in my test setup that the component was expecting. This made it very difficult to debug. Any insight into why this error gets thrown with a message that's unrelated to the issue?
🐞 Describe the Bug
While running tests I encountered this message:
🔬 Minimal Reproduction
https://codesandbox.io/s/nostalgic-einstein-jdsfm
😕 Actual Behavior
Upon further investigation the error is stems from an
assert
in thefn
helper. In this case, our test did not pass the expected function which triggered this bit of code:Unfortunately, the effort to get more debug information is what causes the error, hiding the real error in the process. Ultimately, the error is from
logRenderStackForPath
which has the following code:pathRef
iscallbackRef
from the original assert andthis.pathNodes.get(pathRef)
returnsundefined
.🤔 Expected Behavior
There are two issues I see here 1) maybe this shouldn't be returning
undefined
and 2) even if there is an error in getting debug information, we should catch it so it doesn't hide the real error.🌍 Environment