-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[tree] Child node 'path/to/my/file.ext' does not belong to this 'WorkspaceNodeId' tree #6688
Comments
@kittaakos Do you know how to reproduce it from sources? the issue is that we used to reset the tree with some old state, now we don't reset it, but report as an error that it has to be fixed by the developer. I don't think we want to go back with resetting some old root. |
Not yet. theia/packages/navigator/src/browser/navigator-tree.ts Lines 75 to 82 in d5c8110
Edit: I was wrong, I can see the same error. |
Do you start the browser example from theia repo and as a workspace using this repo? I'm looking for a way to reproduce it. You can debug how many times Popping up twice also does not sound bad, before it could go in the infinite loop. Maybe we should just remove |
Correct, I don't. I will take care of the investigation as it does not happen from the Theia source but from a downstream project. 😕 |
Ok, please check why it happens that the navigator root replaced twice for you on the startup. It should not happen without explicit workspace changes from the user. Also check that your code does not keep references to navigator nodes and don't pass them to the navigator model after the navigator root is changed. |
This is not a Theia bug but was in my code. The missing return messed up the app state, and Bad code: @injectable()
export class MyCustomFrontendApplication extends FrontendApplication {
protected async initializeLayout(): Promise<void> {
/*no return here!!!*/ super.initializeLayout().then(() => {
// Do some custom things here
});
}
} Good code: @injectable()
export class MyCustomFrontendApplication extends FrontendApplication {
protected async initializeLayout(): Promise<void> {
return super.initializeLayout().then(() => {
// Do some custom things here
});
}
} Sorry for the noise, with the fix, it works as expected. |
So then we keep this error message. It seems to be helpful :) |
It is 👍 |
Description
I can see multiple
Child node 'path/to/my/file.ext' does not belong to this 'WorkspaceNodeId' tree
errors in the console after updating tonext@0.14.0-next.d5c81105
(d5c8110).This seems to be a regression after #6679. (CC: @akosyakov)
Related change:
5b45e12#diff-c4f0263c39593601b3f84451c2de4106R281-R283
Reproduction Steps
Start the application.
OS and Theia version:
d5c8110
Diagnostics:
The text was updated successfully, but these errors were encountered: