Closed gdborton closed 7 years ago
I've seen this come up using both mount
and render
from enzyme, and after investigating briefly I see that render
is just proxying to require('react-dom/server').renderToStaticMarkup
so I think enzyme can be ruled out as the cause.
Seeing another issue with React logging warning messages in our tests...
Warning: Exception thrown by hook while handling onSetChildren: Invariant Violation: Expected hook events to fire for the child before its parent includes it in onSetChildren()
Having the same issue. My test log is full of this warnings. Any ideas how to fix this?
ERROR: 'Warning: ReactDebugTool: debugID may not be empty.'
It is hard to fix this without a reproducing project.
For sure... we (Airbnb) are seeing it happen in only ~1% of test runs on 4,400+ test files with no apparent pattern. I'll try to recreate as best I can, but I'm not sure I'll be able to come up with a consistent failure.
I will create reproducing project tomorrow. In my case it giving this error for every test I have in my project
This doesn't look good:
2.15.12
Airbnb@1.0.0 /Users/gary_borton/airlab/repos/airbnb
├── enzyme@2.8.0
├── react@15.4.2 <--------------- react
├── react-dom@15.4.2
└─┬ react-router-dom@4.1.1
└── react@15.5.4 <------------------ another react!
Having two Reacts causes all sorts of issues. Can you please ensure you only have one copy, and try again?
Thanks - we'll dedupe those properly and see if it helps :-)
I'll close because it seems like a corner case caused by duplicate packages, and this code doesn't exist in React 16 anyway.
Thanks; sorry I didn't follow up. Deduping the Reacts seems to have fixed it.
Do you want to request a feature or report a bug? bug
What is the current behavior? Our tests are sporadically logging a warning
Warning: ReactDebugTool: debugID may not be empty.
. We fail any tests that log warnings, so this is causing flakiness.If the current behavior is a bug, please provide the steps to reproduce... I'm unable to consistently reproduce, but we're seeing roughly a 2% failure rate for our test suite. Doesn't seem to be any patterns around which tests will fail with this error.
What is the expected behavior? I'd expect our tests to either log a warning consistently if we're doing something wrong or to not log a warning at all.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
The appearance of this warning correlates pretty closely with our migration from node 4 to node 6.