-
Notifications
You must be signed in to change notification settings - Fork 47k
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 Bug]: Component tree size too small, components can't be selected #21986
Comments
Same issue, Chrome v 92.0.4515.107 |
The Profiler tab seems unaffected Workarounds that don't help:
|
Looks like a CSS issue. I managed to work around it by fiddling with the styles as shown in this video: hOIhH63WKa.mp4Besides the css tweaks to make the tree not so squished, the mouse selection issue has to be worked around separately The nodes are initially selectable with the mouse, but mouse selection breaks permanently if you attempt to use the element picker (I'm guessing it adds Using other methods of selecting nodes (i.e. searching, keyboard, using the For anyone curious on how to do what I did in the video:
|
reproduces for me on: MacOS X 10.14 |
Mine is: Windows 10 21H1 (OS Build 19043.1110) If any developer is unable to reproduce, let me know and I can get you whatever you need (a snapshot of the dom, the css ruleset, a memory dump, Also I know you guys know this but just in case: what I did in the video is by no means a suggestion of what should be done in order to fix the problem. Randomly changing CSS around without understanding what it does is a good way to introduce more bugs |
reproduces for me on: Windows 10 Pro (10.0.19043 Build 19043) |
I also have this problem: MacOS 11.4 Sometimes component tree doesn't show at all, have to reload a page. Even after reloading tree is too narrow and clicks are not coming through. Tried every sane approach to fix (reinstall, reload etc) — nothing helps. |
Occurs for me as well: Ubuntu 20.04.2 LTS While Chrome is affected for me - FireFox continues to work. |
Another report in #22065 |
I suspect the bug may be caused by this component (which we use in DevTools to auto-expand the Components tree to fill the width and height of the viewport): |
Me too. Interestingly, the issue is not present in |
Tanks @mbonaci. As another data point: OS X 11.4 (20F71) FWIW I've never seen or been able to reproduce this bug myself (and I use DevTools daily). Maybe others can share their configurations and we can spot a pattern. |
@ bvaughn
So you can't reproduce?
What would be helpful for you to track this down? |
I have the same issues and also using chrome with latest version |
@simplecommerce Could be helpful if you and your coworker could try to further narrow down what the difference is between the two of your setups. |
@bvaughn I checked with him quickly and we have pretty much the same extensions. |
I have a suspicion at whats going on here. I know react-virtualized |
@issacgerges Awesome work, this pretty much confirms it. Changing that flag from |
Couldn't find the throttle setting mentioned by @issacgerges and where to change it. |
Could be worth opening a Chromium ticket, but from similar experience this is likely by design. Maybe they could exclude devtools extensions here? I think the fact that this is deep in the Alternatively it feels like that |
Fantastic find, @issacgerges! Seems like |
I saw you just picked this up @bvaughn, if you have issues in development I have seen Chromium make timers minute aligned when doing background throttling. It's possible it may do the same in this case. If that's the case I know setImmediate polyfills have a trick with a self |
Thanks for the pointer, @issacgerges. Happen to have a code pointer? |
Sure! Here's the and here is a reference to the timer alignment I've seen mentioned (not 100% sure it will apply here) |
Super helpful. Thanks! |
I'm overlooking some important detail here. Enabling/disabling the "Throttle non-visible cross-origin iframes" flag does indeed trigger/fix the bug, but even when this is disabled– animation frames still get called based on my testing, unlike what @issacgerges reported above:
(So my idea to detect this case and fallback to a timeout doesn't work.) That being said, just replacing |
@bvaughn ah interesting. Just to validate are you registering those |
@issacgerges I added logging to the feature detection code I wrote (which runs in the same context as the |
Chrome's new "Throttle non-visible cross-origin iframes" flag causes problems for code running inside of hidden iframes. In this case, animation frames get scheduled without any error but never get called. This causes problems for the React DevTools browser extension specifically. This commit adds a workaround by scheduling a backup timeout along with animation frames. In the normal case, these timeout will be cancelled by the animation frame (which will run first). For more info, see facebook/react#21986
Fixed it by adding a fallback timeout when rAF is used |
Thanks a ton for the info @issacgerges and @gabriel-peracio |
This fix has landed. We'll probably release it next week because we're also waiting on another bugfix to unblock the Firefox release. |
Related CR bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1241986 |
Chrome's new "Throttle non-visible cross-origin iframes" flag causes problems for code running inside of hidden iframes. In this case, animation frames get scheduled without any error but never get called. This causes problems for the React DevTools browser extension specifically. This commit adds a workaround by scheduling a backup timeout along with animation frames. In the normal case, these timeout will be cancelled by the animation frame (which will run first). For more info, see facebook/react#21986
Website or app
https://reactjs.org/
Repro steps
At first the component tree won't appear. Once I'm at the "Components" tab, I then have to also refresh the page to make the tree render. And when it does render, it still doesn't work properly.
As a note, this issue started happening after I had to forcibly restart my computer. Since then I have tried reinstalling the extension, restarting Chrome, restarting my pc, all of which haven't worked. I'd like to avoid reinstalling Chrome completely but that's the only thing I haven't yet tried. Using Windows 10, btw.
Here is what the broken component tree looks like. It's very narrow and the components cannot be selected:
How often does this bug happen?
Every time
DevTools package (automated)
No response
DevTools version (automated)
No response
Error message (automated)
No response
Error call stack (automated)
No response
Error component stack (automated)
No response
GitHub query string (automated)
No response
The text was updated successfully, but these errors were encountered: