-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
DevTools: Fix or silence "cannot find fiber with ID" warnings when hovering #16493
Comments
Comment from @bvauhgn bvaughn/react-devtools-experimental#166 (comment) I agree this is probably not ideal currently. What are "expected" edge cases and what are legit errors? I've tried to replace legit error cases with Some (most?) of the the remaining warnings are expected potential edge cases. A little more context... For example, if an element is selected in the DevTools frontend, then it gets unmounted on the page/backend, we may temporarily see this warning when we query for its inspected props: Similarly, since the |
Repro info would be helpful if you can provide it. |
I got this warning too after componentWillMount warning. Using "react": "16.13.1" |
@bvaughn i can provide a repro, but it also may be part of my bad? |
@Amoodaa Share the repro and we'll see? |
i've sent an email with the repo and the env bc in happens to need to login |
Great, thank you. It's Sunday here so I'm not going to dig into this until tomorrow at the earliest, but I will let you know what I find. |
Tried to look into the repro today but the login info you sent me does not work. |
@briankung i sent you new credentials and an updated version of the repo |
Ok thank you. I'll try to look again today. |
This may have been a false positive. I think there's something about the timing here. If I wait too long (for the page to settle) in my reduced test case, then I can't repro. |
Seems like I can further narrow it down to say that if I remove all of the Material components, my reduced repro stops failing as well. Leaving in e.g. |
Does indeed seem related to the |
tbh, this is my first time using lazy loading, and i can see now why its still not as "widely used", ill probably do a pass on the app, bc its having a real overhead on reloading/bootstrap time |
@bvaughn So this seems to becoming stale again until more repros appear, |
I was on PTO last week. I don't have a suggestion for how to fix the issue yet. When I do, I'll share it. (Not sure when that will be though.) |
I think I found the underlying cause of this bug. I think it's caused by a combination of the "legacy"
Edit This test is actually not sufficient to catch the bug after closer examination, but I think it's still something along these lines. async function fakeImport(result) {
return { default: result };
}
const App = ({ renderChildren }) => {
if (renderChildren) {
return (
<React.Suspense fallback="Loading...">
<LazyComponent />
</React.Suspense>
);
} else {
return null;
}
};
const LazyInnerComponent = () => null;
const LazyComponent = React.lazy(() => fakeImport(LazyInnerComponent));
const container = document.createElement("div");
// Render once to start fetching the lazy component
act(() => ReactDOM.render(<App renderChildren={true} />, container));
// Render again to unmount it before it finishes loading
act(() => ReactDOM.render(<App renderChildren={false} />, container)); |
I believe this issue was fixed via PR #20362. It has now been published as v4.10.1 and should be available shortly. Thank you! |
Sometimes I see "cannot find fiber with ID" when hovering over the tree. They are sporadic. I'll need to dig into why they happen. But we also need to look at our usage of warnings to make sure they're either actionable or gated by DEV/DEBUG.
Originally reported by @gaearon via bvaughn/react-devtools-experimental#166
The text was updated successfully, but these errors were encountered: