-
Notifications
You must be signed in to change notification settings - Fork 46.8k
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
Why are react-dom error messages so cryptic? #10108
Comments
When you see a message like this it usually means there was an earlier error message that your code swallowed in a It is hard to say more without a complete reproducing example. It could be a bug in React, but the last ~15 times this was reported, it turned out to be that the app code was swallowing the real exception. So I’d be happy to look into it but only if you can extract the code that I can run and reproduce this. |
I’m closing because there was no more information provided. If you check "Pause on Caught Exceptions" in Chrome debugger you will likely find the original error causing this. |
@gaearon it is happening during console-based unit tests. cannot apply that browser option "pause on caught exceptions" here. |
You can try using the Node inspect functionality so that it attaches to Chrome DevTools. |
hmmm, that's new to me @gaearon ... is there an example/article how to do that best? |
What test runner are you using? There's this: https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27. It won't work with Jest though I think because of a Node bug. |
yeah, using jest here. what's the node bug so that i can follow it. |
But if you reliably have this issue I would expect you to be able to reproduce by rendering the same component in the browser. |
You can also write a standalone Node script that does the same thing your test does, and then debug that. |
When react-dom v15.5.4 throws an error during jest tests using test-utils, error messages can be so cryptic. Makes it harder for us developers to understand the problem. For example this one:
Can't you put something more "readable" in
__reactInternalInstance$snz0ajvq2ztcsor
instead? Like what it's parent node is, what its tag name is etc. Would be extremely useful.Using this test code btw:
The text was updated successfully, but these errors were encountered: