-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Doesn't support profiler even with latest React version #16685
Comments
Profiling requires either a DEV build or the production+profiling build. Are you running one of these? |
I tested with two applications one using CRA and another using a custom Webpack config, both running on DEV build Both return the same error. |
Could you make a git repo that demonstrates this problem? It sounds like a configuration problem, but it's hard to comment without seeing the actual project. |
Yeah. We've tested a lot on this end, with several common setups (including CRA), and it works - so without having more info from your end on how to repro this, it's hard to help. Just tested again to double check: create-react-app test-profiler
cd test-profiler
yarn start Profiler works fine. The issue template asks:
Could you clarify which OS, browser, and browser versions you're using please? The runtime error you mention makes me wonder if this is an unsupported browser. |
I tested with this repo below using CRA, but I think that be something in the application I'm doing wrong, because of testing only with This repo has the issue @threepointone, https://github.com/rentinga/client I'm using an OSX High Sierra with Chrome 76. |
Hi! @bvaughn @iamgbayer I've found what was causing an issue here. In the sample application there is a code which does this: When the DevTools hook is called with Fiber Tree it records all fibers in react-devtools-shared renderer.js. While doing this it takes displayName from fiber node calling getDisplayName function from utils.js. The function looks for displayName on fiber node or if there is no displayName then it takes name property which is in this case - an object. Later on, it tries to generate string id using that object in getStringId function: Which sets variable pendingStringTableLength with NaN, because object.length is undefined and if you add any number to it you will get NaN. As it keeps adding numbers - the value doesn't change from NaN. I thought that the fix for this could be doing the same check as for type.displayName in getDisplayName function, like to check if @iamgbayer If you will remove that |
Great sleuthing, @LetItRock!
|
Thanks, sure :) |
Great research @LetItRock, thank you 🎉 I based myself on this approach to expose the possible props, https://design-system.pluralsight.com/components/avatar Thanks @bvaughn and @threepointone for the orientation to find the problem 🎉 |
Now that #16798 has landed, this issue should be fixed with the next DevTools release. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
The profiler tab only shows this message even though I have a version greater than 16.5.
Something strange on the console is this message and just appears when the extension is active.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React 16.9.0
React DevTools 4.0.6-a39d9c3
The text was updated successfully, but these errors were encountered: