You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DevTools Profiler: "getCommitTree(): Unable to reconstruct tree for root "…" and commit …" #18033
Describe what you were doing when the bug occurred:
1.
2.
3.
Please do not remove the text below this line
DevTools version: 4.4.0-f749045a5
Call stack: at N (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:154255)
at e.getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157019)
at yl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:320890)
at ei (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:58864)
at Mi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:67500)
at yl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:108161)
at kc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:99474)
at wc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:99399)
at fc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:96173)
at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:45937
Component stack: in yl
in div
in div
in div
in vo
in Unknown
in n
in Unknown
in div
in div
in Qi
in Ve
in nn
in Da
in Yc
It doesn't look like this bug report has enough info for one of us to reproduce it.
Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. Screenshots or videos can also be helpful if they help provide context on how to repro the bug.
@bvaughn Looks like the issue is still reproducible after a PR which was done in #16412 . I can try to reproduce the steps from #16412 if it'll help somehow.
@bvaughn I was able to reproduce the error here https://codesandbox.io/s/getcommittree-gsqzl. There you will see really strange code :) I think this error could happen because of codebase. No steps required just click on "reload and start profiling" and navigate through commit tree. I'll continue try to reproduce the error with more real world code.
Also during my investigation I saw this error "An error was thrown: "Commit tree does not contain fiber 19. This is a bug in React DevTools."" Let me know if I need to create a sandbox for that error too.
changed the title [-]Error: "getCommitTree(): Unable to reconstruct tree for root "1" and commit 152"[/-][+]DevTools Profiler: "getCommitTree(): Unable to reconstruct tree for root "…" and commit …"[/+]on Mar 4, 2020
Do we want to add a check for this? I am happy to create PR for the same.
Also, another feature/request: Is it possible to reload the Profiler view when there is an error. Currently, we need to reload the whole page. Happy to work on this feature.
I landed PR #18378 this morning. It fixes a source of problem that I think might be responsible for this, and some of the other infrequent Profiler errors. I'll release an update to the Chrome/Firefox/Edge stores today.
Activity
bvaughn commentedon Feb 15, 2020
It doesn't look like this bug report has enough info for one of us to reproduce it.
Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. Screenshots or videos can also be helpful if they help provide context on how to repro the bug.
Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve
esvyridov commentedon Feb 17, 2020
@bvaughn Looks like the issue is still reproducible after a PR which was done in #16412 . I can try to reproduce the steps from #16412 if it'll help somehow.
bvaughn commentedon Feb 17, 2020
@esvyridov Help fixing this would certainly be appreciated.
esvyridov commentedon Feb 18, 2020
@bvaughn I'll try to help and fix that issue. Thank you
esvyridov commentedon Feb 20, 2020
@bvaughn I was able to reproduce the error here https://codesandbox.io/s/getcommittree-gsqzl. There you will see really strange code :) I think this error could happen because of codebase. No steps required just click on "reload and start profiling" and navigate through commit tree. I'll continue try to reproduce the error with more real world code.
Also during my investigation I saw this error "An error was thrown: "Commit tree does not contain fiber 19. This is a bug in React DevTools."" Let me know if I need to create a sandbox for that error too.
getCommitTree.json.zip
fiber.json.zip
bvaughn commentedon Feb 20, 2020
Sweet. Thanks for the update! 😄 Any interest in digging into the underlying DevTools code to see if you can find a fix?
If not, that's okay. Having a more reliable way to reproduce the problem will be helpful to whoever looks into fixing it regardless!
esvyridov commentedon Feb 20, 2020
@bvaughn I'll try but it could take time for digging into the code and debugging. Thank you
bvaughn commentedon Feb 20, 2020
Of course 🙇 We're appreciate for anything you're able to do. No worries either way.
[-]Error: "getCommitTree(): Unable to reconstruct tree for root "1" and commit 152"[/-][+]DevTools Profiler: "getCommitTree(): Unable to reconstruct tree for root "…" and commit …"[/+]jyash97 commentedon Mar 19, 2020
Hey @bvaughn
I was looking into the same issue and I encountered these bug:
An error was thrown: "Cannot read property '2' of null". And digging into the same issue I found we aren't taking into account ifoperations[commitIndex]exists over this line: https://github.com/facebook/react/blob/master/packages/react-devtools-shared/src/devtools/views/Profiler/CommitTreeBuilder.js#L85.These results in an error on accessing an index from undefined or null: https://github.com/facebook/react/blob/master/packages/react-devtools-shared/src/devtools/views/Profiler/CommitTreeBuilder.js#L171
Do we want to add a check for this? I am happy to create PR for the same.
Also, another feature/request: Is it possible to reload the Profiler view when there is an error. Currently, we need to reload the whole page. Happy to work on this feature.
bvaughn commentedon Mar 19, 2020
@jyash97 If you're digging into this code and think it would make sense to add a check or something, please feel free to share a PR 😄
I don't have the bandwidth at the moment to dig in and give it much thought, but I didn't want to ignore this comment entirely!
bvaughn commentedon Mar 25, 2020
I landed PR #18378 this morning. It fixes a source of problem that I think might be responsible for this, and some of the other infrequent Profiler errors. I'll release an update to the Chrome/Firefox/Edge stores today.