Skip to content
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

Uncaught Error: orphaned/detached FileEntries don't have path (except Root) #14

Open
LoganDark opened this issue Sep 28, 2021 · 6 comments

Comments

@LoganDark
Copy link

Uncaught Error: orphaned/detached FileEntries don't have path (except Root)
    at FileEntry.get path [as path] (FileEntry.ts:78)
    at ItemRendererWrap.updateCachedItemPath (ItemRendererWrap.tsx:70)
    at ItemRendererWrap.componentDidUpdate (ItemRendererWrap.tsx:53)
    at commitLifeCycles (react-dom.development.js:20684)
    at commitLayoutEffects (react-dom.development.js:23426)
    at HTMLUnknownElement.callCallback (react-dom.development.js:3945)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994)
    at invokeGuardedCallback (react-dom.development.js:4056)
    at commitRootImpl (react-dom.development.js:23151)
    at unstable_runWithPriority (scheduler.development.js:468)
    at runWithPriority$1 (react-dom.development.js:11276)
    at commitRoot (react-dom.development.js:22990)
    at performSyncWorkOnRoot (react-dom.development.js:22329)
    at react-dom.development.js:11327
    at unstable_runWithPriority (scheduler.development.js:468)
    at runWithPriority$1 (react-dom.development.js:11276)
    at flushSyncCallbackQueueImpl (react-dom.development.js:11322)
    at flushSyncCallbackQueue (react-dom.development.js:11309)
    at scheduleUpdateOnFiber (react-dom.development.js:21893)
    at dispatchAction (react-dom.development.js:16139)

Looks like this happens when there is an extremely fast stream of inotify (hundreds of events per second).

@zikaari
Copy link
Owner

zikaari commented Sep 30, 2021

Can you please provide a minimal repro code?

@LoganDark
Copy link
Author

It seems like the issue is manifesting whenever there are many re-renders in a short time frame. I can't provide a repro right this minute but I can try to get one soon

@zikaari
Copy link
Owner

zikaari commented Sep 30, 2021

The inotify pipeline does have debouncing built-in to prevent frequent re-renders, but there are some specific cases where the inotify event queue is flushed. Based on the code we'll be able to find when/if that flush is being triggered.

@LoganDark
Copy link
Author

The inotify pipeline does have debouncing built-in to prevent frequent re-renders

When my app is playing animations, it re-renders the tree view at (ideally) 60fps. This causes a big fat error as well. So it might not be inotify after all.

@LoganDark
Copy link
Author

LoganDark commented Oct 16, 2021

Now this happens for each child of the directory when an expanded directory is deleted via inotify. Directory has 13 children? 13 errors

Maybe this is a race condition when chokidar emits deleted events for both a directory and its children

@zikaari
Copy link
Owner

zikaari commented Oct 17, 2021

Maybe this is a race condition when chokidar emits deleted events for both a directory and its children

I see this as a plausible case.

Stack trace might be of help here. Better yet, some breakpoints that can help us understand the flow of events leading to the errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants