facebook / react

The library for web and native user interfaces.
https://react.dev
MIT License
229.05k stars 46.86k forks source link

[DevTools Bug] Commit tree already contains fiber "15". This is a bug in React DevTools. #24655

Open msanmaz opened 2 years ago

msanmaz commented 2 years ago

Website or app

https://github.com/msanmaz/prisma-exp or development link https://crud-prisma.vercel.app/

Repro steps

https://github.com/msanmaz/prisma-exp or development link https://crud-prisma.vercel.app/

-git clone above repo

How often does this bug happen?

Every time

DevTools package (automated)

react-devtools-extensions

DevTools version (automated)

4.24.6.0-2c8a1452b

Error message (automated)

Commit tree already contains fiber "15". This is a bug in React DevTools.

Error call stack (automated)

at updateTree (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:25307:19)
    at getCommitTree (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:25240:20)
    at ProfilingCache_ProfilingCache.getCommitTree (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:25768:11)
    at CommitRankedAutoSizer (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:44121:33)
    at ii (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:15307:7)
    at yj (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:16179:7)
    at wl (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:19178:86)
    at vl (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:18728:11)
    at ul (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:18720:23)
    at jl (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:18704:5)

Error component stack (automated)

at CommitRankedAutoSizer (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:44104:34)
    at div
    at div
    at div
    at SettingsModalContextController (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:36191:3)
    at Profiler_Profiler (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:53818:34)
    at ErrorBoundary_ErrorBoundary (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:37712:5)
    at div
    at div
    at ThemeProvider (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:37884:3)
    at PortaledContent (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:37914:5)
    at div
    at div
    at div
    at ThemeProvider (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:37884:3)
    at TimelineContextController (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:43126:3)
    at ProfilerContextController (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:42571:3)
    at TreeContextController (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:30468:3)
    at SettingsContextController (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:31094:3)
    at ModalDialogContextController (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:38309:3)
    at DevTools_DevTools (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/main.js:54320:3)

GitHub query string (automated)

https://api.github.com/search/issues?q=Commit tree already contains fiber . This is a bug in React DevTools. in:title is:issue is:open is:public label:"Component: Developer Tools" repo:facebook/react
lunaruan commented 2 years ago

Hey! Thanks for reporting this! I created a test account but am unable to sign in

image

Do you know how to sign in, or could you create a dummy app that doesn't need authentication for us to test with? Thanks!

msanmaz commented 2 years ago

hi, sorry I was working on the projects,the valid credentials are aya@aya.com 123123123, thanks

lunaruan commented 2 years ago
image

I'm getting a missing database error. Could you create a smaller repro of this issue on codesandbox so we more easily repro? Unfortunately it's hard with all the noise 😕

msanmaz commented 2 years ago

Oh I see, .env file is missing, I've created a codesandbox here with .env files in it, that should work smooth.

https://codesandbox.io/s/keen-leavitt-hpcdwb?file=/pages/index.js:410-443

thanks

lunaruan commented 2 years ago

I tried to repro it. but Profiling was fine for me. Was there something specific you were doing to make the profiling fail?

thebitguru commented 2 years ago

I am also running into this issue.

Uncaught Error: Commit tree already contains fiber "1". This is a bug in React DevTools.
The error was thrown at updateTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25514:19)
    at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25447:20)
    at ProfilingCache_ProfilingCache.getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25975:11)
    at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:44083:33)
    at Ai (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:15407:7)
    at Oj (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16299:7)
    at Gl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19329:86)
    at Fl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:18930:11)
    at El (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:18922:23)
    at tl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:18906:5)
The error occurred at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:44066:34)
    at div
    at div
    at div
    at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:36399:3)
    at Profiler_Profiler (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:54176:34)
    at ErrorBoundary_ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:37920:5)
    at div
    at div
    at ThemeProvider (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:38092:3)
    at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:38122:5)
    at div
    at div
    at div
    at ThemeProvider (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:38092:3)
    at TimelineContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43336:3)
    at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:42781:3)
    at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30676:3)
    at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:31302:3)
    at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:38517:3)
    at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:54684:3)

In my case, I don't believe I did anything special other than checking "Record why each component rendered while profiling" and selecting a different commit. Unchecking this git it to work again.

lunaruan commented 2 years ago
image

I'm still getting this error on the codesandbox.

@thebitguru Do you have a repro of this issu?

thebitguru commented 2 years ago

It happened with a local, proprietary repo and I cannot seem to reproduce it now. Sorry!

I will post an update if I see this issue again.